https://sourceware.org/bugzilla/show_bug.cgi?id=26321
Bug ID: 26321
Summary: Possible bug in dwarf_getlocation
Product: elfutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libdw
Assignee: unassigned at sourceware dot org
Reporter: gprocida+abigail at google dot com
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
At commit 15495182302edbe0142101ec3a09e478901ab994.
The check_constant_offset helper is called from a few places.
In one instance, a return value of 0 from check_constant_offset would result in
dwarf_getlocation also returning 0. In the other instances, this is prevented
by treating the zero case differently from the non-zero one.
Making the obvious "fix" at libdw/dwarf_getlocation.c line 670 breaks one test.
```
FAIL: run-exprlocs.sh
=====================
--- varlocs.out 2020-07-30 14:49:10.840263557 +0100
+++ - 2020-07-30 14:49:10.848279328 +0100
@@ -23,15 +23,13 @@
decl_file (data1)
decl_line (data1)
type (ref4)
- data_member_location (data1)
- [0,ffffffffffffffff) {plus_uconst(0)}
+ data_member_location (data1) {plus_uconst(0)}
[4d] member "small_pad"
name (strp)
decl_file (data1)
decl_line (data1)
type (ref4)
- data_member_location (data1)
- [0,ffffffffffffffff) {plus_uconst(40)}
+ data_member_location (data1) {plus_uconst(40)}
[5a] string_type
byte_size (data1)
[5c] base_type "integer(kind=4)"
FAIL run-exprlocs.sh (exit status: 1)
```
It's very possible the existing code is working as intended, in which case
please just close this report.
--
You are receiving this mail because:
You are on the CC list for the bug.