This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Remove make_cleanup_htab_delete


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> On 11/20/2016 08:37 PM, Tom Tromey wrote:
>> This removes make_cleanup_htab_delete in favor of destructors,
>> building on an earlier patch that added the htab_up typedef.

Pedro> We could probably convert all of these to std::unordered_map,
Pedro> but meanwhile ...

It turns out that parts of this patch were incorrect.
In particular, some of the htabs were allocated on obstacks, and so
changing these to htab_up caused a use-after-free due to changing the
ordering of the obstack and htab destruction.

I have a new patch that fixes this by going a bit further and changing
these htabs to unordered_set.  I'll send it a bit later.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]