Follow-up Comment #1, bug #68897 (group groff): Dickson's analysis:
> When a .T& continued format fails the "last row of format is all lines" > check, process_format deletes the format at main.cpp:1317. That object is > still owned by process_table, which deletes it again at line 1685. Four lines > of tbl input are enough: > > .TS > l. > .T& > =. > > I reproduced it on the 1.25.0 tarball (same main.cpp as master cc834ee9) > under ASan, where it's a heap-use-after-free in format::~format(). Stock > Ubuntu 24.04 groff 1.23.0 segfaults on it too, and man -l on a page with this > table ends in "man: tbl: Segmentation fault". I only saw a crash, no > controlled write, so I'm not claiming more than that. > > A two-line fix (only delete when current_format is null) makes the ASan run > clean, and a normal .T& table renders the same. Everything is in this gist- > input, man page, patch and my output: > https://www.google.com/url?q=https://gist.github.com/DicksonWu654/7bdd1fc80e137d6a96efe85d41d30203&source=gmail&ust=1794166745311000&sa=E > > Happy to test a different fix if you'd rather do it another way _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?68897> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature
