[Bug cobol/119521] gcc-cobol generated programs with memory leak
simonsobisch at gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Mar 29 08:04:55 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119521
--- Comment #3 from Simon Sobisch <simonsobisch at gnu dot org> ---
Note: some people will argue that the program should only abort, because/when
exception checking is on.
At least if it is, libgcobol needs to save the location, statement, file and
exception that happened (for later query with related intrinsic, if it isn't
enabled then internally the io status, which should be part of the internal
file structure, is enough).
Maybe the exception parts effectively do a malloc instead of realloc (you'll
possibly memcpy if already allocated, of course)?
More information about the Gcc-bugs
mailing list