]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libctf: open: fix closing of children with imported parents
authorNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 17:09:02 +0000 (18:09 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 17:09:02 +0000 (18:09 +0100)
commit176afc3c8b97b66a724636b0f5ad75a8587e2729
tree13b1345381a8f00960c8271968daaee715c8c392
parent908a7e71671ea2ecafed060866d9fd6a665a79a2
libctf: open: fix closing of children with imported parents

Closing a parent dict for the last time erases all its types and strings,
which makes type and string lookups in any surviving children impossible
from then on.  Since children hold a reference to their parent, this can
only happen in ctf_dict_close of the last child, after the parent has
been closed by the caller as well.  Since DTD deletion now involves
doing type and string lookups in order to clean out the name tables,
close the parent only after the child DTDs have been deleted.
libctf/ctf-open.c