[Bug libdw/28220] New: dwarf_location_attr returns high-bit junk from .debug_addr when fetching 32-bit addresses

2021-08-11 Thread gprocida at google dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28220

Bug ID: 28220
   Summary: dwarf_location_attr returns high-bit junk from
.debug_addr when fetching 32-bit addresses
   Product: elfutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: libdw
  Assignee: unassigned at sourceware dot org
  Reporter: gprocida at google dot com
CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

In libdw, there are snippets of code of the form:

dwarf_formaddr.c:
  71   if (address_size == 4)
  72 *addr = read_4ubyte_unaligned (dbg, datap);
  73   else
  74 *addr = read_8ubyte_unaligned (dbg, datap);

However, when I use the public interfaces in order to read locations, it goes
wrong when for Clang-built 32-bit objects with DWARF 5 debug information, with
extra junk in the upper 32 bits.

The attachment contains a full example. It's possible that I'm using the API
incorrectly. This is the debug output for the problematic case:

clang 5 32
bias=0
bias=0
dwarf=0x55f103cf8a10 elf=0x55f103cf5610
 version=5 unit_type=1 cu_die.addr=0x7fc3032e0078 cu_die.cu=0x55f103cf8e98
cu_die.abbrev=0 sub_die.addr=0 sub_die.cu=0 sub_die.abbrev=0
 unit_id=0 address_size=4 offset_size=4
  dwarf_string_attr(die, 1b)
 comp_dir=/usr/local/google/home/gprocida/dev/libabigail/b195152239
   child.addr=0x7fc3032e008a child.cu=0x55f103cf8e98 child.abbrev=0
dwarf_string_attr(die, 3)
dwarf_bool_attr(die, 3f)
dwarf_location_attr(die, 2)
attribute code=0x2 form=0x18 (expected=18)
 expr=0x55f103cf8ff8 exprlen=1
 op.atom=a1 op.number=0 op.number2=0 op.offset=0
 result code=0x11 form=0x1 (expected=1)
 address=0x100040001
   variable name=x name2=x external=1 location=100040001
   child.addr=0x7fc3032e0095 child.cu=0x55f103cf8e98 child.abbrev=0
   child.addr=0x7fc3032e0099 child.cu=0x55f103cf8e98 child.abbrev=0
dwarf_string_attr(die, 3)
dwarf_bool_attr(die, 3f)
dwarf_location_attr(die, 2)
attribute code=0x2 form=0x18 (expected=18)
 expr=0x55f103cf9048 exprlen=1
 op.atom=a1 op.number=1 op.number2=0 op.offset=0
 result code=0x11 form=0x1 (expected=1)
 address=0x626544010004
   variable name=y name2=y external=1 location=626544010004

Note that variable x's address includes variable y's address as the upper 32
bits and that variable y has junk in the upper 32 bits.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug libdw/28220] dwarf_location_attr returns high-bit junk from .debug_addr when fetching 32-bit addresses

2021-08-11 Thread gprocida at google dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28220

--- Comment #1 from gprocida at google dot com ---
Created attachment 13614
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13614&action=edit
test case

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug libdw/28220] dwarf_location_attr returns high-bit junk from .debug_addr when fetching 32-bit addresses

2021-08-11 Thread gprocida at google dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28220

gprocida at google dot com changed:

   What|Removed |Added

 Blocks||28191


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=28191
[Bug 28191] DWARF5 .debug_addr support
-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug debuginfod/27950] separate common "debuginfod-client" docs into a new man page

2021-08-11 Thread fche at redhat dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=27950

Frank Ch. Eigler  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #1 from Frank Ch. Eigler  ---
merged to master: 
commit 969880e68071cefd7170a53b267379f0b32d6fbd
Author: Alice Zhang 
Date:   Wed Aug 4 16:50:44 2021 -0400

debuginfod-doc: PR27950 - Remove redanduncies in man page.

Create a new file, debuginfod-client-config.7, that holds all
environment variables and cache control files related info. Get rid of
repetitive definitions in three other files, instead, those files will
include the content of new file. Any future modification related to
environment variables and cache files will only require changes in one
file.

Signed-off-by: Alice Zhang 
Signed-off-by: Frank Ch. Eigler 

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Buildbot failure in Wildebeest Builder on whole buildset

2021-08-11 Thread buildbot
The Buildbot has detected a new failure on builder elfutils-centos-x86_64 while 
building elfutils.
Full details are available at:
https://builder.wildebeest.org/buildbot/#builders/1/builds/799

Buildbot URL: https://builder.wildebeest.org/buildbot/

Worker for this Build: centos-x86_64

Build Reason: 
Blamelist: Alice Zhang 

BUILD FAILED: failed test (failure)

Sincerely,
 -The BuildbotThe Buildbot has detected a new failure on builder 
elfutils-debian-amd64 while building elfutils.
Full details are available at:
https://builder.wildebeest.org/buildbot/#builders/2/builds/793

Buildbot URL: https://builder.wildebeest.org/buildbot/

Worker for this Build: debian-amd64

Build Reason: 
Blamelist: Alice Zhang 

BUILD FAILED: failed test (failure)

Sincerely,
 -The BuildbotThe Buildbot has detected a new failure on builder 
elfutils-fedora-x86_64 while building elfutils.
Full details are available at:
https://builder.wildebeest.org/buildbot/#builders/3/builds/797

Buildbot URL: https://builder.wildebeest.org/buildbot/

Worker for this Build: fedora-x86_64

Build Reason: 
Blamelist: Alice Zhang 

BUILD FAILED: failed test (failure)

Sincerely,
 -The BuildbotThe Buildbot has detected a new failure on builder 
elfutils-debian-i386 while building elfutils.
Full details are available at:
https://builder.wildebeest.org/buildbot/#builders/4/builds/793

Buildbot URL: https://builder.wildebeest.org/buildbot/

Worker for this Build: debian-i386

Build Reason: 
Blamelist: Alice Zhang 

BUILD FAILED: failed test (failure)

Sincerely,
 -The BuildbotThe Buildbot has detected a new failure on builder 
elfutils-fedora-s390x while building elfutils.
Full details are available at:
https://builder.wildebeest.org/buildbot/#builders/10/builds/763

Buildbot URL: https://builder.wildebeest.org/buildbot/

Worker for this Build: fedora-s390x

Build Reason: 
Blamelist: Alice Zhang 

BUILD FAILED: failed test (failure)

Sincerely,
 -The Buildbot