mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 07:08:01 +08:00
PR22186, divide-by-zero in decode_line_info
PR 22186 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero rather than dividing by zero.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2017-09-24 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR 22186
|
||||||
|
* dwarf2.c (decode_line_info): Fail on lh.line_range of zero
|
||||||
|
rather than dividing by zero.
|
||||||
|
|
||||||
2017-09-24 Alan Modra <amodra@gmail.com>
|
2017-09-24 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 22169
|
PR 22169
|
||||||
|
@ -2437,6 +2437,8 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
|
|||||||
case DW_LNS_set_basic_block:
|
case DW_LNS_set_basic_block:
|
||||||
break;
|
break;
|
||||||
case DW_LNS_const_add_pc:
|
case DW_LNS_const_add_pc:
|
||||||
|
if (lh.line_range == 0)
|
||||||
|
goto line_fail;
|
||||||
if (lh.maximum_ops_per_insn == 1)
|
if (lh.maximum_ops_per_insn == 1)
|
||||||
address += (lh.minimum_instruction_length
|
address += (lh.minimum_instruction_length
|
||||||
* ((255 - lh.opcode_base) / lh.line_range));
|
* ((255 - lh.opcode_base) / lh.line_range));
|
||||||
|
Reference in New Issue
Block a user