Use auto_obstack in objfile
authorTom Tromey <tom@tromey.com>
Tue, 2 Aug 2022 17:57:20 +0000 (11:57 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 3 Aug 2022 19:26:58 +0000 (13:26 -0600)
commit075e4d6d95681bfbf53e849c2802a75d1d4cbdca
tree603d88f26edb4f995a0f4820b0cd7c8bc46c76e3
parent98badbfdc222d1d7f346046f23a64522b88d22a0
Use auto_obstack in objfile

This changes objfile to use an auto_obstack.  This helps prevent
use-after-free bugs, because it ensures that anything allocated on the
objfile obstack will live past the point at which the registry object
is destroyed.
gdb/objfiles.c
gdb/objfiles.h