This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: Crash free()ing unallocated memory.
- From: Tom Tromey <tromey at redhat dot com>
- To: ppluzhnikov at google dot com (Paul Pluzhnikov)
- Cc: archer at sourceware dot org
- Date: Thu, 06 Nov 2008 11:40:11 -0700
- Subject: Re: Crash free()ing unallocated memory.
- References: <20081106030343.9A0193A6B0C@localhost>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:
Paul> Possible fixes:
Paul> - add a "flag_builtin" flag to struct main_type to mark builtin types,
Paul> avoid them above
Paul> - scan and avoid all members of struct builtin_type (error prone:
Paul> what if a new member is added).
Paul> - ???
I think we should add a new flag to pyty_type_object, and set the flag
in clean_up_objfile_types.
This avoids changes to the gdb core for an issue that, I think, can be
confined entirely in the python code.
FYI, I think scanning builtin_types definitely would not work since we
can have objfile-less types via preserve_one_value.
Feel free to make the fix. Otherwise I will do it when I finish my
current patch.
Tom