[Top][All Lists]

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

Re: texinfo-6.0.91 pretest

From: Eli Zaretskii
Subject: Re: texinfo-6.0.91 pretest
Date: Fri, 01 Jan 2016 22:30:32 +0200

> Date: Fri, 1 Jan 2016 19:50:18 +0000
> From: Gavin Smith <address@hidden>
> Cc: Texinfo <address@hidden>
> >   Free to wrong pool 3f5d18 not 60e011e at 
> > ../tp/Texinfo/Convert/Plaintext.pm line 663.
> >
> > This seems to be related to some memory problem.  Any suggestions for
> > how to track down this one?
> There are calls to free in xspara_new, maybe they're the problem? The
> following removes them:

Thanks.  However, installing that patch doesn't help: it still crashes
in the same place.

> There are calls to 'free' elsewhere in the code as well, but I don't
> know if they are problematic or not. The webpages I looked said that
> this error ("Free to wrong pool") was to do with threads.
> I noticed in none of the functions in text.c is the Perl context
> retrieved ("dTHX"). I remember this was a problem with memory
> allocation in the previous thread I linked earlier, because Perl has
> to do something to malloc. That could be related.

If Perl uses its own malloc/free, then we cannot pass to Perl memory
allocated in XSParagraph that Perl could free, and we cannot free any
memory Perl passes to us.  Is such a scenario plausible?  Are we sure
that we only ever free memory that we ourselves allocated, and never
pass to Perl memory we allocated?

Usually, libraries that need clients to allocate memory for them
provide an allocation and deallocation functions, so that clients
won't use their own incompatible allocation schemes.  Does Perl
provide something like that?

reply via email to

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