| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
We really need build-ids for various things. If the system compiler
doesn't generate build-ids warn and generate them anyway for both the
binaries and the tests.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
| |
Otherwise strip might run against the system libelf which might be too
old or missing.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
| |
For some reason gcc might fail to recognize the assert (0) will never
return and emit an implicit-fallthrough warning. Just add a break to
silence it.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consistently require version-release subpackages so that everything
is updated together. Technically this isn't always required (it is
for elfutils-libelf and elfutils-libs). But this makes things more
consistent and prevents multilib version mismatches.
Also update a Summary and description to match the current Fedora
text.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
| |
Otherwise elfcompress might run against the system libelf which might
be too old or missing.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC10 warns when converting the value of one enum type into another:
debuginfod-client.c:530:24: error: implicit conversion from ‘CURLcode’
to ‘CURLMcode’ [-Werror=enum-conversion]
530 | curl_res = curl_easy_getinfo(target_handle,
| ^
libcurl has different error code enums. The "easy" interfaces return
a CURLcode error. The "multi" interface functions return a CURLMcode.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both the dwfl_linux_kernel_find_elf callback and the
dwfl_linux_kernel_report_offline reporting function only handled
vmlinix images possibly compressed with .gz, .bz2 or .xz extension.
They did not find or handle the much more common vmlinuz compressed
images.
It is not completely clear why we didn't up to now. Support for
compressed ELF files was added in 2009 and the code was updated to
to try to find the .gz, .bz2 or .xz extension variants in 2011.
But not the vmlinuz named variant.
Reported-by: Aaron Merey <amerey@redhat.com>
Tested-by: Frank Ch. Eigler <fche@redhat.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
| |
elfutils-debuginfod depends indirectly already on the client library.
Make that explicit so they are always updated in sync. Which isn't
technically required, but makes things clearer and simpler on updates.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
| |
The versioned library (links) should be in the runtime package.
The debuginfod-client-devel package should just contain the .so
(symlink). This isn't fatal, just sloppy. ldconfig will correct
the missing symlinks when it was missing.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the sample elfutils.spec file more like the fedora
elfutils.spec but with all fedora and rhel specifics removed.
In particular it introduces a new elfutils-libs subpackage and
updates the requires accordingly.
Other cleanups are removal of Group tags, remove dot at end of
Summary tags, add post/postun ldconfig for elfutils-libs and
elfutils debuginfod-client subpackages, remove default
defattr(-,root,root) for file lists and order binaries by name.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
| |
Set version to 0.178.
Update NEWS and elfutils.spec.in.
Regenerate po/*.po files.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
| |
libdw now always needs -lpthread and -ld even when BUILD_STATIC.
BUILD_STATIC is only used when doing a gcov enabled build.
Enable gcov coverage also for debuginfod.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
| |
The run-debuginfod-find.sh now relies on curl to fetch the metrics.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
| |
Use the sqlite3_db_release_memory() call periodically. It should
have no effect except hopefully smaller server memory usage.
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
|
|
|
|
|
|
|
|
| |
Wait for the debuginfod server to finish and use the metrics to see
when a server is ready for the next test instead of sleeping. Also
remove DEBUGINFOD_TEST_WEBAPI_SLEEP.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
| |
Keeps metrics of how many executables, debuginfo and sourcerefs were
found in total for file and rpm scanners.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
| |
The way curl does hostname lookups in multi_curl mode takes a very long
time under valgrind. Replace all localhosti hostnames with 127.0.0.1 so
no lookups are necessary.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
| |
Add a mandatory debuginfod_begin()/_end() call pair to manage a client
object that represents persistent but non-global state. From libdwfl,
dlopen the debuginfod.so client library early on. This hopefully
makes sure that the code (and the libcurl.so dependency) is loaded
before the program goes into multi-threaded mode.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
| |
This webapi extensions allows admins to hook up debuginfod to a
prometheus-compatible monitoring system for general situational
statistics. The metrics are simple enough that local curl requests
can give a user a sense of what's going on. The metrics are
documented as unstable with respect to future versions.
|
|
|
|
|
|
| |
In order to support file/rpm archives that are organized via symlink
trees, add an "-L" option to debuginfod, meaning about the same as for
find(1) or ls(1): to traverse rather than ignore symlinks.
|
|
|
|
|
|
|
|
| |
For interactive clients such as gdb, interruptibility is important for
usability during longer downloads. This patchset adds a
download-progress callback function to the debuginfod client library,
with which a caller app can interrupt a download as well as be
notified of its quantitative progress.
|
|
|
|
|
|
|
|
|
|
| |
Add the server to the debuginfod/ subdirectory. This is a highly
multithreaded c++11 program (still buildable on rhel7's gcc 4.8,
which is only partly c++11 compliant). Includes an initial suite
of tests, man pages, and a sample systemd service.
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
Signed-off-by: Aaron Merey <amerey@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce the debuginfod/ subdirectory, containing the client for a
new debuginfo-over-http service, in shared-library and command-line
forms. Two functions in libdwfl make calls into the client library to
fetch elf/dwarf files by buildid, as a fallback. Instead of normal
dynamic linking (thus pulling in a variety of curl dependencies),
the libdwfl hooks use dlopen/dlsym. Server & tests coming in patch 2.
Signed-off-by: Aaron Merey <amerey@redhat.com>
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
Avoid spurious failure if errno is modified by any other library call in
the test.
Signed-off-by: Andreas Schwab <schwab@suse.de>
|
|
|
|
|
|
|
|
|
| |
In the case of reading an invalid abbrev or when reading an abbrev
concurrently the Dwarf_Abbrev just created might leak because it isn't
needed after all. Introduce libdw_unalloc and libdw_typed_unalloc to
unallocate such Dwarf_Abbrevs so they don't leak.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
| |
Pthread's thread-local variables are highly limited, which makes
it difficult to use many Dwarfs. This replaces that with a
less efficient (or elegant) but more robust method.
Signed-off-by: Jonathon Anderson <jma14@rice.edu>
|
|
|
|
| |
Signed-off-by: Jonathon Anderson <jma14@rice.edu>
|
|
|
|
|
| |
Signed-off-by: Srđan Milaković <sm108@rice.edu>
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
| |
fake_{loc,loclists,addr}_cu are Dwarf_CUs that are created separate from
all the others, so their contents are minimal and mostly initialized by
a calloc. On dwarf_end however, they are freed through the same code path
as all the others, so they call DAH_free like all the others. This changes
that so that these three are exempt from DAH and split-DWARF matters, and
swaps the calloc for a malloc so Memcheck will catch any others.
Signed-off-by: Jonathon Anderson <jma14@rice.edu>
|
|
|
|
|
|
|
|
|
|
|
| |
thread->unwound is only used for set_initial_registers (via
dwfl_thread_state_registers, dwfl_thread_state_register_pc, and a
special case in core_set_initial_registers). At that point,
thread->unwound is always the initial frame, so there's no need to
update it as we unwind the stack. Let's set it to NULL after we do the
initial setup. This simplifies the next change.
Signed-off-by: Omar Sandoval <osandov@fb.com>
|
|
|
|
|
|
|
|
|
| |
dwfl_thread_getframes always frees the state before returning, so
dwfl_getthreads and getthread don't need to do it. The only place
we allocate the state is from dwfl_thread_getframes and we always
free it before returning from that function.
Signed-off-by: Omar Sandoval <osandov@fb.com>
|
|
|
|
|
|
|
|
|
|
|
| |
A corrupt ELF file could contain a .strtab section that wasn't
properly zero terminated. If so we could add a non-terminated string
to the dwelf_strtab functions, which could then crash because they
would read past the .strtab section data.
https://sourceware.org/bugzilla/show_bug.cgi?id=25069
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
| |
Add a missing bounds check, fix an off-by-one bounds check and replace
asserts with error messages.
https://sourceware.org/bugzilla/show_bug.cgi?id=25068
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
| |
If the sh_entsize of the symver section was bogus (bigger than necessary)
then some bogus data would be written out (except that then fails because
pwrite would probably fail). Fix that by ignoring the bogus sh_entsize
and use the actual symver data size.
https://sourceware.org/bugzilla/show_bug.cgi?id=25077
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
unstrip tries to preserve any allocated section offset in an
executable or shared library. If the offset is extremely large that
would cause the disk to fill up because we will write out a file with
lots of padding to put the section contents at that particular
offset. Add a sanity check that makes sure we just error out if there
is such a bogus offset by checking that no offset is larger than the
original ELF file size.
https://sourceware.org/bugzilla/show_bug.cgi?id=25083
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
| |
There were various ways to crash eu-unstrip with bad ELF input
data. Add various tests against bad data and allocate some structures
on the heap instead of on the stack.
https://sourceware.org/bugzilla/show_bug.cgi?id=25082
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
| |
Signed-off-by: Jonathon Anderson <jma14@rice.edu>
|
|
|
|
|
|
|
| |
Uses the stdatomic.h provided by FreeBSD when GCC doesn't (ie. GCC < 4.9)
Signed-off-by: Jonathon Anderson <jma14@rice.edu>
Signed-off-by: Srđan Milaković <sm108@rice.edu>
|
|
|
|
|
|
|
| |
When an input file cannot be opened, include its name
into the error diagnostics.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
|
|
|
|
|
|
|
|
|
|
|
| |
It is already possible to select the symbol table to print by name,
using --symbols=SECTION. This allows printing the dynamic symbol table
with --symbols=.dynsym. binutils readelf allows printing just the
dynamic symbol table by type using --dyn-sym. Add the same option
and document it. Also add a testcase to show --symbols=.dynsym and
--dyn-sym produce the same output.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
| |
All archive members from libebl.a are now in libdw.a. We don't generate
separate backend shared libraries anymore. So remove them from the
elfutils.spec file.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
| |
Use UINT64_C (0) instead of INT64_C (0) to make sure the calculation
is done on unsigned values. Otherwise the gcc undefined sanitizer will
warn:
libcpu/riscv_disasm.c:457:57: runtime error: left shift of negative value -1
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
| |
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Now that we have manpages lets also package them. Rename COPYING to
COPYING-GFDL to make it not clash with the top-level COPYING file.
Also fix up the spec file so it can be used to create a srpm again.
Add eu-stack to the file list.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
| |
The readelf code did parse section numbers, but then failed to actually
dump the section found. Fixed by actually calling the dump function
(either the hex or string variant). Add testcase for readelf -x num.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
If there are just a handful of symbols then memory for them is
allocated on the stack, otherwise the memory is malloced. So before
freeing the memory we need to check the number of entries to know if
the memory was heap allocated or not. But since not all entries might
be used we might have decreased the number of entries to the number
we will actually show. Remember the original symbol entries to not
have a memory leak.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
| |
Don't use the largest executables/libraries to reduce the make check time.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|