elf_end(): rwlock_fini() with a locked object
by Kurt Roeckx
Hi,
In libelf/elf_end.c:244 you have:
rwlock_fini (elf->lock);
But this lock is always still held when you get there.
I see this:
> Results are undefined if pthread_rwlock_destroy()
> is called when any thread holds rwlock.
[...]
> The pthread_rwlock_destroy() function may fail if:
> [EBUSY]
> The implementation has detected an attempt to destroy the object
> referenced by rwlock while it is locked.
And I get this on Debian's kfreebsd port, resulting in an
assertion failure. I wonder why I'm not getting it on other
ports.
Adding a "rwlock_unlock (elf->lock);" just in front of that
line fixes the problem.
Kurt
12 years
elfutils 0.153 released
by Mark Wielaard
A new release of elfutils is available now at:
https://fedorahosted.org/releases/e/l/elfutils/0.153/
* NEWS *
Version 0.153
libdw: Support reading .zdebug_* DWARF sections compressed via zlib.
libdwfl: Speed up dwfl_module_addrsym.
nm: Support C++ demangling.
ar: Support D modifier for "deterministic output" with no uid/gid/mtime info.
The U modifier is the inverse.
elfutils can be configured with the --enable-deterministic-archives
option to make the D behavior the default when U is not specified.
ranlib: Support -D and -U flags with same meaning.
readelf: Improve output of -wline. Add support for printing SDT elf notes.
Add printing of .gdb_index section.
Support for typed DWARF stack, call_site and entry_value.
strip: Add --reloc-debug-sections option.
Improved SHT_GROUP sections handling.
* GIT SHORTLOG *
Jakub Jelinek (1):
Add DW_OP_GNU_const_type/regval_type/deref_type/convert/reinterpret.
Jan Kratochvil (1):
Fix readelf --debug-dump=loc crash on multiple input files.
Marek Polacek (10):
New test for dwarf_getstring.
Fix typo in TLSDESC_GOT.
Don't segfault at DT_PLTREL case.
Merge branch 'mpolacek/tlsdesc'
Merge branch 'mpolacek/readelf-pltrel-case'
New test for ebl_dynamic_tag_name.
Fix doubled words.
unstrip.c: Mark function as static.
nm.c: Remove unused if/else and parameters.
readelf.c: Assume the right size of an array
Mark Wielaard (25):
Merge over readelf dwarf string additions from dwarf branch dwarfstrings.
BUILT_RPATH vs BUILD_RPATH fixup.
Add new ebl_check_st_other_bits function.
Add support for call_site and entry_value to dwarf.h and readelf.
Fix libdwfl compile issue in case none of the compression libraries are there.
Add support for printing SDT elf notes.
libdw: Sanity check end of section against cu_data () of die->cu.
Add printing of .gdb_index section to readelf.
Merge branch 'mjw/gdb_index'
Merge branch 'mjw/sdt'
dwarf_tag_string fixup GNU_call_site and GNU_call_site_parameter strings.
strip: Handle SHT_GROUP sections better.
strip: Add --reloc-debug-sections option.
Add hello_s390.ko testcase to run-strip-reloc.sh.
strip: --reloc-debug-sections, relocate against any debug section symbol.
Add missing test wrappers to Makefile.am (EXTRA_DIST).
strip.c (relocate): Make offset check overflow-proof.
* libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
derelocate.c (cache_sections): Intern mod->reloc_info check.
Run gawk on config/known-dwarf.awk.
dwfl_module_addrsym update sizeless_sym only if closer to desired addr.
Use index of first global symbol to speed up dwfl_module_addrsym search.
Add NEWS entries for libdwfl, readelf, strip and dwarf.h.
Handle DW_FORM_sec_offset in dwarf_formudata.
Prepare 0.153 release.
Mike Frysinger (1):
Fix use of AC_ARG_ENABLE to handle $enableval correctly.
Petr Machata (5):
Check for truncated section in dwarf_child.
Reject requests for abbreviation with code 0
Handle repeated requests for invalid abbreviation
Merge branch 'pmachata/rerequest-tag'
Improve output of readelf -wline
Roland McGrath (26):
Handle DW_AT_GNU_odr_signature in readelf.
Support reading .zdebug_* DWARF sections compressed via zlib.
Merge branch 'master' of ssh://git.fedorahosted.org/git/elfutils
libdwfl: Clear errno before using its ambient value.
Alpha backend: accept any _GLOBAL_OFFSET_TABLE_ value.
Cosmetic cleanup for new test.
Clean up byte order handling in md5 and sha1 code.
Wire up -u option handling in ar.
readelf: Grok -W/--wide for binutils compatibility.
Ignore files generated by building in the source directory.
Use POSIX.2 shell features in eu_version calculation.
Include *_dis.h headers in dist; generate them only for --enable-maintainer-mode.
Merge branch 'roland/maintainer-gendis'
ar: Fix a return value check.
ar: Implement -D.
Fix elf_from_remote_memory for ELFCLASS64 case.
Fix .eh_frame decoding in the absence of any DWARF.
Don't set LD_LIBRARY_PATH explicitly for command run inside test case.
Support -D in ranlib as in ar.
Grok -U as inverse of -D in ar and ranlib.
ar: Don't crash when given files but no command.
Handle --enable-deterministic-archives to make -D behavior default for ar and ranlib.
Fix warning nit.
Cosmetic cleanups to NEWS.
test-wrapper.sh: Add ${libdir}/elfutils to LD_LIBRARY_PATH.
test-subr.sh: Add ${libdir}/elfutils to LD_LIBRARY_PATH.
Ulrich Drepper (7):
Add demangling support to nm
Update spec file for dependency on C++ library
Improve nm output for BSD and POSIX format
Fix nm output for sysv format
More CL
Color code output of nm and objdump
Update copyright year
12 years
addr2line format specifiers
by Kurt Roeckx
Hi,
addr2line.c:457 has:
char *name = NULL;
if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
&& string[i] == '\0')
parsed = adjust_to_section (name, &addr, dwfl);
switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
And in the portability branch that got changed to:
char *name = NULL;
if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
&& string[i] == '\0')
parsed = adjust_to_section (name, &addr, dwfl);
switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
But I think that that doesn't make sense. Isn't %m the gnu extention,
and that %a now follows the C99 standard and expects a float *?
Kurt
12 years
release soonish
by Roland McGrath
Though overall activity has been fairly low since about last March (wonder
why ;-), there has been more than enough change to warrant a release.
In particular 0.152 doesn't build happily with the newest compilers.
In the absence of strenuous and explained objection, I'm going to merge the
robustify branch into the trunk.
I've just completed -D/-U support in ar/ranlib and the
--enable-deterministic-archvies configure option, for parity
with current binutils.
Mark is going to look into a new elflint-self regression on Fedora 17.
Chances are that is a toolchain bug rather than something for us to fix.
But it needs figured out before we consider a release.
I don't know of anything else anyone intends to work on any time soon.
If you have any plans, please post about them.
Once Mark's investigation comes to a conclusion, I think we should do
0.153.
Thanks,
Roland
12 years