diff options
author | Tom Tromey <tom@tromey.com> | 2018-07-28 14:19:09 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-10-23 13:45:33 -0600 |
commit | 79b8d3b090bcbfbcffa8bdd195476c6db172273b (patch) | |
tree | 279d15061079bf9051d8f38331e7f3c993a52083 /gdb/infrun.c | |
parent | f47998d69f8d290564c022b010e63d5886a1fd7d (diff) | |
download | gdb-79b8d3b090bcbfbcffa8bdd195476c6db172273b.zip gdb-79b8d3b090bcbfbcffa8bdd195476c6db172273b.tar.gz gdb-79b8d3b090bcbfbcffa8bdd195476c6db172273b.tar.bz2 |
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-23 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.
Diffstat (limited to 'gdb/infrun.c')
0 files changed, 0 insertions, 0 deletions