aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace
AgeCommit message (Collapse)AuthorFilesLines
2023-03-29Daily bump.GCC Administrator1-0/+9
2023-03-28libbacktrace: minor fixes for zstd decompressionIan Lance Taylor1-20/+20
* elf.c (elf_zstd_read_fse): Call elf_fetch_bits after reading bits, not before. Add unlikely for error case. (elf_zstd_offset_table): Regenerate. (elf_zstd_read_huff): Clear 13 entries in weight_mark, not 12. (elf_zstd_read_literals): For a single stream adjust by total_streams_size, not compressed_size.
2023-01-21Daily bump.GCC Administrator1-0/+26
2023-01-20libbacktrace: change PC variables from uint64_t to uintptr_tIan Lance Taylor1-44/+44
Change variables holding PC values from uint64_t to uintptr_t. Patch by Björn Schäpers. * dwarf.c (struct function_addrs): Change low and high fields to uintptr_t. (struct unit_addrs): Likewise. (resolve_addr_index): Change address parameter to uintptr_t*. (add_unit_addr): Change lowpc and highpc parameters to uintptr_t. (add_function_range): Likewise. (struct pcrange): Change lowpc and highpc fields to uintptr_t. (add_low_high_range): Change add_range lowpc and highpc parameters to uintptr_t. (add_ranges_from_ranges): Likewise. (add_ranges_from_rnglists): Likewise. (add_low_high_range): Chnage lowpc and highpc variables to uintpr_t. (add_ranges_from_rnglists): Change some local variables to uintptr_t. (add_ranges_from_ranges): Change base parameter to uintptr_t. (add_ranges_from_rnglists): Likewise. (read_function_entry): Likewise. (resolve_addr_index): Add explicit casts to uintptr_t. (update_pcrange): Likewise. (add_ranges_from_ranges): Likewise. (add_ranges_from_rnglists): Likewise. (read_function_entry): Likewise.
2023-01-18Daily bump.GCC Administrator1-0/+4
2023-01-17Regenerate Makefile.in files.Martin Liska1-1/+1
libbacktrace/ChangeLog: * Makefile.in: Regenerate. libgomp/ChangeLog: * Makefile.in: Regenerate. * configure: Regenerate. libphobos/ChangeLog: * Makefile.in: Regenerate. * libdruntime/Makefile.in: Regenerate. libstdc++-v3/ChangeLog: * src/libbacktrace/Makefile.in: Regenerate.
2023-01-16Update copyright years.Jakub Jelinek41-41/+41
2023-01-07Daily bump.GCC Administrator1-0/+7
2023-01-06libbacktrace: don't run --build-id tests if it is not supportedIan Lance Taylor4-21/+78
PR libbacktrace/108297 * configure.ac: Test whether linker supports --build-id. * Makefile.am: Only run --build-id tests if supported. * configure, Makefile.in: Regenerate.
2023-01-02Update Copyright year in ChangeLog filesJakub Jelinek1-1/+1
2022 -> 2023
2022-12-18Daily bump.GCC Administrator1-0/+14
2022-12-16libbacktrace: unpack literals into output bufferIan Lance Taylor1-636/+667
* elf.c (elf_fetch_backward_init): New static function. (ZSTD_TABLE_SIZE): Use huffman scratch space size rather than literal size. (ZSTD_TABLE_WORK_LIT_SIZE): Don't define. (elf_zstd_read_huff): Use elf_fetch_backward_init. (elf_zstd_read_literals): New static function. (ZSTD_LIT_RAW, ZSTD_LIT_RLE, ZSTD_LIT_HUFF): Don't define. (struct elf_zstd_literals): Don't define. (elf_zstd_literal_output): Remove static function. (elf_zstd_decompress): Use elf_fetch_backward_init and elf_zstd_read_literals. Rewrite literal copying.<
2022-12-11Daily bump.GCC Administrator1-0/+25
2022-12-09libbacktrace: rewrite and simplify main zstd loopIan Lance Taylor1-356/+592
* elf.c (ZSTD_TABLE_*): Use elf_zstd_fse_baseline_entry. (ZSTD_ENCODE_BASELINE_BITS): Define. (ZSTD_DECODE_BASELINE, ZSTD_DECODE_BASEBITS): Define. (elf_zstd_literal_length_base): New static const array. (elf_zstd_match_length_base): Likewise. (struct elf_zstd_fse_baseline_entry): Define. (elf_zstd_make_literal_baseline_fse): New static function. (elf_zstd_make_offset_baseline_fse): Likewise. (elf_zstd_make_match_baseline_fse): Likewise. (print_table, main): Use elf_zstd_fse_baseline_entry. (elf_zstd_lit_table, elf_zstd_match_table): Likewise. (elf_zstd_offset_table): Likewise. (struct elf_zstd_seq_decode): Likewise. Remove use_rle and rle fields. (elf_zstd_unpack_seq_decode): Use elf_zstd_fse_baseline_entry, taking a conversion function. Convert RLE to FSE. (elf_zstd_literal_length_baseline): Remove. (elf_zstd_literal_length_bits): Remove. (elf_zstd_match_length_baseline): Remove. (elf_zstd_match_length_bits): Remove. (elf_zstd_decompress): Use elf_zstd_fse_baseline_entry. Rewrite and simplify main loop.
2022-12-09Daily bump.GCC Administrator1-0/+42
2022-12-07libbacktrace: support zstd decompressionIan Lance Taylor8-110/+3165
Support decompressing --compress-debug-sections=zstd. * configure.ac: Check for zstd library and --compress-debug-sections=zstd linker option. * Makefile.am (zstdtest_*): New targets. (zstdtest_alloc_*, ctestzstd_*): New targets. (BUILDTESTS): Add zstdtest, zstdtest_alloc, ctestzstd as appropriate. * elf.c (ELFCOMPRESS_ZSTD): Define. (elf_fetch_bits): Rename from elf_zlib_fetch. Update uses. (elf_fetch_bits_backward): New static function. (ZLIB_HUFFMAN_*): Rename from HUFFMAN_*. Update uses. (ZLIB_TABLE_*): Rename from ZDEBUG_TABLE_*. Update uses. (ZSTD_TABLE_*): Define. (struct elf_zstd_fse_entry): Define. (elf_zstd_read_fse): New static function. (elf_zstd_build_fse): Likewise. (lit): Define if BACKTRACE_GENERATE_ZSTD_FSE_TABLES. (match, offset, next, print_table, main): Likewise. (elf_zstd_lit_table): New static const array. (elf_zstd_match_table, elf_zstd_offset_table): Likewise. (elf_zstd_read_huff): New static function. (struct elf_zstd_seq_decode): Define. (elf_zstd_unpack_seq_decode): New static function. (ZSTD_LIT_*): Define. (struct elf_zstd_literals): Define. (elf_zstd_literal_output): New static function. (ZSTD_LITERAL_LENGTH_BASELINE_OFFSET): Define. (elf_zstd_literal_length_baseline): New static const array. (elf_zstd_literal_length_bits): Likewise. (ZSTD_MATCH_LENGTH_BASELINE_OFFSET): Define. (elf_zstd_match_length_baseline): New static const array. (elf_zstd_match_length_bits): Likewise. (elf_zstd_decompress): New static function. (ZDEBUG_TABLE_SIZE): New definition. (elf_uncompress_chdr): Support ELF_COMPRESS_ZSTD. (backtrace_uncompress_zstd): New function. (elf_add): Use ZLIB_TABLE_SIZE for zlib-gnu sections. * internal.h (backtrace_uncompress_zstd): Declare. * zstdtest.c: New file. * configure, config.h.in, Makefile.in: Regenerate.
2022-10-13Daily bump.GCC Administrator1-0/+4
2022-10-12regenerate configure filesMartin Liska1-2/+2
Needed after a recent change. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. liboffloadmic/ChangeLog: * configure: Regenerate. * plugin/configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
2022-10-12Daily bump.GCC Administrator1-0/+5
2022-10-11Generic configury support for shared libs on VxWorksOlivier Hainque1-0/+24
This change adds the configury bits to activate the build of shared libs on VxWorks ports configured with --enable-shared, for libraries variants where this is generally supported (rtp, code model !large - currently not compatible with -fPIC). Set lt_cv_deplibs_check_method in libtool.m4, so the build of libraries know how to establish dependencies. This is useful in configurations such as aarch64 where proper support of LSE relies on accurate dependency information between libstdc++ and libgcc_s to begin with. Regenerate configure scripts to reflect libtool.m4 change. 2022-10-09 Olivier Hainque <hainque@adacore.com> * libtool.m4 (*vxworks*): When enable_shared, set dynamic_linker and friends for rtp !large. Assume the linker has the required abilities and set lt_cv_deplibs_check_method. gcc/ * config.gcc (*vxworks*): Add t-slibgcc fragment if enable_shared. libgcc/ * config.host (*vxworks*): When enable_shared, add libgcc and crtstuff "shared" fragments for rtp except large code model. (aarch64*-wrs-vxworks7*): Remove t-slibgcc-libgcc from the list of fragments. 2022-10-09 Olivier Hainque <hainque@adacore.com> gcc/ * configure: Regenerate. libatomic/ * configure: Regenerate. libbacktrace/ * configure: Regenerate. libcc1/ * configure: Regenerate. libffi/ * configure: Regenerate. libgfortran/ * configure: Regenerate. libgomp/ * configure: Regenerate. libitm/ * configure: Regenerate. libobjc/ * configure: Regenerate. liboffloadmic/ * configure: Regenerate. liboffloadmic/ * plugin/configure: Regenerate. libphobos/ * configure: Regenerate. libquadmath/ * configure: Regenerate. libsanitizer/ * configure: Regenerate. libssp/ * configure: Regenerate. libstdc++-v3/ * configure: Regenerate. libvtv/ * configure: Regenerate. lto-plugin/ * configure: Regenerate. zlib/ * configure: Regenerate.
2022-07-09Daily bump.GCC Administrator1-0/+7
2022-07-08libbacktrace: check for sys/link.hIan Lance Taylor4-10/+27
QNX uses sys/link.h rather than link.h for dl_iterate_phdr Fixes https://github.com/ianlancetaylor/libbacktrace/issues/86 * configure.ac: Check for sys/link.h. Use either link.h or sys/link.h when checking for dl_iterate_phdr. * elf.c: Include sys/link.h if available. * configure, config.h.in: Regenerate.
2022-07-08Daily bump.GCC Administrator1-0/+11
2022-07-07libbacktrace: don't exit Mach-O dyld library loop on one failureIan Lance Taylor1-1/+1
* macho.c (backtrace_initialize) [HAVE_MACH_O_DYLD_H]: Don't exit loop if we can't find debug info for one shared library.
2022-07-07libbacktrace: don't let "make clean" remove allocfail.shIan Lance Taylor2-15/+27
For https://github.com/ianlancetaylor/libbacktrace/issues/81 * Makefile.am (MAKETESTS): New variable split out of TESTS. (CLEANFILES): Replace TESTS with BUILDTESTS and MAKETESTS. * Makefile.in: Regenerate.
2022-06-28Daily bump.GCC Administrator1-0/+5
2022-06-27libbacktrace: replace fgrep with grep in configure scriptIan Lance Taylor3-3/+3
Patch by Xi Ruoyao. * configure.ac: Use grep instead of fgrep. * configure, Makefile.in: Regenerate.
2022-05-29Daily bump.GCC Administrator1-0/+5
2022-05-28libbacktrace: update READMEIan Lance Taylor1-12/+20
PR libbacktrace/105721 * README: Update.
2022-04-06Daily bump.GCC Administrator1-0/+5
2022-04-05libbacktrace: don't skip initial aligned byte in uncompressed blockIan Lance Taylor1-1/+1
Patch from Rui Ueyama, who says: libbacktrace occasionally fails to decompress compressed debug info even though the sections contain valid zlib streams. The cause of the issue is an off-by-one error. If a zlib data block is a plain data (uncompressed data), the next two bytes contain the size of the block. These two bytes value is byte- aligned, so if we read-ahead more than 8 bits, we need to unread it. So, the correct condition to determine whether or not we need to unread a byte is bits >= 8 and not bits > 8. Due to this error, if the last read bits happened to end at a byte boundary, the next byte would be skipped. That caused the decompression failure. This bug was originally reported against the mold linker. rui314/mold#402 * elf.c (elf_zlib_inflate): Don't skip initial aligned byte in uncompressed block.
2022-02-18Daily bump.GCC Administrator1-0/+5
2022-02-16libbacktrace: gather address ranges from skeleton unitsIan Lance Taylor1-11/+20
* dwarf.c (find_address_ranges): Handle skeleton units. (read_function_entry): Likewise.
2022-02-17Daily bump.GCC Administrator1-0/+4
2022-02-16libbacktrace: initialize DWARF 5 fields of unitIan Lance Taylor1-0/+3
When I added the fields in 2019-12-13 I forgot to initialize them. * dwarf.c (build_address_map): Initialize DWARF 5 fields of unit.
2022-02-04Daily bump.GCC Administrator1-0/+6
2022-02-03make `-Werror` optional in libatomic/libbacktrace/libgomp/libitm/libsanitizerDavid Seifert2-8/+14
* `-Werror` can cause issues when a more recent version of GCC compiles an older version: - https://bugs.gentoo.org/229059 - https://bugs.gentoo.org/475350 - https://bugs.gentoo.org/667104 libatomic/ChangeLog: * configure.ac: Support --disable-werror. * configure: Regenerate. libbacktrace/ChangeLog: * configure.ac: Support --disable-werror. * configure: Regenerate. libgomp/ChangeLog: * configure.ac: Support --disable-werror. * configure: Regenerate. libitm/ChangeLog: * configure.ac: Support --disable-werror. * configure: Regenerate. libsanitizer/ChangeLog: * configure.ac: Support --disable-werror. * aclocal.m4: Include also ../config/warnings.m4. * libbacktrace/Makefile.am (WARN_FLAGS): Remove. * configure: Regenerate. * Makefile.in: Regenerate. * asan/Makefile.in: Regenerate. * hwasan/Makefile.in: Regenerate. * interception/Makefile.in: Regenerate. * libbacktrace/Makefile.in: Regenerate. * lsan/Makefile.in: Regenerate. * sanitizer_common/Makefile.in: Regenerate. * tsan/Makefile.in: Regenerate. * ubsan/Makefile.in: Regenerate. Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
2022-01-03Update copyright years.Jakub Jelinek40-40/+40
2022-01-03Update Copyright in ChangeLog filesJakub Jelinek1-1/+1
Do this separately from all other Copyright updates, as ChangeLog files can be modified only separately.
2021-12-29Daily bump.GCC Administrator1-0/+6
2021-12-28Libbacktrace: Fix the use of newline in sed replacementFrancois-Xavier Coudert2-8/+8
On non-ELF targets, the Makefile needs a newline inside the sed REPLACE string. The way it is currently done fails with GNU Make < 4, but GCC only requires "GNU make version 3.80 (or later)". The portable solution is given in the autoconf manual: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Newlines-in-Make-Rules.html libbacktrace/ChangeLog: PR libbacktrace/103822 * Makefile.am: Fix newline. * Makefile.in: Regenerate.
2021-11-13Daily bump.GCC Administrator1-0/+7
2021-11-12libbacktrace: fix UBSAN issuesMartin Liska2-17/+17
Fix issues mentioned in the PR. PR libbacktrace/103167 libbacktrace/ChangeLog: * elf.c (elf_uncompress_lzma_block): Cast to unsigned int. (elf_uncompress_lzma): Likewise. * xztest.c (test_samples): memcpy only if v > 0.
2021-10-23Daily bump.GCC Administrator1-0/+10
2021-10-22Handle jobserver file descriptors in btest.Martin Liska1-4/+20
PR testsuite/102742 libbacktrace/ChangeLog: * btest.c (MIN_DESCRIPTOR): New. (MAX_DESCRIPTOR): Likewise. (check_available_files): Likewise. (check_open_files): Check only file descriptors that were not available at the entry. (main): Call check_available_files.
2021-08-14Daily bump.GCC Administrator1-0/+5
2021-08-13libbacktrace: fix b2test_buildid test on non-english localesSergei Trofimovich1-1/+1
On LANG=ru_RU.UTF-8 'b2test_buildid' test fails due to localized readelf output: $ LANG=ru_RU.UTF-8 readelf -n b2test | fgrep 4e37e8f ID сборки: 4e37e8fead8d6e8b0a9dc95ea25cd784dff3a393 $ LANG=C readelf -n b2test | fgrep 4e37e8f Build ID: 4e37e8fead8d6e8b0a9dc95ea25cd784dff3a393 libbacktrace/ * install-debuginfo-for-buildid.sh.in: Force non-localized readelf output with LANG=C.
2021-06-29Daily bump.GCC Administrator1-0/+10
2021-06-28libbacktrace: improve XCOFF supportIan Lance Taylor1-17/+18
libbacktrace/ChangeLog: 2021-06-28 Clément Chigot <clement.chigot@atos.net> * xcoff.c (SSUBTYP_DWRNGES): New define. (xcoff_add): Use correct XCOFF DWARF section subtype for DEBUG_RANGES. Remove lineoff workaround. Adjust base_address. (xcoff_initialize_syminfo): Adapt to new base_address. (xcoff_lookup_pc): Likewise. (xcoff_initialize_fileline): Likewise.
2021-05-04Daily bump.GCC Administrator1-0/+5