[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Segfault while processing groff manual
From: |
Gavin Smith |
Subject: |
Re: Segfault while processing groff manual |
Date: |
Mon, 13 Feb 2023 21:05:48 +0000 |
On Mon, Feb 13, 2023 at 09:32:56PM +0100, Patrice Dumas wrote:
>
> May be fixed in
> https://git.savannah.gnu.org/cgit/texinfo.git/commit/?id=606f3c94201213524b0f1a776b559126dfc973c9
>
> But not sure that it is exactly the same error as the one valgrind
> reports.
It doesn't segfault anymore but there is still an error. I simplified
the test case to
\input texinfo
@deffn NNN
@bye
which is invalid input, but still shouldn't have valgrind errors. In
the log file there is:
==309255== Invalid read of size 4
==309255== at 0x6EB0093: relocate_source_marks (source_marks.c:215)
==309255== by 0x6EADF19: split_def_args (def.c:284)
==309255== by 0x6EADF19: parse_def (def.c:309)
==309255== by 0x6EA4511: end_line_def_line (end_line.c:2121)
==309255== by 0x6EA4D9F: end_line_starting_block (end_line.c:1027)
==309255== by 0x6EA7257: end_line (end_line.c:2392)
==309255== by 0x6E9CAB3: process_remaining_on_line (parser.c:2212)
==309255== by 0x6E9DE9E: parse_texi (parser.c:2342)
==309255== by 0x6E9688C: parse_file (api.c:210)
==309255== by 0x6E94DB3: XS_Texinfo__Parser_parse_file (Parsetexi.c:222)
==309255== by 0x2119D7: Perl_pp_entersub (in /usr/bin/perl)
==309255== by 0x208135: Perl_runops_standard (in /usr/bin/perl)
==309255== by 0x17B8DB: perl_run (in /usr/bin/perl)
==309255== Address 0x4e08fe0 is 0 bytes after a block of size 0 alloc'd
==309255== at 0x483DD99: calloc (in
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==309255== by 0x6EAFFF4: relocate_source_marks (source_marks.c:194)
==309255== by 0x6EADF19: split_def_args (def.c:284)
==309255== by 0x6EADF19: parse_def (def.c:309)
==309255== by 0x6EA4511: end_line_def_line (end_line.c:2121)
==309255== by 0x6EA4D9F: end_line_starting_block (end_line.c:1027)
==309255== by 0x6EA7257: end_line (end_line.c:2392)
==309255== by 0x6E9CAB3: process_remaining_on_line (parser.c:2212)
==309255== by 0x6E9DE9E: parse_texi (parser.c:2342)
==309255== by 0x6E9688C: parse_file (api.c:210)
==309255== by 0x6E94DB3: XS_Texinfo__Parser_parse_file (Parsetexi.c:222)
==309255== by 0x2119D7: Perl_pp_entersub (in /usr/bin/perl)
==309255== by 0x208135: Perl_runops_standard (in /usr/bin/perl)
==309255==
==309255==
==309255== HEAP SUMMARY:
==309255== in use at exit: 17,072,077 bytes in 61,701 blocks
==309255== total heap usage: 200,510 allocs, 138,809 frees, 40,497,199 bytes
allocated
==309255==
==309255== LEAK SUMMARY:
==309255== definitely lost: 37,016 bytes in 36 blocks
==309255== indirectly lost: 61,240 bytes in 28 blocks
==309255== possibly lost: 16,707,290 bytes in 61,365 blocks
==309255== still reachable: 266,531 bytes in 272 blocks
==309255== of which reachable via heuristic:
==309255== newarray : 151,240 bytes in 4,248
blocks
==309255== suppressed: 0 bytes in 0 blocks
Also, "a block of size 0" allocated looks unusual.