bug-texinfo
[Top][All Lists]
Advanced

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

Re: Texinfo 7.0.93 pretest available


From: Gavin Smith
Subject: Re: Texinfo 7.0.93 pretest available
Date: Sun, 8 Oct 2023 08:50:51 +0100

> > or for a smaller file,
> > 
> > /d/usr/Perl/bin/perl ../tp/texi2any.pl info-stnd.texi -c DEBUG=1
> > 
> > to get an idea of where the crash is occurring.

> The output of the last command is:
   GET_A_NEW_LINE
> 
> and then it crashes.
> 
> Does this help?

The program appears to crash after the "@include version-stnd.texi" line
which read a new input file.  This suggests that the problem may be to
do with reading input, somewhere in 'next_text' in input.c.

I suggest commenting out the "@include" line:

diff --git a/doc/info-stnd.texi b/doc/info-stnd.texi
index 36d884a76a..883408ffcd 100644
--- a/doc/info-stnd.texi
+++ b/doc/info-stnd.texi
@@ -4,7 +4,7 @@
 @c file is made first, and texi2dvi must include . first in the path.
 @comment %**start of header
 @setfilename info-stnd.info
-@include version-stnd.texi
+@c @include version-stnd.texi
 @settitle Stand-alone GNU Info @value{VERSION}
 @syncodeindex vr cp
 @syncodeindex fn cp

and trying the command again.  If it gets further, that would confirm
there was a problem with included files.

The next step would be to add debugging statements to the code to narrow
down where the crash occurs.  For example,

diff --git a/tp/Texinfo/XS/parsetexi/input.c b/tp/Texinfo/XS/parsetexi/input.c
index ca38118e79..68f07265e4 100644
--- a/tp/Texinfo/XS/parsetexi/input.c
+++ b/tp/Texinfo/XS/parsetexi/input.c
@@ -494,6 +494,8 @@ next_text (ELEMENT *current)
         {
           FILE *file = input->file;
 
+          debug ("Popping input file");
+
           if (file != stdin)
             {
               if (fclose (input->file) == EOF)


This is assuming that you can't use tools like gdb or valgrind.  If you
can use gdb, this would be easier.  First, load perl with gdb:

gdb /d/usr/Perl/bin/perl

Then at the gdb prompt, run

r ../tp/texi2any.pl info-stnd.texi

Hopefully it shows you where the crash occurs.

If the "parsetexi" module was compiled with debugging information, I have
always found on GNU/Linux that it is possible to debug the module just as
you would debug a standalone program. 



reply via email to

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