Project

General

Profile

Actions

Bug #18081

closed

addr2line.c: Wrong section for `DW_AT_ranges`

Added by xtkoba (Tee KOBAYASHI) over 2 years ago. Updated almost 2 years ago.

Status:
Feedback
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.0dev (2021-08-16T00:07:09Z master 4cc44bd819) [x86_64-linux]
[ruby-core:104954]

Description

When both .debug_rnglists and .debug_ranges sections exist, DW_AT_ranges can refer to a wrong section, potentially causing a segmentation fault.

DW_AT_ranges should refer to .debug_rnglists for DWARF version 5, and .debug_ranges for DWARF version 4 and earlier.

A patch is attached to fix this.

Note that this patch will not be cleanly applied before patches posted in #17823 and #17052.


Files

ruby-addr2line-section-for-DW_AT_ranges.patch (1.73 KB) ruby-addr2line-section-for-DW_AT_ranges.patch addr2line.c: Correct section for `DW_AT_ranges` xtkoba (Tee KOBAYASHI), 08/17/2021 02:02 PM

Updated by mame (Yusuke Endoh) almost 2 years ago

  • Status changed from Open to Feedback

@xtkoba (Tee KOBAYASHI) I'm not familiar with DWARF. Could you show a reference to justify your change, for example the section of the DWARF spec that explains the spec change?

Actions

Also available in: Atom PDF

Like0
Like0