| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
| |
DW_LLE_GNU_view_pair is used by gcc -gvariable-location-views=incompat5.
As described in http://www.fsfla.org/~lxoliva/papers/sfn/dwarf6-sfn-lvu.txt
and proposed for DWARF6 https://dwarfstd.org/ShowIssue.php?issue=170427.1
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
| |
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rationale: https://sourceware.org/bugzilla/show_bug.cgi?id=21001
If we don't remove this macro, when try #include <system.h> in
libdw/memory-access.h wont' take effect because
"#define LIB_SYSTEM_H 1"
The compile error:
./../libdw/memory-access.h:390:12: error: implicit declaration of
function ‘bswap_32’ [-Werror=implicit-function-declaration]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
|
|
|
|
|
|
|
| |
It's not accessed symbols in dlfcn.h in eblclosebackend.c and
eblopenbackend.c
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
|
|
|
|
|
|
| |
To assist troubleshooting with intermittent bugs.
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
|
|
|
|
|
|
|
|
| |
__BYTE_ORDER, __LITTLE_ENDIAN and __BIG_ENDIAN are defined by the
gcc/clang preprocessor. BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN are
defined in <endian.h>.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
So we do not need include in each file.
And indeed the macro
#define _(Str) dgettext ("elfutils", Str)
access libintl function dgettext, so it's make more sense
#include <libintl.h> in file eu-config.h
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
|
|
|
|
|
|
|
|
| |
All of these files either #include <system.h> directly or #include "libelfP.h"
And now "libelfP.h also #include <system.h>, so the platform depended include
can be moved to system.h safely
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
|
|
|
|
|
|
|
| |
Otherwise some symbols (lseek, open) might not get the 64bit offset
variants because they don't pick up _FILE_OFFSET_BITS.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When compiling dwfl-report-offline-memory.c on some systems (latest
gcc/glibc and --enable-sanitize-undefined) we might get:
In file included from /usr/include/features.h:490,
from /usr/include/assert.h:35,
from dwfl-report-offline-memory.c:18:
In function ‘read’,
inlined from ‘main’ at dwfl-report-offline-memory.c:68:23:
/usr/include/bits/unistd.h:38:10: error: ‘__read_alias’ specified size 18446744073709551615
exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
38 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
/usr/include/bits/unistd.h: In function ‘main’:
/usr/include/bits/unistd.h:26:16: note: in a call to function ‘__read_alias’ declared with
attribute ‘access (write_only, 2, 3)’
26 | extern ssize_t __REDIRECT (__read_alias, (int __fd, void *__buf,
| ^~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:2461: dwfl-report-offline-memory.o] Error 1
Fix by using the correct types and checking all return values.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method allows to read and report ELF from memory instead of opening
a file. That way arbitrary memory can be worked with, e.g. when coming
from a stream without the need to persist.
Another useful application is for fuzzing, because fuzzers might be able
to track accesses to the memory and change the fuzzer input to cover
more edge cases through more targeted input. Hence, add a new function
along with a test case.
Signed-off-by: Aleksei Vetrov <vvvvvv@google.com>
|
|
|
|
|
|
|
|
| |
A local error() implementation is used when libc does not provide it,
therefore link in libeu.a which contains this function in tests needing
error() API
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
|
|
|
| |
Switch a couple error codes from positive to negative so they aren't
interpreted as file descriptors by the caller.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On 32bit system compiled with -D_TIME_BITS=64, following tests failed:
FAIL: run-debuginfod-archive-test.sh
FAIL: run-debuginfod-archive-groom.sh
FAIL: run-debuginfod-archive-rename.sh
FAIL: run-debuginfod-federation-sqlite.sh
FAIL: run-debuginfod-federation-metrics.sh
FAIL: run-debuginfod-federation-link.sh
due to tests/debuginfod-subr.sh:archive_test failing on
"test $fileame -ot `pwd`", with LHS file having a bogus timestamp.
LHS is generated by debuginfo-find as a cache file.
I'm not sure the fix is the correct way, but
since -D_TIME_BITS=64 mandates -D_FILE_OFFSET_BITS=64 in glibc,
this does work on glibc environment.
Signed-off-by: Taketo Kabe <kabe@sra-tohoku.co.jp>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using instance [COUNT], the instance check is wrong.
instance-- == 0 should be --instance == 0.
Add a testcase run-ar-N.sh that uses -N COUNT with extract and delete
operations checking the right instance was extracted and deleted.
https://sourceware.org/bugzilla/show_bug.cgi?id=28725
Reported-by: panxiaohe <panxh_ran@163.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
| |
ar_mode is encoded as an octal ascii string, not decimal. Add a new
OCT_FIELD macro to decode it.
https://sourceware.org/bugzilla/show_bug.cgi?id=28729
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
| |
Mark noted we need to ditch the last client ->winning_headers along
with the last ->url.
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
|
|
|
|
| |
Signed-off-by: Martin Liska <mliska@suse.cz>
|
|
|
|
|
|
|
|
| |
Embrace case-independent headers, more fully document, handle HTTP \r.
In addition to test case, hand-tested against fedora debuginfod
instances, running federated servers under valgrind.
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
|
|
|
|
|
|
|
|
| |
Debuginfod and debuginfod clients are now equipped to send
and receive http headers prefixed with X-DEBUGINFOD and
print them in verbose mode for more context
Signed-off-by: Noah Sanci <nsanci@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 4b42d9ad, libmicrohttpd's epoll event loop is used when
available in which case we must disable its setting for spawning a thread
per request. This contradicts the debuginfod doc's description of '-C',
which indicates that if this command line option is not given then the
thread pool size is unbounded.
Fix this by using an auto-sized thread pool when '-C' is not given, just
as we do when it's given with no argument. Update the doc's description
of '-C'.
Also use a fixed-size pool even if epoll is not supported. The unbounded
pool config cannot be considered entirely reliable as it appears to cause
random fails in the run-debuginfod-webapi-concurrency test.
Signed-off-by: Aaron Merey <amerey@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
Some of them are for debuginfod command line; others are environment
variables for the embedded client library.
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
|
|
|
|
|
|
|
| |
Split DEBUGINFOD_PATHS and put non-path arguments to the newly created
variable called DEBUGINFOD_EXTRA_ARGS.
Signed-off-by: Martin Liska <mliska@suse.cz>
|
|
|
|
|
|
|
|
| |
When dwarf_extract_source_paths is called, it can call handle_buildid
when a rpm file used dwz. Ignore such internal request in
http_requests_total statistics.
Signed-off-by: Martin Liska <mliska@suse.cz>
|
|
|
|
|
|
| |
Report the file that has such a problem so that one can inspect it.
Signed-off-by: Martin Liska <mliska@suse.cz>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In openSUSE we have the following RPM checker that uses
shopt -s nullglob:
https://github.com/openSUSE/post-build-checks/blob/master/checks/50-check-libtool-deps#L31
The script loads all /etc/profile.d/*.sh files via source $FILE which
can end up by stuck cat (with no arguments):
shopt -s nullglob ; cat "/etc/debuginfod"/*.urls
(stuck)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous code sometimes confused debuginfod with concurrent queries
targeting the same RPM. One thread fetching & prefetching, the other
thread misinterpreted the sudden presence of its target file in the
fdcache as a mere unnecessary prefetch duplicate. But if it was the
other thread's target file, previous code would -skip- it completely,
resulting in a 404 error. New code allows the other thread to also
decompress the target file and return it, and still continue to its
own prefetching process for other files.
There's a performance trade-off here. Another option would be for the
other thread to check the fdcache regularly and abort its own
prefetch/fetch/prefetch loop early in case of a sudden target file
hit. That'd save CPU probably but it'd stop prefetching of later
segments of the input archive, which could save future time.
Automated testing is too time/load sensitive to attempt. Confirmed
working with Martin's stress tester.
Reported-By: Martin Liška <mliska@suse.cz>
Signed-Off-By: Frank Ch. Eigler <fche@redhat.com>
|
|
|
|
| |
Signed-off-by: Andreas Schwab <schwab@suse.de>
|
|
|
|
|
| |
(dwarf_next_cfi): Don't skip processing the augmentation string.
Be more stringent what to accept.
|
|
|
|
|
|
| |
The RISCV_ATTRIBUTES segment is not meant to be loaded.
Signed-off-by: Andreas Schwab <schwab@suse.de>
|
|
|
|
|
|
| |
Handle PT_RISCV_ATTRIBUTES, SHT_RISCV_ATTRIBUTES, DT_RISCV_VARIANT_CC.
Signed-off-by: Andreas Schwab <schwab@suse.de>
|
|
|
|
|
|
|
|
|
|
| |
Adds PT_RISCV_ATTRIBUTES, SHT_RISCV_ATTRIBUTES, PT_AARCH64_MEMTAG_MTE,
RELR definitions, LoongArch relocations.
dwelf_elf_e_machine_string was updated to handle EM_LOONGARCH, and
ebl_dynamic_tag_name was updated to handle the new RELR dynamic tags.
Signed-off-by: Andreas Schwab <schwab@suse.de>
|
|
|
|
|
|
|
| |
Document which lock is held by which thread and how moving the
htab data is coordinated.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
| |
The po/pl.po file already just said Project-Id-Version: elfutils\n
Do the same for the other po files which had somewhat odd names.
The generated pot file will still include the version number too.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
| |
Noticed when debugged test failure:
lowpc: 8049000, highpc: 8049000lx
../sysdeps/i386/crti.S: [2def] '_init' highpc <= lowpc
Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
|
|
|
|
|
|
|
| |
Check if applying of -I and -X during grooming is enabled
before the regular expressions are matched.
Signed-off-by: Josef Cejka <jcejka@suse.de>
|
|
|
|
|
|
|
|
|
| |
Otherwise wait_ready for thread_work_total{role="traverse"} after the
kill -USR1 can be either zero, one or two. We want to see it change to
one first, then after the kill -USR1 it should change to two to be sure
the scan happened after the new binary was created.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
| |
The bug (caught by valgrind) was giving memrchr to end of the buffer.
Also as cleanup, Use d_val not d_ptr for calculating offset.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, eu-readelf is using section headers to dump the dynamic
segment information (print_dynamic -> handle_dynamic).
This patch adds new options to eu-readelf (-D, --use-dynamic)
for (-d, --dynamic).
https://sourceware.org/bugzilla/show_bug.cgi?id=28873
Signed-off-by: Di Chen <dichen@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Dwfl has most of the infrastructure to keep the full unwind state,
including the state of unwound registers per frame using
Dwfl_Thread_Callbacks. But there is no public API to access the state,
except for the PC (dwfl_frame_pc).
This commit adds a new function dwfl_frame_reg to get the value of the
DWARF register number in the given frame.
https://sourceware.org/bugzilla/show_bug.cgi?id=28579
Signed-off-by: Di Chen <dichen@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With GCC 12.1.1, glibc 2.35, -fsanitize=undefined and
-D_FORTIFY_SOURCE=3 we get the following error message:
In file included from /usr/include/ar.h:22,
from ../libelf/libelfP.h:33,
from core-file.c:31:
In function ‘pread’,
inlined from ‘pread_retry’ at ../lib/system.h:188:21,
inlined from ‘elf_begin_rand’ at core-file.c:86:16,
inlined from ‘core_file_read_eagerly’ at core-file.c:205:15:
/usr/include/bits/unistd.h:74:10: error: ‘__pread_alias’ writing 58 or more bytes into a region of size 10 overflows the destination [-Werror=stringop-overflow=]
74 | return __glibc_fortify (pread, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
/usr/include/ar.h: In function ‘core_file_read_eagerly’:
/usr/include/ar.h:41:10: note: destination object ‘ar_size’ of size 10
41 | char ar_size[10]; /* File size, in ASCII decimal. */
| ^~~~~~~
/usr/include/bits/unistd.h:50:16: note: in a call to function ‘__pread_alias’ declared with attribute ‘access (write_only, 2, 3)’
50 | extern ssize_t __REDIRECT (__pread_alias,
| ^~~~~~~~~~
cc1: all warnings being treated as errors
The warning disappears when dropping either -fsanitize=undefined
or when using -D_FORTIFY_SOURCE=2. It looks like a false positive.
But I haven't figured out how/why it happens.
The code is a little tricky to proof correct though. The ar_size
field is a not-zero terminated string ASCII decimal, right-padded
with spaces. Which is then converted with strtoll. Relying on the
fact that the struct ar_hdr is zero initialized, so there will be
a zero byte after the ar_size field.
Rewrite the code to just use a zero byte terminated char array.
Which is much easier to reason about. As a bonus the error disappears.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create indexes on _r_de and _f_de tables
to speed up delete operations called by groom() function.
Primary keys of those tables are optimalized to search rows
by buildids so delete by file and mtime attributes
has to scan the whole table. On large database can single
delete query take minutes and grooming will be aborted
before completion by time limit.
New indexes are compatible with current sqlite schema.
Signed-off-by: Josef Cejka <jcejka@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the stub version of "dwfl_get_debuginfod_client" doesn't name its
parameter, building elfuitls fails on a system with gcc 10.2.1:
-----------------------------------------------------------------------------
$ ./configure ... --disable-libdebuginfod
$ make
Making all in libdwfl
CC debuginfod-client.o
/src/libdwfl/debuginfod-client.c: In function 'dwfl_get_debuginfod_client':
/src/libdwfl/debuginfod-client.c:145:29: error: parameter name omitted
145 | dwfl_get_debuginfod_client (Dwfl *)
| ^~~~~~
make[2]: *** [Makefile:707: debuginfod-client.o] Error 1
-----------------------------------------------------------------------------
This fixes the issue by providing a name for the unused parameter.
Signed-off-by: Shahab Vahedi <shahab@synopsys.com>
|
|
|
|
|
|
|
| |
0.187 was already released, so add new function to 0.188. Also add
NEWS entry and INTUSE.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Dwfl can use debuginfod internally, which was so far totally opaque
to the outside. While the functionality is great for users of the
dwfl API, the long wait times induced by downloading of data over
debuginfod lead to complaints by endusers. To offer them a bit more
insight into the internal ongoings, one can now use e.g.
`debuginfod_set_progressfn` on the handle returned by
`dwfl_get_debuginfod_client` to report download progress.
Rename get_client to dwfl_get_debuginfod_client and make it public.
Unconditionally compile debuginfod-client.c and stub the new public
function and always return NULL when debuginfod integration was
disabled.
Signed-off-by: Milian Wolff <mail@milianw.de>
|
|
|
|
| |
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Arm needs to decode flags and I modeled it after the binutils code.
The same messages are printed. Given the requirement of the interface
and the ABIs the current version of the callback function isn't
sufficient unless one wants to create a stateful interface. The
problem is that most flags need to be interpreted in the context of
the ABI version. So I changed the API to also pass the original flag
value. This shouldn't be a problem because there are no users yet.
There is also a bug in ebl_machine_flag_name. When copying the string
provided by the callback cp is moved past the NUL byte. It should
move to the NUL byte. Otherwise one cannot anything but the first
added flag description. Finally some cosmetic changes (space after
each comma in the output).
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
| |
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
|