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: [PATCH] Fix use-after-free in record_btrace_start_replaying


> -fsanitize=address showed a use-after-free in record_btrace_start_replaying.
> The bug occurred because get_thread_current_frame returned a frame_info,
> but this object was then invalidated before the return by
> ~scoped_restore_current_thread.
> 
> This patch fixes the problem by renaming get_thread_current_frame and having
> it return a frame id.
> 
> gdb/ChangeLog
> 2018-10-19  Tom Tromey  <tom@tromey.com>
> 
> 	* record-btrace.c (get_thread_current_frame_id): Rename from
> 	get_thread_current_frame.  Return a frame_id.
> 	(record_btrace_start_replaying): Update.

Looks good to me.

Thanks,
Markus.

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


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