Follow-up Comment #7, bug #67434 (group groff):

_htop_(1) reveals that the _troff_ process is growing in memory usage, but
only slowly.  Not exponentially.  That in turn suggests that the bug is not in
`symbol::symbol` or `do_get_long_name()`--I know from
[https://cgit.git.savannah.gnu.org/cgit/groff.git/commit/?id=3d3ee76860e050750d29a25eb2f648b04bf13894
experience] that when these blow up due to memory starvation, they do it
quickly.

Yet another backtrace reveals that the loop is broadly scoped.  We're only
five frames deep here.


##(gdb) bt
#0  0x000055c4e2a160af in token::next (this=<optimized out>) at
../src/roff/troff/input.cpp:2178
#1  0x000055c4e2a262e8 in process_input_stack () at
../src/roff/troff/input.cpp:3115
#2  0x000055c4e2a26f05 in while_request () at
../src/roff/troff/input.cpp:6816
#3  0x000055c4e2a26312 in process_input_stack () at
../src/roff/troff/input.cpp:3137
#4  0x000055c4e29d4c1c in main (argc=5, argv=0x7ffff7c2b9f8) at
../src/roff/troff/input.cpp:9447


It could be that this *isn't* a formatter bug, but a logic error in _hdtbl_.
It is after all quite possible to write an infinite `while` loop.

To figure that out, I'm going to need to understand hdtbl's "t*getarg" macro,
which nests `while` loops two deep and does a _lot_ of string processing.

https://cgit.git.savannah.gnu.org/cgit/groff.git/tree/contrib/hdtbl/hdmisc.tmac?h=1.23.0#n68

Big headache.

I hear bug #62264 calling my name...


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?67434>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to