Commit graph

307 commits

Author SHA1 Message Date
GCC Administrator
579cdc1e44 Daily bump. 2023-03-29 00:17:01 +00:00
Ian Lance Taylor
2e71f05403 libbacktrace: minor fixes for zstd decompression
* 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-03-28 13:08:42 -07:00
GCC Administrator
1bdb1768bf Daily bump. 2023-01-21 00:16:20 +00:00
Ian Lance Taylor
0c193cabe1 libbacktrace: change PC variables from uint64_t to uintptr_t
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-20 14:24:13 -08:00
GCC Administrator
8d07b193d7 Daily bump. 2023-01-18 00:17:21 +00:00
Martin Liska
42bf66e4a7 Regenerate Makefile.in files.
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-17 12:20:05 +01:00
Jakub Jelinek
83ffe9cde7 Update copyright years. 2023-01-16 11:52:17 +01:00
GCC Administrator
d808db1f7b Daily bump. 2023-01-07 00:17:28 +00:00
Ian Lance Taylor
f3707a55ac libbacktrace: don't run --build-id tests if it is not supported
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-06 09:41:57 -08:00
Jakub Jelinek
68127a8e87 Update Copyright year in ChangeLog files
2022 -> 2023
2023-01-02 09:23:36 +01:00
GCC Administrator
92bc361757 Daily bump. 2022-12-18 00:16:57 +00:00
Ian Lance Taylor
b1f91819e3 libbacktrace: unpack literals into output buffer
* 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-16 18:48:04 -08:00
GCC Administrator
c6b12b802c Daily bump. 2022-12-11 00:17:43 +00:00
Ian Lance Taylor
1bdba731b9 libbacktrace: rewrite and simplify main zstd loop
* 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-09 17:45:20 -08:00
GCC Administrator
e6110da479 Daily bump. 2022-12-09 00:18:54 +00:00
Ian Lance Taylor
9df1ba9a35 libbacktrace: support zstd decompression
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-12-07 16:22:49 -08:00
GCC Administrator
781f477a13 Daily bump. 2022-10-13 00:17:37 +00:00
Martin Liska
6d2294a83e regenerate configure files
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-12 09:31:32 +02:00
GCC Administrator
ab332cd78d Daily bump. 2022-10-12 00:17:24 +00:00
Olivier Hainque
0ecd0f1cc6 Generic configury support for shared libs on VxWorks
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-10-11 07:31:07 +00:00
GCC Administrator
0fe604a2d9 Daily bump. 2022-07-09 00:16:54 +00:00
Ian Lance Taylor
55bb77b50a libbacktrace: check for sys/link.h
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-08 10:32:45 -07:00
GCC Administrator
6345c41454 Daily bump. 2022-07-08 00:16:22 +00:00
Ian Lance Taylor
d8ddf1fa09 libbacktrace: don't exit Mach-O dyld library loop on one failure
* 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-07 16:54:05 -07:00
Ian Lance Taylor
9ed5779623 libbacktrace: don't let "make clean" remove allocfail.sh
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-07-07 16:15:05 -07:00
GCC Administrator
9d3dd21856 Daily bump. 2022-06-28 00:16:58 +00:00
Ian Lance Taylor
6ce49a6e69 libbacktrace: replace fgrep with grep in configure script
Patch by Xi Ruoyao.

	* configure.ac: Use grep instead of fgrep.
	* configure, Makefile.in: Regenerate.
2022-06-27 13:00:01 -07:00
GCC Administrator
37b3b5dabd Daily bump. 2022-05-29 00:16:31 +00:00
Ian Lance Taylor
f535f9d7b0 libbacktrace: update README
PR libbacktrace/105721
	* README: Update.
2022-05-28 07:59:16 -07:00
GCC Administrator
9d84ed6812 Daily bump. 2022-04-06 00:16:22 +00:00
Ian Lance Taylor
6be9d75214 libbacktrace: don't skip initial aligned byte in uncompressed block
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-04-05 16:09:34 -07:00
GCC Administrator
0bdb049877 Daily bump. 2022-02-18 00:16:39 +00:00
Ian Lance Taylor
837eb12629 libbacktrace: gather address ranges from skeleton units
* dwarf.c (find_address_ranges): Handle skeleton units.
	(read_function_entry): Likewise.
2022-02-16 20:21:48 -08:00
GCC Administrator
cb3afcd2a3 Daily bump. 2022-02-17 00:16:36 +00:00
Ian Lance Taylor
6d66bd25dc libbacktrace: initialize DWARF 5 fields of unit
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-16 11:37:57 -08:00
GCC Administrator
682ede3959 Daily bump. 2022-02-04 00:16:24 +00:00
David Seifert
45ba6bf28b make -Werror optional in libatomic/libbacktrace/libgomp/libitm/libsanitizer
* `-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-02-03 16:10:18 +01:00
Jakub Jelinek
7adcbafe45 Update copyright years. 2022-01-03 10:42:10 +01:00
Jakub Jelinek
877e3c2abf Update Copyright in ChangeLog files
Do this separately from all other Copyright updates, as ChangeLog files
can be modified only separately.
2022-01-03 10:31:39 +01:00
GCC Administrator
054e57e467 Daily bump. 2021-12-29 00:16:34 +00:00
Francois-Xavier Coudert
0ac7bab618 Libbacktrace: Fix the use of newline in sed replacement
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-12-28 23:28:49 +01:00
GCC Administrator
af2852b9dc Daily bump. 2021-11-13 00:16:39 +00:00
Martin Liska
83310a08a2 libbacktrace: fix UBSAN issues
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-11-12 15:06:12 +01:00
GCC Administrator
c2bd5d8a30 Daily bump. 2021-10-23 00:16:26 +00:00
Martin Liska
690180eb4b Handle jobserver file descriptors in btest.
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-10-22 21:11:51 +02:00
GCC Administrator
261512fa6d Daily bump. 2021-08-14 00:16:29 +00:00
Sergei Trofimovich
62e420293a libbacktrace: fix b2test_buildid test on non-english locales
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-08-13 07:29:12 +01:00
GCC Administrator
c8abc2058e Daily bump. 2021-06-29 00:16:42 +00:00
Ian Lance Taylor
42ff474e28 libbacktrace: improve XCOFF support
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-06-28 10:36:34 -07:00
GCC Administrator
e690396da7 Daily bump. 2021-05-04 00:16:53 +00:00