mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-30 09:09:16 +08:00
Fix latent bug in set_is_exec_point_at
valgrind pointed out that the TUI was using uninitialized memory in set_is_exec_point_at. The bug is a missing check against LOA_ADDRESS, causing gdb to examine the uninitialized bits of the "addr" field. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-winsource.c (tui_source_window_base::set_is_exec_point_at): Add check against LOA_ADDRESS.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2019-06-25 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* tui/tui-winsource.c
|
||||||
|
(tui_source_window_base::set_is_exec_point_at): Add check against
|
||||||
|
LOA_ADDRESS.
|
||||||
|
|
||||||
2019-06-25 Tom Tromey <tom@tromey.com>
|
2019-06-25 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* tui/tui-source.c (tui_set_source_content): Don't check before
|
* tui/tui-source.c (tui_set_source_content): Don't check before
|
||||||
|
@ -365,7 +365,7 @@ tui_source_window_base::set_is_exec_point_at (struct tui_line_or_address l)
|
|||||||
|| content_loa.loa == LOA_ADDRESS);
|
|| content_loa.loa == LOA_ADDRESS);
|
||||||
if (content_loa.loa == l.loa
|
if (content_loa.loa == l.loa
|
||||||
&& ((l.loa == LOA_LINE && content_loa.u.line_no == l.u.line_no)
|
&& ((l.loa == LOA_LINE && content_loa.u.line_no == l.u.line_no)
|
||||||
|| (content_loa.u.addr == l.u.addr)))
|
|| (l.loa == LOA_ADDRESS && content_loa.u.addr == l.u.addr)))
|
||||||
new_state = true;
|
new_state = true;
|
||||||
else
|
else
|
||||||
new_state = false;
|
new_state = false;
|
||||||
|
Reference in New Issue
Block a user