bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: free used incorrectly in api.c


From: Eli Zaretskii
Subject: Re: free used incorrectly in api.c
Date: Sun, 23 Oct 2022 15:05:56 +0300

> From: Gavin Smith <gavinsmith0123@gmail.com>
> Date: Sun, 23 Oct 2022 13:02:27 +0100
> Cc: pertusus@free.fr, bug-texinfo@gnu.org
> 
> >   reset_parser ();
> > 
> > And reset_parser calls a bunch of functions from indices.c, which use
> > malloc/realloc/free without redirecting them to the Perl allocation
> > functions.  I guess we need the dTXH thingy there, but doing so needs
> > some Perl includes?  Can you tell me what I need to put at the
> > beginning of the file to be able to use dTHX safely in indices.c?
> > 
> > Or maybe we need something other than dTHX there?
> > 
> > I see that a lot of other files in tp/Texinfo/XS/parsetexi/ call
> > memory allocation functions, but don't have dTHX -- is that safe?
> 
> I believe the issue is with calling 'free' inside api.c itself.  It
> should be okay inside the other files.  We don't include the Perl
> header files everywhere - only in api.c.  We need to move this code
> to other files and this should fix the problem.

OK, I can try a patch to that effect if/when you have it.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]