[bug #68585] [pic, tbl] code not "ASAN_OPTIONS=alloc_dealloc_mismatch=1" clean
"G. Branden Robinson" <[email protected]> Fri, 31 Jul 2026 15:58:29 -0400 (EDT)
| Newsgroups | gmane.comp.printing.groff.bugs |
|---|---|
| Message-ID | <[email protected]> |
--8323329-1714636915-1785527909=:1905460 Content-Type: TEXT/plain; CHARSET=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Content-Disposition: inline Follow-up Comment #1, bug #68585 (group groff):=0A=0A[comment #0 original s= ubmission:]=0A=0A> Here's a sketch of my current plan of attack:=0A> =0A> *= Kill off straggling uses of malloc()/calloc()/realloc()/free() in=0A> _src= /libs/libgroff/string.cpp_.=0A> * string::contents() should return a `const= char *`.=0A> * string::extract() should return a `char *`.=0A> * Neither f= unction should worry about internal nulls; they should return a=0A> `char` = sequence up to the first null byte. The return type will imply as=0A> much= to any experienced C/C++ programmer anyway.=0A> * Users of the `string` cl= ass that employ _either_ `contents()` or=0A> `extract()` can be flagged as = potential migrants to the C++ standard `string`=0A> class.=0A> =0A> Here's = a diff of how far I pulled the yarn before giving up on trying to=0A> solve= this problem for _groff_ 1.25.=0A=0AOne will observe that diff changed the= return type of `string::extract()`=0A_away_ from the "reform" contemplated= above. That's because I worked=0Abackwards from how _tbl_ was using it.= =0A=0AA more successful reform, I suspect, will involve an audit of=0A`stri= ng::extract()`'s callers and migrate them to `string::contents()` where=0Ap= ossible. (In some places, the duplicated string _is_ mutated.)=0A=0AEither= change is too much disruption for the _groff_ 1.25 development cycle at=0A= this point.=0A=0A=0A ___________________________________________________= ____=0A=0AReply to this item at:=0A=0A <https://savannah.gnu.org/bugs/?685= 85>=0A=0A_______________________________________________=0AMessage sent via= Savannah=0Ahttps://savannah.gnu.org/=0A --8323329-1714636915-1785527909=:1905460 Content-Type: APPLICATION/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCamz+ZQAKCRCqLAuaBUf3 TrKSAPsEGfLccKbTiTYt3/dLvWLv4+K2ABpwIu8xXWNAGgLU7QD7BuXr/5Vcgl97 49AqIk0tXFmlJ3rNHCVzI8W2Ehfpew0= =k8U1 -----END PGP SIGNATURE----- --8323329-1714636915-1785527909=:1905460--