Follow-up Comment #3, bug #68585 (group groff): Find attached five patches, that fix all the ASAN issues in a "make -k check" run.
Some ASAN findings became visible only after other ASAN findings were fixed,
that's why it needs five patches and not only two.
All that was needed is to call free(x) instead of delete[] x in a few places.
And updating comments, to avoid future mistakes of the same kind. Note that
for a similar case, there was already a comment
// `malloc()`ed by `string::extract()`
in src/preproc/tbl/table.cpp.
> trying to resolve the tbl issue pulled on a long thread of
> `const`-incorrectness and an insufficiently well documented internal API for
> libgroff's "string" class.
> One will observe that diff changed the return type of `string::extract()`
> away from the "reform" contemplated above. That's because I worked backwards
> from how tbl was using it.
The changes that you are considering here are not needed for resolving the
ASAN failures. No 'const' / non-'const' change and no function signature
change is needed for this ticket.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68585>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
