This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems with dwarf-getmacros test


Hi,

I frequently get failures from the run-dwarf-getmacros.sh test, on testfile-macros:0xb. The test repeatedly outputs "(null)" instead of the actual macros and then runs into the assert at dwarf-getmacros.c:50. The failure is very nondeterministic, though. I haven't found a reliable way to trigger it.

Further examination reveals that the __libdw_in_section check in READ_AND_RELOCATE (libdwP.h:656), when called from __libdw_read_offset seems to be bogus. The "return -1" in there is what produces the null results and ultimately the assert. Experiments show that the address is frequently not in the section we're checking there, but still valid. Just dropping the check makes the test succeed.

I'm currently at a loss about why this happens. One thing that strikes me was that the additional dbg_ret mechamism was added in 2012 with commit 775375e3, but the check in READ_AND_RELOCATE was not adapted then.

However, the address is also not necessarily in dbg_ret at that point. Checking dbg_ret in addition to dbg still fails sometimes, and also that wouldn't explain the nondeterminism.

Ulf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]