On Thu, Jan 15, 2026 at 05:12:39PM +0000, Gavin Smith wrote:
> On Thu, Jan 15, 2026 at 03:48:19PM +0200, Eli Zaretskii wrote:
> > The second failure is strange: there's no *.diff files, but 2 of the 3
> > files in res_parser are very different from out_parser.  The file
> > out_parser/formatting.tex is empty, and out_parser/formatting.2 is
> > missing 21 lines, and has this extra line:
> > 
> >   +Free to wrong pool 13beec0 not 88040400 at 
> > ../perl/Texinfo/Convert/LaTeX.pm line 2674.
> > 
> > This looks like some code used 'free' from a long 'malloc' to free
> > some memory, like the allocation was done by Perl, but 'free' is from
> > tta/C code, or vice versa.  How to investigate this?
> 
> Yes, you are probably right about the wrong 'free' being used.
> 
> The function called at that line in LaTeX.pm is index_element_sort_string
> in tta/C/main/manipulate_indices.c.  But I don't know which "free" call
> would be responsible under that function or why the Perl malloc would
> have been used.

I did not find either by looking at that code, but I did an extensive
search of malloc/realloc/free/strdup... in the code compiled with the
Perl headers and found quite a bit of missing use of non_perl_*
functions.  One of those was for subentries, could be the culprit here.

I just committed the change.

> > And how do I know whether the tta/ tests were run with or without the
> > XS extensions and the rest of C code in the tta/ directory?  (It might
> > be a good idea to announce this when the test suite starts.)
> > 
> > All the other tests either succeeded or were skipped.
> 
> I think it's likely the XS modules were used in your test run.  I think
> it's a good idea to report at the start of the output whether XS modules
> are enabled.

If we do that (it is not clear to me where to do that, as the tests are
independent), I think that it would be better to be more specific than
XS/non XS, but rather show up to which step is XS used, by using the
information in the TEXINFO_XS_* environment variables, and also the
information in TEXINFO_XS_EXTERNAL_*.  Also, if that kind of information
is output for tests of texi2any, it could be a good thing to add the
information on whether the Perl texi2any or the C texi2any
implementation is used.

-- 
Pat

Reply via email to