mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 12:34:43 +00:00
gdb, dwarf: add assert to dwarf2_get_pc_bounds
In dwarf2_get_pc_bounds we were writing unchecked to *lowpc. This commit adds a gdb_assert to first check that lowpc != nullptr. Approved-by: Tom Tromey <tom@tromey.com>
This commit is contained in:
committed by
Ijaz, Abdul B
parent
69570475c6
commit
06740cf11f
@@ -11092,6 +11092,7 @@ dwarf2_get_pc_bounds (struct die_info *die, unrelocated_addr *lowpc,
|
||||
&& !per_objfile->per_bfd->has_section_at_zero)
|
||||
return PC_BOUNDS_INVALID;
|
||||
|
||||
gdb_assert (lowpc != nullptr);
|
||||
*lowpc = low;
|
||||
if (highpc != nullptr)
|
||||
*highpc = high;
|
||||
|
||||
Reference in New Issue
Block a user