On Tue, Dec 03, 2024 at 08:24:52PM +0000, Gavin Smith wrote:
> On Tue, Nov 19, 2024 at 09:04:23PM +0000, Gavin Smith wrote:
> > While testing texi2any, I accidentally found a bug:
> > 
> > $ export top_srcdir=../../ top_builddir=.. TEXINFO_DEV_SOURCE=1
> > $ ./texi2any ../doc/info-stnd.info                   
> > texi2any: warning: input file info-stnd.info; did you mean info-stnd.texi?
> > You found a bug: Should be at end of line but have [inde]
> > '
> > 
> > Additional information:
> > last location: info-stnd.info:2106
> > context_stack: (ct_base)
> > current: (before_node_section)[C1078] at ../../tp/Texinfo/ParserNonXS.pm 
> > line 1144.
> > Died at ../../tp/Texinfo/ParserNonXS.pm line 7647.
> 
> Coming back to this, I now had to run
> 
> TEXINFO_XS_PARSER=0 ./texi2any  ../doc/info-stnd.texi
> 
> to get the error on this system (OpenBSD 7.5).

It actually happened in GNU/Linux too.

>  It was being exposed befor
> by some of the XS modules not loading correctly.  Just disabling
> the XS modules completely, as with:
> 
> TEXINFO_XS=omit ./texi2any  ../doc/info-stnd.info
> 
> doesn't produce the error.

Indeed, the error appeared with ParserNonXS.pm and with MiscXS.xs misc.c
xs_parse_texi_regex only.

> I see you now have made changes (2024-12-01) for handling null bytes
> in ParserNonXS.pm, so perhaps the issue is fixed in the most recent
> development version.  (I was testing this with an older version of
> the code.)

It should be fixed by this commit, indeed.

It could be relevant to have a test case, but it cannot be a regular
test case, as each of the possible setups for the parser (XS parser,
pure Perl parser, and Perl parser with MiscXS) handle differently NUL
bytes, which is not an issue, in my opinion.

-- 
Pat

Reply via email to