This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix ASAN crash for gdb.compile/compile.exp
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Tue, 19 May 2015 14:42:53 +0100
- Subject: Re: [patch] Fix ASAN crash for gdb.compile/compile.exp
- Authentication-results: sourceware.org; auth=none
- References: <20150418170138 dot GA9123 at host1 dot jankratochvil dot net> <867fs4ssb6 dot fsf at gmail dot com> <20150519123536 dot GA27983 at host1 dot jankratochvil dot net>
Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> Now compile_object_run() called from line
> (gdb) compile code puts("hello")
> has finished for a long time. But we still need to have that injected code
> OBJFILE valid when GDB is executing it. Therefore OBJFILE is freed only from
> destructor of the frame #1.
Hmm, you are right.
>
> At the patched line of call_function_by_hand_dummy() the dummy frame
> destructor has not yet been run but it will be run before the fetched NAME
> will get used.
>
> In fact I do not see now how to fix it differently than what the patch does.
Your patch is fine by me.
--
Yao (éå)