aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-31Merge "dwfl: fix potential overflow when reporting on kernel modules"android-t-preview-1android-s-v2-beta-3android-t-preview-1android-s-v2-beta-3Treehugger Robot
2022-01-26dwfl: fix potential overflow when reporting on kernel modulesMatthias Maennich
dwfl_linux_kernel_report_modules_ has an outstanding ancient bug when reading kernel module information from a modules list file. The target buffer for the module name was sized too small to hold potential values. Fix that by increasing the value to account for the null termination. In practice, this unlikely ever happened, but it now got diagnosed by LLVM as part of a stricter -Wfortify-source implementation [1]: libdwfl/linux-kernel-modules.c:1019:7: error: 'sscanf' may overflow; destination buffer in argument 3 has size 128, but the corresponding specifier may require size 129 [-Werror,-Wfortify-source] modname, &modsz, &modaddr) == 3) [1] https://github.com/llvm/llvm-project/commit/2db66f8d48beeea835cb9a6940e25bc04ab5d941 Suggested-by: Paul Pluzhnikov <ppluzhnikov@google.com> Signed-off-by: Matthias Maennich <maennich@google.com> Test: Builds with new clang without warnings (cherry picked from commit 2e3bc18672f0cede0332ae3194eb2e33d4cc5fd7) Change-Id: I19342bb64ff5b973aa3f4c65abed8123eab8367d
2021-11-18Merge changes Ie8f964b5,I644650d7 am: be508084daTreehugger Robot
Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1895360 Change-Id: Ieef9602118d5afa007831783893f296de1cd0e7f
2021-11-18Merge changes Ie8f964b5,I644650d7Treehugger Robot
* changes: drop recursive documentation symlinks Merge tag 'elfutils-0.186' into master
2021-11-17drop recursive documentation symlinksMatthias Maennich
This upsets soong during globbing. Signed-off-by: Matthias Maennich <maennich@google.com> Change-Id: Ie8f964b5b2139dce89ac7432613e18478fe195bd
2021-11-16Merge "Extend visibility to //external/stg" am: eed13d52bcMatthias Maennich
Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1892422 Change-Id: I1fb62b9b5eb3e1132912406388ac0997ce4a0118
2021-11-16Merge "Extend visibility to //external/stg"Matthias Maennich
2021-11-16Merge tag 'elfutils-0.186' into masterMatthias Maennich
elfutils 0.186 release * tag 'elfutils-0.186': Prepare for 0.186 PR28430: debuginfod: support --passive mode libdw, readelf: Read inlining info in NVIDIA extended line map libdw: dwarf_elf_begin should use either plain, dwo or lto DWARF sections. Improve building with LTO PR28514: debuginfod: limit groom operation times NEWS: make automake check-news / dist happy NEWS: list some 0.186 debuginfod client & server features PR28240: debuginfod client root-safe negative caching libdw: Don't pass NULL to dwarf_peel_type libdw: Use signedness of subrange type to determine array bounds debuginfod-client: Stick to http:// + https:// + file:// protocols PR27783: switch default debuginfod-urls to drop-in style files tests: Handle dwarf_attr_string returning NULL in show-die-info.c elflint.c: Don't dereference databits if bad PR28242: debuginfod prometheus metric widening RISC-V: PR27925 Add support for LP64 and LP64F ABIs return values debuginfod: Remove checking for unsafe headers debuginfod: Query debuginfod servers before printing response debuginfod: PR27277 - Describe retrieved files when verbose debuginfod: PR28034 - No longer escape '/', and loop efficiency PR28339: debuginfod: fix groom/scan race condition on just-emptied queue debuginfod: Add endl after "fdcache emergency flush for filling tmpdir" log lib: Make error.c more like error(3) libdw: set address size, offset size and version on fake CUs tests: Don't fail run-debuginfod-fd-prefetch-caches.sh if grep -c fails findtextrel: do not use unbound alloca tests: Cleanup error handling and don't share cache between servers/client Use xasprintf instead of asprintf followed by error(EXIT_FAILURE) Introduce xasprintf Remove redundant casts of memory allocating functions returning void * src: add -Wno-error=stack-usage= to AM_LDFLAGS tests: Make sure to wait for initial scan and groom cycle earlier tests: Make sure to wait for initial scan and groom cycle tests: Only export DEBUGINFOD_URLS when necessary tests: Print metrics for both ports on error and fix port selection tests: Set DEBUGINFOD_CACHE_PATH for run-debuginfod-{file,query-retry}.sh tests: Make sure all debuginfod tests use a clean database and cache. tests: Add debuginfod-subr.sh to EXTRA_DIST debuginfod: Fracture tests/run-debuginfod-find.sh into specific tests configure.ac: rework gnu99 ext check to allow clang debuginfod: Turn -d ":memory:" into -d "file::memory:?cache=shared" tests: Use fresh separate databases for debuginfd forwarded-ttl-limit debuginfod: PR27917 - protect against federation loops Add lib/error.c lib: avoid potential problems with `-fno-common` lib: remove unused `STROF` definition (NFC) handle libc implementations which do not provide `error.h` debuginfod, elfclassify: remove unnecessary header inclusion lib: remove usage of `sys/cdefs.h` PR27950 - package new debuginfod-client-config.7 man page in rpm PR28249: correct debuginfod after-you locking debuginfod-doc: PR27950: make distcheck happy debuginfod-doc: PR27950 - Remove redanduncies in man page. tests: Allow an extra pthread_kill frame in backtrace tests debuginfod: PR27982 - added DEBUGINFOD_MAXSIZE and DEBUGINFOD_MAXTIME update Japanese translation debuginfod: PR27983 - ignore duplicate urls lib: Add static inline reallocarray fallback function debuginfod: PR28034 - client-side %-escape url characters debuginfod: Minor run-debuginfod-find.sh test fixes libelf: Optimize elf_strptr.c validate_str by checking last char first readelf: Pull advance_pc() in file scope debuginfod: PR25978 - Created the prefetch fdcache PR27531: retry within default retry_limit will be supported. debuginfod: PR27711 - Use -I/-X regexes during groom phase tests: Fix EXTRA_DIST typo in testfile-largealign.o.bz2 libelf: Fix unaligned d_off offsets for input sections with large alignments readelf: Handle line tables without line number statements correctly readelf: Fix error message when two attribute names differ in in compare_listptr. unstrip: Always check gelf_getrel[a] results strip: Always check gelf_update results. debuginfod-client: Fix client dereference when calloc fails. run-debuginfod-find.sh: Disable valgrind for debuginfod client cache tests debuginfod test: fix groom/stale race condition debuginfod tests: tolerate 000-perm files in cache-copy test debuginfod tests: try to generate diagnostics more reliably on error libdwfl: fix potential NULL pointer dereference when reading link map PR27863: debuginfod optimization for concurrent requests elflint: fix undefined 'buffer_left' reference Prepare for 0.185 PR27859: correct 404-latch bug in debuginfod client reuse elfcompress: fix exit status in case of an error elfcompress: remove redundant assignment elfcompress: fix exit status regression in case of "Nothing to do" Come up with startswith function. elfutils.spec: Add procps as a %check BuildRequires:. Prepare for 0.184 libdw: Document and handle DW_FORM_indirect in __libdw_form_val_compute_len debuginfod: debuginfod client should cache negative results. PR27571: debuginfod client cache - file permissions PR26125: debuginfod client cache - rmdir harder libdw: handle DW_FORM_indirect when reading attributes PR27701: debuginfod client: encourage reused debuginfod_client objects po: update XGETTEXT_OPTIONS debuginfod: only update database stats once per groom debuginfod: Recognize .debug_*-less symtab-laden files as debuginfo nm: Fix file descriptor leak on dwfl_begin failure. unstrip: Fix small leak in handle_output_dir_module. ar: Always close newfd in do_oper_insert. doc/debuginfod.8: fix wrong parameter name for .deb files in description debuginfod: Set child thread names via pthread_setname_np() debuginfod-client: Don't compare a double to a long Update Polish translation Update POTFILES.in build: Check for -Wno-packed-not-aligned support build: Check for -Wtrampolines support debuginfod-client: Fix typo in curl feature detection readelf: Sanity check verneed and verdef offsets in handle_symtab. elfcompress: Replace cleanup() with label build: Check for -Wimplicit-fallthrough=5 separately tests: Pull new_data_buf() into file scope for elfstrmerge. tests: Pull newsecndx() info file scope for elfstrmerge elfcompress: Pull get_sections() into file scope elfcompress: Pull get_section() into file scope elfcompress: Pull set_section() into file scope unstrip: Remove nested next() function unstrip: Pull warn() into file scope unstrip: Inline find_unalloc_section() into only caller unstrip: Pull check_match() into file scope unstrip: Pull adjust_reloc() into file scope elflint: Pull left() in file scope elflint: Pull pos() info file scope debuginfod: filter webapi for bad keywords early testsuite: run-debuginfod-find.sh: Fix grooming test indeterminacy NEWS: add a debuginfod blurb re. bsdtar testsuite: run-debuginfod-find.sh: Be more verbose on failure readelf: Type DIE offset is from start of CU. readelf, libdw: blocks aren't expressions for DWARF version 4 PR27413: use bsdtar to unpack deb-related formats tests: Quote make variables in TESTS_ENVIRONMENT elfutils.spec.in: Escape %%check in comment. tests/run-debuginfod-find.sh: skip test if cpio isn't available. Signed-off-by: Matthias Maennich <maennich@google.com> Change-Id: I644650d79de63796c6acaaabb1474907a6043a6d
2021-11-16Extend visibility to //external/stgMatthias Maennich
Bug: 188176217 Signed-off-by: Matthias Maennich <maennich@google.com> Change-Id: I93b76613968138d8291033cd17d5033b5972c909
2021-11-10Prepare for 0.186Mark Wielaard
Set version to 0.186 Update NEWS and elfutils.spec.in Regenerate po/*.po files Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-11-10PR28430: debuginfod: support --passive modeFrank Ch. Eigler
Add support for a limited mode for debuginfod that uses a pure read-only sqlite index. This mode is useful for load spreading based on naively shared or replicated databases. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-11-10libdw, readelf: Read inlining info in NVIDIA extended line mapJohn M Mellor-Crummey
As of CUDA 11.2, NVIDIA added extensions to the line map section of CUDA binaries to represent inlined functions. These extensions include - two new fields in a line table row to represent inline information: context, and functionname, - two new DWARF extended opcodes: DW_LNE_NVIDIA_inlined_call, DW_LNE_NVIDIA_set_function_name, - an additional word in the line table header that indicates the offset in the .debug_str function where the function names for this line table begin, and A line table row for an inlined function contains a non-zero "context" value. The “context” field indicates the index of the line table row that serves as the call site for an inlined context. The "functionname" field in a line table row is only meaningful if the "context" field of the row is non-zero. A meaningful "functionname" field contains an index into the .debug_str section relative to the base offset established in the line table header; the position in the .debug_str section indicates the name of the inlined function. These extensions resemble the proposed DWARF extensions (http://dwarfstd.org/ShowIssue.php?issue=140906.1) by Cary Coutant, but are not identical. This commit integrates support for handling NVIDIA's extended line maps into elfutil's libdw library, by adding two functions dwarf_linecontext and dwarf_linefunctionname, and the readelf --debug-dump=line command line utility. Signed-off-by: John M Mellor-Crummey <johnmc@rice.edu> Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-11-09libdw: dwarf_elf_begin should use either plain, dwo or lto DWARF sections.Mark Wielaard
When opening an ELF file that contained a mix of plain, dwo or lto .debug sections the result could be confusing. Add a check to pick just the plain .debug sections, or the .dwo sections or the .gnu.debuglto_.debug sections (in that order of preference). That way there is always a consistent set. https://sourceware.org/bugzilla/show_bug.cgi?id=27367 Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-11-08Improve building with LTOAlexander Miller
Use symver attribute for symbol versioning instead of .symver assembler directive when available. Convert to use double @ syntax for default version in all cases (required when using the attribute). Add the attributes externally_visible, no_reorder if available when using assembler directives to improve the situation for < gcc-10. This is not 100% reliable, though; -flto-partition=none may still be needed in some cases. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24498 Signed-off-by: Alexander Miller <alex.miller@gmx.de>
2021-11-05PR28514: debuginfod: limit groom operation timesFrank Ch. Eigler
For large databases and many stale files, it was possible to starve rescan operations by numerous groom "nuke" (database delete ops). Under the theory that including new data is at least as important as aging old, we now impose a rough deadline on groom queries. In the process, we discovered that we were commiting some undefined-behaviour sqlite ops (deleting rows while iterating), which may explain some previous heisenbug occurrences. So the groom nuke operations are split into decision & action phases, with associated progress-tracking metrics. Testing the timeout facility requires hand-testing beyond the testsuite (since it requires LARGE databases to show measurable query times). So confirmed this part by hand. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-11-04NEWS: make automake check-news / dist happyFrank Ch. Eigler
automake's check-news option requires not too much new content before a line that includes the current version number. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-11-04NEWS: list some 0.186 debuginfod client & server featuresFrank Ch. Eigler
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-10-22PR28240: debuginfod client root-safe negative cachingFrank Ch. Eigler
Negative cache (000-permission) files were incorrectly treated as valid cached files for the root user, because root can open even 000-perm files without -EACCES. Corrected this checking sequence. Fixed the debuginfod testsuite to run to completion as root or as an ordinary user, correcting corresponding permission checks: stat -c %A $FILE is right and [ -w $FILE] [ -r $FILE ] were wrong. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-10-18libdw: Don't pass NULL to dwarf_peel_typeMark Wielaard
commit c3a6a9dfc "libdw: Use signedness of subrange type to determine array bounds" introduced a type check on a DIE which exposed a latent bug in the get_type function. Even if the type of a DIE couldn't be determined it would call dwarf_peel_type on it. The gcc undefined sanitizer would flag this as being undefined behaviour because the second argument of the function is marked as non-NULL. Fix this by checking we actually have a non-NULL type DIE. Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-10-18libdw: Use signedness of subrange type to determine array boundsMark Wielaard
When calculating the array size check if the subrange has an associate type, if it does then check the type to determine whether the upper and lower values need to be interpreted as signed of unsigned values. We default to signed because that is what the testcase run-aggregate-size.sh testfile-size4 expects (this is an hardwritten testcase, we could have chosen a different default). https://sourceware.org/bugzilla/show_bug.cgi?id=28294 Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-10-15debuginfod-client: Stick to http:// + https:// + file:// protocolsMark Wielaard
Make sure we don't use any of the more experimental protocols libcurl might support. URLs can be redirected and we might want to follow http -> https, but not e.g. gopher or pop3. Suggested-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-10-07PR27783: switch default debuginfod-urls to drop-in style filesFrank Ch. Eigler
Rewrote and commented the /etc/profile.d csh and sh script fragments to take the default $DEBUGINFOD_URLS from the union of drop-in files: /etc/debuginfod/*.urls. Hand-tested with csh and bash, with conditions including no prior $DEBUGINFOD_URLS, nonexistent .urls files, multiple entries in .urls files. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-10-06tests: Handle dwarf_attr_string returning NULL in show-die-info.cMark Wielaard
Reported-by: Jan-Benedict Glaw <jbglaw@lug-owl.de> Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-10-06elflint.c: Don't dereference databits if badMark Wielaard
elflint.c: In function 'check_sections': elflint.c:4105:48: error: null pointer dereference [-Werror=null-dereference] 4105 | idx < databits->d_size && ! bad; | ~~~~~~~~^~~~~~~~ Fix this by testing for ! bad first. Reported-by: Jan-Benedict Glaw <jbglaw@lug-owl.de> Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-10-06PR28242: debuginfod prometheus metric wideningDi Chen
This patch aims to extend http_responses_* metrics with another label "type" by getting the extra artifact-type content added as a new key=value tag. v2, tweaked patch to perform artifact-type sanitization at point of vulnerability rather than in general metric tabulation logic. Signed-off-by: Di Chen <dichen@redhat.com> Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-09-30RISC-V: PR27925 Add support for LP64 and LP64F ABIs return valuesWilliam Cohen
The RISC-V Linux kernel is compiled without floating point (the LP64 ABI) and elfutils could not obtain return value locations for functions in the kernel. This issue was noticed when Systemtap generated RISC-V kernel modules for scripts that used $return target variables in function return probes. This patch adds the needed support to provide return value information for the LP64 and LP64F ABIs. Signed-off-by: William Cohen <wcohen@redhat.com>
2021-09-17debuginfod: Remove checking for unsafe headersNoah Sanci
Some http response header checks were removed such as checking for Connection and Cache-Control. These headers are not guarenteed to be received and depend on proxy and libmicrohttpd versions. Checking for the existance of Content-Length and DEBUGINFOD-* headers is sufficient since Content-Length is added upon creation of an MHD_Response object and DEBUGINFOD-* are added manually. (source on Content-Length being added: https://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html# microhttpd_002dresponse-headers ) Signed-off-by: Noah Sanci <nsanci@redhat.com>
2021-09-17debuginfod: Query debuginfod servers before printing responseNoah Sanci
While checking PR27277 on some buildbots, greping would fail in run-debuginfod-response-headers.sh. This was because querying the debuginfod server occurs after checking if the responseh headers had arrived, leaving the possibility to leave the querying loop before outputting the headers which caused the grep failure. Querying now occurs before checking if response headers have arrived, so that they will certainly be printed and grep will find them. Signed-off-by: Noah Sanci <nsanci@redhat.com>
2021-09-16debuginfod: PR27277 - Describe retrieved files when verboseNoah Sanci
Allow users, with enough verbosity, to print the HTTP response headers upon retrieving a file. These files may include several custome http response headers such as X-DEBUGINFOD-FILE, X-DEBUGINFOD-SIZE, and X-DEBUGINFOD-ARCHIVE. These headers are added from the daemon, in debuginfod.cxx. E.g output: HTTP/1.1 200 OK Connection: Keep-Alive Content-Length: 4095072 Cache-Control: public Last-Modified: Thu, 09 Sep 2021 19:06:40 GMT X-FILE: debuginfod X-FILE-SIZE: 4095072 Content-Type: application/octet-stream Date: Fri, 10 Sep 2021 16:38:06 GMT https://sourceware.org/bugzilla/show_bug.cgi?id=27277 Signed-off-by: Noah Sanci <nsanci@redhat.com>
2021-09-16debuginfod: PR28034 - No longer escape '/', and loop efficiencyNoah Sanci
Previously, urls containing '/', so most urls, would escape '/' to %2F, which is undesirable for use in other libraries which may escape differently. This patch escapes the '/' and replaces all of them ensuring there are no %2Fs sent. Some inefficiencies within the code were fixed, such as changing constant operations of a while loop within a for loop to a while loop outside of a for loop. Also strlen is no longer used within the loop, simplifying the interior operations to mere arithmetic. https://sourceware.org/bugzilla/show_bug.cgi?id=28034 Signed-off-by: Noah Sanci <nsanci@redhat.com>
2021-09-14PR28339: debuginfod: fix groom/scan race condition on just-emptied queueFrank Ch. Eigler
debuginfod's scan and groom operations (thread_main_scanner, thread_main_fts_source_paths) are intended to be mutually exclusive, as a substitute for more complicated sql transaction batching. (This is because scanning / grooming involves inserting or deleting data from multiple related tables.) The workq class that governs this in debuginfod.cxx has a problem: if the workq just becomes empty, its sole entry pulled by a scanner thread in response to a wait_front(), an 'idler' groomer thread is ALSO permitted to run, because there is no indication as to when the scanner thread operation finishes, only when it starts. Extending the workq with a counter ("fronters") to track any active scanning activity (even if the workq is empty) lets us block idlers groomers a little longer. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-09-13Merge "Support building elfutils against musl" am: 462e61fb7e am: 214f750dc9 ↵Treehugger Robot
am: 5adfcd8adb Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1819989 Change-Id: I2f64b3c66a7411a688e49b5e7acad451a7086b23
2021-09-13Merge "lib: Make error.c more like error(3)" am: 7134827f42 am: 5a845dbd8d ↵Colin Cross
am: aff7b07ee1 Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1819988 Change-Id: Idaa79dd0deea2e6ea6d0566a83ecdccdaffe823d
2021-09-13Merge "Support building elfutils against musl" am: 462e61fb7e am: 214f750dc9Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1819989 Change-Id: I63535e7d75919472a2b1ce687fd10228c9993fad
2021-09-13Merge "lib: Make error.c more like error(3)" am: 7134827f42 am: 5a845dbd8dColin Cross
Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1819988 Change-Id: Ia441dd9cb551d449c609f1f2c248a96f6ee6c485
2021-09-13Merge "Support building elfutils against musl" am: 462e61fb7eandroid-s-v2-preview-1android-s-v2-preview-1Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1819989 Change-Id: Ibc52cc12db64932c010408428a0d643589f21e19
2021-09-13Merge "Support building elfutils against musl"Treehugger Robot
2021-09-13Merge "lib: Make error.c more like error(3)" am: 7134827f42Colin Cross
Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1819988 Change-Id: Ic8eae2f0a40890145393553e2e4fcebe5e3bf087
2021-09-13Merge "lib: Make error.c more like error(3)"Colin Cross
2021-09-13Support building elfutils against muslColin Cross
Elfutils uses argp, fts and obstack glibc extensions, none of which are provided by musl. Avoid compiling sources that use argp, they are only needed by eu-* tools that we don't compile. Use bionic's implementation of fts by linking libfts. Use a copy of obstack from libiberty from external/obstack. Bug: 190084016 Test: m USE_HOST_MUSL=true adbdw abidiff abitidy Test: ./post_update.sh Change-Id: I34dcac4110db0c13f7e1520c92844c45b95abfa0
2021-09-13lib: Make error.c more like error(3)Colin Cross
Fix some issues with the error reimplementation to make it match the specification for error(3). Flush stdout before printing to stderr. Also flush stderr afterwards, which is not specified in the man page for error(3), but is what bionic does. error(3) prints strerror(errnum) if and only if errnum is nonzero, but verr prints strerror(errno) unconditionaly. When errnum is nonzero copy it to errno and use verr, and when it is not set use verrx that doesn't print errno. error(3) only exits if status is nonzero, but verr exits uncondtionally. Use vwarn/vwarnx when status is zero, which don't exit. Signed-off-by: Colin Cross <ccross@google.com> (cherry picked from commit 7582a0d3e09ee154961bbba9285a224e5d09f407) Test: m USE_HOST_MUSL=true libeu Change-Id: I85d8151f072aa200245cd8a8914d4bbec6b890c1
2021-09-13debuginfod: Add endl after "fdcache emergency flush for filling tmpdir" logMark Wielaard
Without the endl the next log message will not start on its own line. Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-09-12lib: Make error.c more like error(3)Colin Cross
Fix some issues with the error reimplementation to make it match the specification for error(3). Flush stdout before printing to stderr. Also flush stderr afterwards, which is not specified in the man page for error(3), but is what bionic does. error(3) prints strerror(errnum) if and only if errnum is nonzero, but verr prints strerror(errno) unconditionaly. When errnum is nonzero copy it to errno and use verr, and when it is not set use verrx that doesn't print errno. error(3) only exits if status is nonzero, but verr exits uncondtionally. Use vwarn/vwarnx when status is zero, which don't exit. Signed-off-by: Colin Cross <ccross@google.com>
2021-09-12libdw: set address size, offset size and version on fake CUsMark Wielaard
There are three "fake CUs" that are associated with .debug_loc, .debug_loclist and .debug_addr. These fake CUs are used for "fake attributes" to provide values that are stored in these sections instead of in the .debug_info section. These fake CUs didn't have the address size, offset size and DWARF version set. This meant that values that depended on those properties might not be interpreted correctly. One example was the value associated with a DW_OP_addrx (which comes from the .debug_addr section). Add a testcase using varlocs to test that addresses can correctly be retrieved for gcc/clang, DWARF4/5 and 32/64 bits objects. https://sourceware.org/bugzilla/show_bug.cgi?id=28220 Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-09-10Merge "Add patch for manual config.h changes" am: 54e9c47ac3 am: 377347e7d7 ↵Treehugger Robot
am: c71044154f Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1822514 Change-Id: I0cd716c29db8214091dc84e7d14f74a7428d978b
2021-09-09Merge "Add patch for manual config.h changes" am: 54e9c47ac3 am: 377347e7d7Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1822514 Change-Id: I81772b15221ed5cc34d599608e0ef566d5ea7a6e
2021-09-09Merge "Add patch for manual config.h changes" am: 54e9c47ac3Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1822514 Change-Id: I94a0738834f72d0c7e78ca3b7e5bf3383ed541df
2021-09-09Merge "Add patch for manual config.h changes"Treehugger Robot
2021-09-09Merge changes I9001f472,I324bee2b,I1a634839,I0663d474,I320ee9c2, ... am: ↵Colin Cross
820f86f790 am: 21d650df05 am: df5daa1498 Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1819987 Change-Id: Ica3d1ffb6cd374626575f0e91b157390fc4d9eeb
2021-09-09Merge changes I9001f472,I324bee2b,I1a634839,I0663d474,I320ee9c2, ... am: ↵Colin Cross
820f86f790 am: 21d650df05 Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1819987 Change-Id: I1ebe60a3be578303868f3d8c8fc0421ffe258c91