https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119521
--- Comment #4 from Simon Sobisch <simonsobisch at gnu dot org> --- Am 28. März 2025 15:40:49 GMT-12:00 schrieb "rdubner at gcc dot gnu.org" <gcc-bugzi...@gcc.gnu.org>: >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119521 > >--- Comment #2 from Robert Dubner <rdubner at gcc dot gnu.org> --- >Additional: The leaking memory is because exception checking is turned on. >Still looking... > Note: one could 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)?