[LLVMbugs] [Bug 19563] New: .debug_ranges section is broken
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Apr 25 12:04:58 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19563
Bug ID: 19563
Summary: .debug_ranges section is broken
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: samsonov at google.com
CC: dblaikie at gmail.com, echristo at gmail.com,
eugeni.stepanov at gmail.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
$ cat tmp/symbolizer/a.cc
#include <stdio.h>
void f() {
int * volatile p = new int;
if (*p)
printf("zzz\n");
}
int main(void) {
f();
return 0;
}
$ ./bin/clang++ -O2 -g -fsanitize=memory tmp/symbolizer/a.cc
$ readelf -wi a.out
<...>
<1><104a1a>: Abbrev Number: 5 (DW_TAG_subprogram)
<104a1b> DW_AT_name : (indirect string, offset: 0x352bf): main
<104a1f> DW_AT_decl_file : 1
<104a20> DW_AT_decl_line : 9
<104a21> DW_AT_type : <0x104a4f>
<104a25> DW_AT_external : 1
<104a25> DW_AT_accessibility: 1 (public)
<104a26> DW_AT_low_pc : 0x86570
<104a2e> DW_AT_high_pc : 0xb4
<104a32> DW_AT_frame_base : 1 byte block: 57 (DW_OP_reg7 (rsp))
<104a34> Unknown AT value: 3fe7: 1
<2><104a34>: Abbrev Number: 6 (DW_TAG_inlined_subroutine)
<104a35> DW_AT_abstract_origin: <0x1049ea>
<104a39> DW_AT_ranges : 0x5de90
<104a3d> DW_AT_call_file : 1
<104a3e> DW_AT_call_line : 10
$ readelf -wR a.out
<...>
0005de90 000000000010ca46 000000000010cac4
0005de90 000000000010cada 000000000010cae4
0005de90 <End of list>
Address ranges for inlined subroutine in .debug_ranges are wrong.
The addresses in range list from .debug_ranges should be relative to
the base address (DW_AT_low_pc) of compilation unit that refers this range
list. In this example the addresses written in the binary are absolute. If I
subtract base address of an a.cc CU (0x864c0) from these addresses, range lists
become correct.
I haven't found a revision which broke this yet. Working on that.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140425/f241fac3/attachment.html>
More information about the llvm-bugs
mailing list