[bug #68585] [pic, tbl] code not "ASAN_OPTIONS=alloc_dealloc_mismatch=1" clean

Bruno Haible <[email protected]> Sun, 2 Aug 2026 08:14:04 -0400 (EDT)
Newsgroups gmane.comp.printing.groff.bugs
Message-ID <[email protected]>
--8323329-424238335-1785672844=:1956354
Content-Type: TEXT/plain; CHARSET=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Disposition: inline

Follow-up Comment #3, bug #68585 (group groff):=0A=0AFind attached five pat=
ches, that fix all the ASAN issues in a "make -k check"=0Arun.=0A=0ASome AS=
AN findings became visible only after other ASAN findings were fixed,=0Atha=
t's why it needs five patches and not only two.=0A=0AAll that was needed is=
 to call free(x) instead of delete[] x in a few places.=0AAnd updating comm=
ents, to avoid future mistakes of the same kind. Note that=0Afor a similar =
case, there was already a comment=0A=0A// `malloc()`ed by `string::extract(=
)`=0A=0Ain src/preproc/tbl/table.cpp.=0A=0A> trying to resolve the tbl issu=
e pulled on a long thread of=0A> `const`-incorrectness and an insufficientl=
y well documented internal API for=0A> libgroff's "string" class.=0A=0A> On=
e will observe that diff changed the return type of `string::extract()`=0A>=
 away from the "reform" contemplated above.  That's because I worked backwa=
rds=0A> from how tbl was using it.=0A=0AThe changes that you are considerin=
g here are not needed for resolving the=0AASAN failures. No 'const' / non-'=
const' change and no function signature=0Achange is needed for this ticket.=
=0A=0A=0A    _______________________________________________________=0A=0AR=
eply to this item at:=0A=0A  <https://savannah.gnu.org/bugs/?68585>=0A=0A__=
_____________________________________________=0AMessage sent via Savannah=
=0Ahttps://savannah.gnu.org/=0A
--8323329-424238335-1785672844=:1956354
Content-Type: APPLICATION/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCam80jAAKCRCqLAuaBUf3
Ti1nAQDM0V6Xk5Nsq7UgyKUdQQx5BvClP1YbhBzFGUaLsyYvAQEA6u5vefEU+GbY
tky3nkrqLRHuqGKeQSyjAYBl+Fwz1w8=
=qvtv
-----END PGP SIGNATURE-----

--8323329-424238335-1785672844=:1956354--