[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Segfault while processing groff manual
From: |
Gavin Smith |
Subject: |
Segfault while processing groff manual |
Date: |
Mon, 13 Feb 2023 18:43:37 +0000 |
git revision 5151d8232b68ba8d8a, 2023-02-13.
Processing the groff manual leads to a segfault:
alias VAL='valgrind --log-file=val.log'
TEXINFO_XS=require VAL perl ../texi2any.pl ../../../groff.texi -c DEBUG=1
The debugging trace ends with the lines:
NEW TEXT: hackers will believe it |||
COMMAND code
SEPARATOR: {
OPENED
SEPARATOR: :
NEW TEXT: :|||
MERGED TEXT: -)|||
SEPARATOR: }
CLOSING(brace) code
SEPARATOR: }
CLOSE PARA
CLOSING(brace) footnote
>>>>>>>>>>>>>POPPING STACK AT 0
END LINE (paragraph)[C2] <- @subsubsection
NEW TEXT:
|||
NEW LINE common forms of escapes is the comment.
BEGIN LINE
ABORT EMPTY empty_line additional text || current ||
NEW TEXT: common forms of escapes is the comment|||
SEPARATOR: .
MERGED TEXT: .|||
END LINE (paragraph)[C4] <- @subsubsection
MERGED TEXT:
|||
NEW LINE
BEGIN LINE
END LINE (paragraph)[C5] <- @subsubsection
MERGED TEXT:
|||
END EMPTY LINE
CLOSE PARA
NEW LINE @Defesc {\\", , , }
BEGIN LINE
MACRO NEW ARG
MACRO NEW ARG
MACRO NEW ARG
MACRO NEW ARG
REMOVE empty child <- (brace_command_arg)
END MACRO ARGS EXPANSION
Segmentation fault (core dumped)
There are several errors in val.log but they mostly the same:
==198264== Invalid read of size 4
==198264== at 0x6EB0073: relocate_source_marks (source_marks.c:215)
==198264== by 0x6E9B019: isolate_last_space_internal (parser.c:829)
==198264== by 0x6E9B019: isolate_last_space (parser.c:921)
==198264== by 0x6E9B019: isolate_last_space (parser.c:883)
==198264== by 0x6EA5E4E: end_line_misc_line (end_line.c:1484)
==198264== by 0x6EA72FF: end_line (end_line.c:2397)
==198264== by 0x6E9CAB3: process_remaining_on_line (parser.c:2212)
==198264== by 0x6E9DE9E: parse_texi (parser.c:2342)
==198264== by 0x6E9688C: parse_file (api.c:210)
==198264== by 0x6E94DB3: XS_Texinfo__Parser_parse_file (Parsetexi.c:222)
==198264== by 0x2119D7: Perl_pp_entersub (in /usr/bin/perl)
==198264== by 0x208135: Perl_runops_standard (in /usr/bin/perl)
==198264== by 0x17B8DB: perl_run (in /usr/bin/perl)
==198264== by 0x151431: main (in /usr/bin/perl)
==198264== Address 0x8804f94 is 0 bytes after a block of size 4 alloc'd
==198264== at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgprel
+oad_memcheck-amd64-linux.so)
==198264== by 0x6EAFFD4: relocate_source_marks (source_marks.c:194)
==198264== by 0x6E9B019: isolate_last_space_internal (parser.c:829)
==198264== by 0x6E9B019: isolate_last_space (parser.c:921)
==198264== by 0x6E9B019: isolate_last_space (parser.c:883)
==198264== by 0x6EA5E4E: end_line_misc_line (end_line.c:1484)
==198264== by 0x6EA72FF: end_line (end_line.c:2397)
==198264== by 0x6E9CAB3: process_remaining_on_line (parser.c:2212)
==198264== by 0x6E9DE9E: parse_texi (parser.c:2342)
==198264== by 0x6E9688C: parse_file (api.c:210)
==198264== by 0x6E94DB3: XS_Texinfo__Parser_parse_file (Parsetexi.c:222)
==198264== by 0x2119D7: Perl_pp_entersub (in /usr/bin/perl)
==198264== by 0x208135: Perl_runops_standard (in /usr/bin/perl)
==198264== by 0x17B8DB: perl_run (in /usr/bin/perl)
==198264==
The error comes from the following line in groff.texi:
@Defesc {\\", , , }
which is earlier defined as
@macro Defesc{name, delimI, arg, delimII}
@deffn Escape @t{\name\\delimI\}@Var{\arg\}@t{\delimII\}
@esindex \name\
@c
@end macro
Indeed, the minimal input:
\input texinfo
@macro Defesc{name, delimI, arg, delimII}
@deffn Escape @t{\name\\delimI\}@Var{\arg\}@t{\delimII\}
@esindex \name\
@c
@end macro
@Defesc {\\", , , }
@bye
also gives a segfault.
- Segfault while processing groff manual,
Gavin Smith <=