This patch by Pavel Safonov recognizes the new DWARF section names
used on macos Sequoia. Bootstrapped and ran libbacktrace tests on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
* macho.c (dwarf_section_names): Add __debug_addr and
__debug_line_str.
d97243588c8b5cbe8b657fd51f08038c42c81908
d
Because libbacktrace merges adjacent address ranges where possible,
and because the GNU linker can deduplicate functions leaving debuginfo
that refers to address ranges in other compilation units, it is
possible for libbacktrace to have overlapping address ranges, in
particular to overlap ranges wi
This patch, based on one by Kirill Müller, adds -Wpointer-arith to the
libbacktrace warning options, and adds casts to avoid the cases where
the warning currently fires. Bootstrapped and ran libbacktrace
testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
* configure.ac (ACX_PROG_CC_WA
This libbacktrace patch uses __has_attribute for fallthrough. It also
fixes some FALLTHROUGH comments to use ATTRIBUTE_FALLTHROUGH.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
to mainline.
Ian
* internal.h: Use __has_attribute to check for fallthrough
attribute.
* elf.c
On Wed, Jul 17, 2024 at 5:40 PM Ian Lance Taylor wrote:
>
> This libbacktrace patch improves backtrace_print when there is no
> debug info. It falls back to calling backtrace_syminfo, and uses that
> to print an offset from a symbol if it can. This is a partial fix for
> https://github.com/ianla
This libbacktrace patch improves backtrace_print when there is no
debug info. It falls back to calling backtrace_syminfo, and uses that
to print an offset from a symbol if it can. This is a partial fix for
https://github.com/ianlancetaylor/libbacktrace/issues/59.
Bootstrapped and ran libbacktrace
This patch adds some notes about dl_iterate_phdr to the libbacktrace
README file. In general dl_iterate_phdr is not async-signal-safe and
does call malloc, so programs that want to use libbacktrace functions
from a signal handler or within malloc must make an initiali
libbacktrace call in order to
libbacktrace could get an infinite recursion in an odd case in which a
.gnu_debugdata section was added to a debug file, and mini_debuginfo
was put into the debug file, and the debug file was put into a
/usr/lib/debug directory to be found by build ID. This combination
doesn't really make sense bu
Mach-O and PE/COFF don't record symbol sizes in the symbol table.
Adjust the libbacktrace testsuite so that it doesn't fail if the
symbol size is unknown, only if it is incorrect. Ran libbacktrace
tests on macOS on the compile farm and on x86_64-pc-linux-gnu.
Committed to mainline.
Ian
The libbacktrace symbol table code was incorrectly discarding global
Mach-O symbols. This patch fixes the problem. Tested on macOS on the
compile farm, and also on x86_64-pc-linux-gnu. Committed to mainline.
Ian
For PR libbacktrace/97082
* macho.c (MACH_O_N_EXT): Don't
On Thu, Jul 11, 2024 at 7:19 PM Andrew Pinski wrote:
>
> On Thu, Jul 11, 2024 at 4:14 PM Ian Lance Taylor wrote:
> >
> > The libbacktrace testsuite was not passing when run with current
> > versions of clang. Add the optnone attribute to make it pass. Add
> > -Wno-attributes and -Wno-unknown-at
On Thu, Jul 11, 2024 at 4:18 PM Andrew Pinski wrote:
>
> On Thu, Jul 11, 2024 at 4:14 PM Ian Lance Taylor wrote:
> >
> > The libbacktrace testsuite was not passing when run with current
> > versions of clang. Add the optnone attribute to make it pass. Add
> > -Wno-attributes and -Wno-unknown-at
On Thu, Jul 11, 2024 at 4:14 PM Ian Lance Taylor wrote:
>
> The libbacktrace testsuite was not passing when run with current
> versions of clang. Add the optnone attribute to make it pass. Add
> -Wno-attributes and -Wno-unknown-attributes to disable warnings about
> unrecognized function attribu
The libbacktrace testsuite was not passing when run with current
versions of clang. Add the optnone attribute to make it pass. Add
-Wno-attributes and -Wno-unknown-attributes to disable warnings about
unrecognized function attributes. Bootstrapped and ran libbacktrace
testsuite on x86_64-pc-linu
This small libbacktrace patch suggests compiling with -g (and, on
macOS, running dsymutil), if there is no debug info. Ran libbacktrace
testsuite. Committed to mainline.
Ian
* elf.c (elf_nodebug): Suggest -g.
* macho.c (macho_nodebug): Suggest -g and dsymutil.
This minor libbacktrace patch removes trailing whitespace. Ran
libbacktrace tests. Committed to mainline.
Ian
* dwarf.c: Remove trailing whitespace.
* macho.c: Likewise.
3f660179d6a0ebcd83d6a546f48a163d1a685f72
diff --git a/libbacktrace/dwarf.c b/libbacktrace/dwarf.c
index ed067
I've committed this libbacktrace patch to not fail on the case where
there are no bits available when looking backward. This can happen at
the very end of the frame if no bits are actually required. The test
case is long and may be proprietary, so not including it.
Bootstrapped and ran libbacktra
On Fri, Mar 8, 2024 at 2:48 PM Fangrui Song wrote:
>
> On ELF64, it looks like BFD uses 8-byte alignment for compressed
> `.debug_*` sections while gold/lld/mold use 1-byte alignment. I do not
> know how the Solaris linker sets the alignment.
>
> The specification's wording makes me confused wheth
On ELF64, it looks like BFD uses 8-byte alignment for compressed
`.debug_*` sections while gold/lld/mold use 1-byte alignment. I do not
know how the Solaris linker sets the alignment.
The specification's wording makes me confused whether it really
requires 8-byte alignment, even if a non-packed `E
Reportedly when lld compresses debug sections, it fails to set the
alignment of the compressed section such that the compressed header
can be read directly. To me this seems like a bug in lld. However,
libbacktrace needs to work around it. This patch, originally by the
GitHub user ubyte, does th
Some of the libbacktrace tests link a program and then modify the
debug info in some way. When configured with --enable-shared the
linking, using libtool, generates a shell script. That causes the
tests to fail because they can't modify the debug info of a shell
script. This patch, originally by
This patch to libbacktrace corrects the LZMA block header parsing to
skip all the padding bytes, verifying that they are zero. This fixes
https://github.com/ianlancetaylor/libbacktrace/issues/118.
Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu. I was
able to verify that the proble
On Thu, Feb 29, 2024 at 7:47 PM Ian Lance Taylor wrote:
>
> This patch to libbacktrace reads symbol tables from debuginfo files.
> These become another symbol table to search. This is needed if people
> use --strip-all rather than --strip-debug when adding a debuglink
> section. This fixes
> htt
This patch to libbacktrace reads symbol tables from debuginfo files.
These become another symbol table to search. This is needed if people
use --strip-all rather than --strip-debug when adding a debuglink
section. This fixes
https://github.com/ianlancetaylor/libbacktrace/issues/113.
Bootstrapped
This libbacktrace patch, based on one by Andres Freund, uses the
_pgmptr variable declared on Windows to find the executable file name
if none is specified. Bootstrapped and ran libbacktrace testsuite on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
Patch from Andres Freund:
* configure.ac: C
In looking over the recently committed support for zstd decompression
in libbacktrace, I found a few minor cases that needed fixing.
Bootstrapped and tested on x86_64-pc-linux-gnu. Committed to
mainline.
Ian
* elf.c (elf_zstd_read_fse): Call elf_fetch_bits after reading
bits, not before. Add u
PR 108297 points out that there are systems that use ELF but for which
the linker does not support the --build-id option. This libbacktrace
patch skips --build-id tests when it doesn't work. Bootstrapped and
ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline.
Ian
PR libbacktr
Apparently QNX declares dl_iterate_phdr and friends in sys/link.h
rather than link.h. This patch updates libbacktrace to check there.
This fixes https://github.com/ianlancetaylor/libbacktrace/issues/86.
Bootstrapped and ran libbacktrace testsuite on x86_64-pc-linux-gnu.
Committed to mainline.
Ian
This libbacktrace patch changes the loop over dynamic libraries on
Mach-O to keep going if we fail to find the debug info for a
particular library. We can still pick up debug info for other
libraries even if one fails. Tested on x86_64-pc-linux-gnu which
admittedly does little, but others have te
The script allocfail.sh was being incorrectly removed by "make clean".
This patch fixes the problem. This fixes
https://github.com/ianlancetaylor/libbacktrace/issues/81. Ran
libbacktrace "make check" and "make clean" on x86_64-pc-linux-gnu.
Committed to mainline.
Ian
For https://github.com/ianl
This patch updates the libbacktrace README to a near copy of the one
from github.com/ianlancetaylor/libbacktrace. Committed to mainline.
This fixes GCC PR 105721.
Ian
* README: Update.
6cf19361732bd7f8b41716ef9f4b5c205a3193b8
diff --git a/libbacktrace/README b/libbacktrace/README
index e8b225745
This libbacktrace patch by Rui Ueyama fixes handling an uncompressed
block that starts at an aligned byte. If the bits before the
uncompressed block ended at a byte boundary, libbacktrace accidentally
skipped the next byte, which is the first byte of the length of the
block. Bootstrapped and ran
This libbacktrace patch handles DWARF 5 skeleton units, which are used
when part of the DWARF information is stored in a separate file. This
doesn't actually look in the separate file, as the line number
information, which is all that we care about, is normally kept in the
main executable because
When I added the DWARF 5 support to libbacktrace in 2019-12-13 I
forgot to initialize the new fields of the unit data structure.
Whoops. Fixed with this patch. Bootstrapped and ran libbacktrace and
Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
* dwarf.c (build_address_map): I
This libbacktrace patch stops special casing file 0. It's no longer
necessary as for DWARF 5 support we now set up filename 0 in all
cases. Bootstrapped and ran libbacktrace and Go tests on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
* dwarf.c (read_line_program): Don't special case file 0
This libbacktrace patch passes -1 to the error callback function for
unknown DWARF versions. This makes users of libbacktrace treat DWARF
versions that libbacktrace does not support as though no debug
information were available. This fixes PR 98818. Bootstrapped and
ran libbacktrace tests on x86
This patch changes the libbacktrace configure script to check for
whether objcopy supports --add-gnu-debuglink (a test that only affects
the libbacktrace testsuite) to look at the objcopy --help option
rather than trying to apply --add-gnu-debuglink to /bin/ls. The
latter can trigger a warning if
On my system the current version of dwz fails on some DWARF 5 input.
This is reportedly fixed by
https://sourceware.org/pipermail/dwz/2021q1/000775.html, but in the
meantime there is no reason for the libbacktrace testsuite to fail
just because dwz fails. This patch changes the Makefile so that if
This libbacktrace patch uses the correct directory and filename index
for DWARF 5. For DWARF 4 and before, the zero entry for the directory
and filename information stored in the line program came from the
compilation unit. Because of that, the old code used to handle zero
specially, and otherwis
A couple of buffer overflow checks in libbacktrace incorrectly used >=
when comparing the end of the value with the end of the buffer. It is
of course OK if the value ends at the very end of the buffer. This
patch corrects those cases to use > instead. Bootstrapped and ran
libbacktrace and Go te
This libbacktrace patch uses __attribute__((__fallthrough__)) rather
than relying on a /*fallthrough*/ comment. Bootstrapped and ran
libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline.
Ian
* internal.h (ATTRIBUTE_FALLTHROUGH): Define.
* elf.c (elf_zlib_inflate): Use ATTRIBUTE_FALL
This libbacktrace patch creates mtest.dsym when using dsymutil. This
is for PR 97082, but it probably doesn't fix the PR. Bootstrapped and
ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline.
Ian
PR libbacktrace/97082
* Makefile.am (check_DATA): Add mtest.dSYM if USE_DSYMUTIL.
This patch changes the libbacktrace tests to only run dsymutil when
building for Mach-O. This should fix GCC PR 97227. Bootstrapped and
ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline.
Ian
PR libbacktrace/97227
* configure.ac (USE_DSYMUTIL): Define instead of HAVE_DSYMUTIL
On Tue, Sep 8, 2020 at 6:22 PM Ian Lance Taylor wrote:
>
> This patch to libbacktrace avoids ambiguous binary searches.
> Searching for a range match can cause the search order to not match
> the sort order, which can cause libbacktrace to miss matching entries.
> This patch allocates an extra ent
This patch to libbacktrace avoids stripping a leading underscore from
symbol names on 64-bit PE COFF. Bootstrapped and ran Go tests on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
* pecoff.c (coff_initialize_syminfo): Add is_64 parameter.
(coff_add): Determine and pass is_64.
diff --git a/li
This patch to libbacktrace gets the executable name on macOS using
_NSGetExecutablePath. This is another aspect of PR 96973. Tested
basic functionality on macOS. Bootstrapped and ran libbacktrace tests
on x86_64-pc-linux-gnu. Committed to mainline.
Ian
* fileline.c (macho_get_executable_path
This patch to libbacktrace avoids ambiguous binary searches.
Searching for a range match can cause the search order to not match
the sort order, which can cause libbacktrace to miss matching entries.
This patch allocates an extra entry at the end of function_addrs and
unit_addrs vectors, so that we
This patch suggested by Ondřej Čertík fixes a typpo in a comment.
Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu.
Committed to mainline.
Ian
* simple.c (simple_unwind): Correct comment spelling.
diff --git a/libbacktrace/simple.c b/libbacktrace/simple.c
index b9b971af95e..9ba660c8
This libbacktrace patch corrects the amount of memory allocated when
looking for the Mach-O dsym file. We weren't allocating space for the
backslash. Thanks to Alex Crichton for noticing this. This also
fixes the amount of space released when freeing diralc in the same
function. Thanks to Franc
This libbacktrace patch correctly swaps the 32-bit file offset in a
Mach-O fat file. This is based on a patch by Francois-Xavier Coudert
, who analyzed the problem. This is for PR 96973. Bootstrapped and
ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline.
Ian
PR libb
This patch fixes the libbacktrace file type detection, which is run at
configure time, to only look for a magic number at the very start of
the file. Otherwise we can get confused if the bytes happen to appear
elsewhere on the first "line". This is for PR 96971. Bootstrapped
and ran libbacktrace
This libbacktrace patch adds support for Mach-O 64-bit FAT files.
Bootstrapped and tested on x86_64-pc-linux-gnu. Committed to
mainline.
Ian
libbacktrace/:
* macho.c (MACH_O_MH_MAGIC_FAT_64): Define.
(MACH_O_MH_CIGAM_FAT_64): Define.
(struct macho_fat_arch_64)
This libbacktrace patch marks the state parameter of test_large in
ztest.c as ATTRIBUTE_UNUSED. The parameter is not used if HAVE_ZLIB
is not defined. Bootstrapped and ran libbacktrace tests on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
2020-05-13 Ian Lance Taylor
* ztest.c (test_larg
This patch to libbacktrace treats an EACCES error when opening a file
like an ENOENT error. This case happens when running the libgo
syscall tests as root, when testing various ways of restricting a
child process. Bootstrapped and ran libbacktrace and Go tests on
x86_64-pc-linux-gnu. Committed t
Reportedly mingw-w64-gcc has mmap and getpagesize but does not provide
a declaration of getpagesize in any header files. Check for a
getpagesize declaration, and declare it if necessary. This is for PR
95012. Bootstrapped and ran libbacktrace tests on
x86_64-pc-linux-gnu. Committed to master.
This patch to libbacktrace, by Roland McGrath, avoids crashing if an
ELF file has no section headers. Bootstrapped and ran libbacktrace
testsuite on x86_64-pc-linux-gnu. This fixes
https://github.com/ianlancetaylor/libbacktrace/issues/41. Committed
to master.
Ian
2020-05-09 Roland McGrath
This libbacktrace patch fixes the ELF support so that after reading
symbol information we don't free the strtab, even if we encounter an
error later while reading debug info. This fixes programs that try to
get symbol information even if they can't get backtrace information.
Bootstrapped and ran l
This patch to libbacktrace adds Mach-O support. Bootstrapped and
tested on macOS. Most tests pass, but a couple still fail. This is
for PR 88745. Committed to master.
Ian
2020-05-09 Ian Lance Taylor
PR libbacktrace/88745
* macho.c: New file.
* filetype.awk: Recognize Mach-O files.
* Makef
This patch to libbacktrace handles short reads correctly. Short reads
are unlikely, but they can reportedly happen when the debug sections
are very large and we aren't using mmap. Bootstrapped and ran
libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline.
Ian
2020-05-09 Ian Lance T
This patch to libbacktrace changes it to read the debug sections as
individual sections if they are very large or are far apart. This
uses less memory in some cases, and fixes some cases on 32-bit
systems. In particular this fixes one of the problems in
https://github.com/ianlancetaylor/libbacktr
This libbacktrace patch adds the ability to fetch the executable name
on FreeBSD and NetBSD using sysctl when /proc is not mounted.
Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu.
Committed to mainline.
Ian
2020-05-08 Ian Lance Taylor
* fileline.c (sysctl_exec_name): New stati
This libbacktrace patch updates the test file used for comparisons
with zlib. The file that the test was previously using, from libgo,
no longer exists. Use its replacement file instead. Bootstrapped and
ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline.
Ian
2020-02-15 Ian
This patch ensures that the libbacktrace tests are always built with
-g. It also builds them with the default warning flags, so I had to
add a few casts to ztest.c to get it pass without warnings. This
should fix PR 90636. Bootstrapped and ran libbacktrace tests on
x86_64-pc-linux-gnu. Committe
This patch to libbacktrace adds DWARF 5 support. I tested this with
GCC 8, GCC tip, and clang 8, using the -gdwarf-5 option. Bootstrapped
and ran libbacktrace and libgo tests on x86_64-pc-linux-gnu.
Committed to mainline.
Ian
2019-12-13 Ian Lance Taylor
Add DWARF 5 support.
* dwarf.c (struc
Before this patch libbacktrace duplicated the handling of
DW_AT_low_pc, DW_AT_high_pc, and DW_AT_ranges, once to build a mapping
from addresses to compilation units, and then again to build a mapping
from addresses to functions within a compilation unit. This patch
removes the duplication into a p
This libbacktrace patch adds the noclone attribute to the version of
test1 in edtest.c, to correspond to other versions of test1.
Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu.
Committed to mainline.
Ian
2019-12-04 Ian Lance Taylor
* edtest.c (test1): Add noclone attribute.
I
This libbacktrace patch simplifies the DWARF section handling. This
is in preparation for DWARF 5 support, as DWARF 5 requires us to read
more sections. Bootstrapped and ran libbacktrace and Go tests on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
2019-12-04 Ian Lance Taylor
* internal.
This libbacktrace patch only runs the two ztest tests if HAVE_ELF is
true, since we only do uncompression on ELF. This should fix PR
89699. Bootstrapped and ran libbacktrace tests on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
2019-03-11 Ian Lance Taylor
PR libbacktrace/89669
* Makefi
This patch to libbacktrace expands the comment for
backtrace_create_state to make clear that it should be called only
once. There is no backtrace_free_state function. While it would be
nice to have such a function, it's hard to write completely accurately
as libbacktrace doesn't currently track a
On Tue, Apr 17, 2018 at 10:29 AM, Ian Lance Taylor wrote:
> On Tue, Apr 17, 2018 at 10:21 AM, Tom de Vries wrote:
>> On 04/17/2018 03:59 PM, Ian Lance Taylor wrote:
>>>
>>> The bug report https://github.com/ianlancetaylor/libbacktrace/issues/13
>>> points out that when backtrace_full checks wheth
On Tue, Apr 17, 2018 at 10:21 AM, Tom de Vries wrote:
> On 04/17/2018 03:59 PM, Ian Lance Taylor wrote:
>>
>> The bug report https://github.com/ianlancetaylor/libbacktrace/issues/13
>> points out that when backtrace_full checks whether memory is
>> available, it doesn't necessarily release that me
On 04/17/2018 03:59 PM, Ian Lance Taylor wrote:
The bug report https://github.com/ianlancetaylor/libbacktrace/issues/13
points out that when backtrace_full checks whether memory is
available, it doesn't necessarily release that memory. It will stay
on the free list, so libbacktrace will use more
The bug report https://github.com/ianlancetaylor/libbacktrace/issues/13
points out that when backtrace_full checks whether memory is
available, it doesn't necessarily release that memory. It will stay
on the free list, so libbacktrace will use more and more memory over
time. This patch fixes that
This patch to libbacktrace closes any debuginfo files that we opened.
Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu. This
should fix https://golang.org/issue/23626. Committed to mainline.
Ian
2018-01-31 Ian Lance Taylor
* elf.c (elf_add): Close descriptor if we use a debug
Another libbacktrace patch to avoid use of uninitialized memory: only
free sym_view if it is valid. Committed to mainline.
Ian
2018-01-25 Ian Lance Taylor
* pecoff.c (coff_add): Only release syms_view if it is valid.
Index: pecoff.c
===
This libbacktrace patch fixes another cases where memcpy was used in a
way that would leave some bytes uninitialized on a 64-bit system.
Committed to mainline.
Ian
2018-01-25 Ian Lance Taylor
* pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
Index: pecoff.c
This libbacktrace patch fixes the setting of str_size on PE/COFF to
not leave some bytes uninitialized on a 64-bit host. Committed to
mainline.
Ian
2018-01-24 Ian Lance Taylor
* pecoff.c (coff_add): Use coff_read4, not memcpy.
Index: pecoff.c
=
PR 68239 points out that libbacktrace can sometimes take a long time
scanning the list of free memory blocks looking for one that is large
enough. Since the libbacktrace memory allocator does not have to be
perfect in practice, only keep the 16 largest entries on the free
list. Bootstrapped and r
I misunderstood how the dist codes are handled in block type 1. I
also think'od the length of the codes for the default table. This
patch fixes these problems, along with a test case that exposes them.
Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu.
Committed to mainline.
Ian
20
On Sat, Nov 4, 2017 at 3:07 AM, Gerald Pfeifer wrote:
> On Fri, 6 Oct 2017, Ian Lance Taylor wrote:
>> Thanks for the report. I committed this patch, which I hope will fix
>> the problem.
>
>> * ztest.c (test_large): Pass unsigned long *, not size_t *, to
>> zlib uncompress function.
>
> Thank yo
On Fri, 6 Oct 2017, Ian Lance Taylor wrote:
> Thanks for the report. I committed this patch, which I hope will fix
> the problem.
> * ztest.c (test_large): Pass unsigned long *, not size_t *, to
> zlib uncompress function.
Thank you, yes it did. (Sorry, I thought I had responded back
then, but
On Tue, Oct 10, 2017 at 12:47 PM, Paolo Carlini
wrote:
>
> On 10/10/2017 18:55, Ian Lance Taylor wrote:
>>
>> Index: elf.c
>> ===
>> --- elf.c (revision 253593)
>> +++ elf.c (working copy)
>> @@ -103,6 +103,7 @@
>> #unde
Hi,
On 10/10/2017 18:55, Ian Lance Taylor wrote:
Index: elf.c
===
--- elf.c (revision 253593)
+++ elf.c (working copy)
@@ -103,6 +103,7 @@
#undef SHT_SYMTAB
#undef SHT_STRTAB
#undef SHT_DYNSYM
+#undef SFH_COMPRESSE
This patch to the GCC 7 libbacktrace ignores compressed debug
sections. If we don't, the DWARF reader reports an error. Since the
GCC 7 libbacktrace does not support uncompressing the debug sections,
ignoring them is the best approach (on trunk, we uncompress). This is
for PR 80914. Bootstrappe
On Fri, Oct 6, 2017 at 3:22 AM, Gerald Pfeifer wrote:
> On Thu, 28 Sep 2017, Ian Lance Taylor wrote:
>> This patch to libbacktrace adds support for compressed debug sections.
>> 2017-09-28 Ian Lance Taylor
>>
>> PR other/67165
>> * elf.c (__builtin_prefetch): Define if not __GNUC__.
>> (unlikel
On Thu, 28 Sep 2017, Ian Lance Taylor wrote:
> This patch to libbacktrace adds support for compressed debug sections.
> 2017-09-28 Ian Lance Taylor
>
> PR other/67165
> * elf.c (__builtin_prefetch): Define if not __GNUC__.
> (unlikely): Define.
> (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
>
I've committed a patch to libbacktrace to speed up decompression a few
percent by loading 32-bit values rather than 8-bit bytes.
Bootstrapped and ran libbacktrace and Go tests on x86_64-pc-linux-gnu.
Committed to mainline.
Ian
2017-10-05 Ian Lance Taylor
* elf.c (elf_zlib_fetch): Change pval
Thanks for the fixes. I made some style tweaks, committed as follows
after bootstrap and testing.
Ian
2017-10-02 Ian Lance Taylor
* ztest.c: #include .
(TEST_TIMING): Don't define, don't test.
(xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
(clockid_t, clock_gettime, CLOCK_REALT
Hi!
On Mon, 02 Oct 2017 14:00:36 +0200, I wrote:
> On Thu, 28 Sep 2017 17:30:53 -0700, Ian Lance Taylor wrote:
> > This patch to libbacktrace adds support for compressed debug sections.
> > [...]
>
> > --- ztest.c (revision 0)
> > +++ ztest.c (working copy)
> > @@ -0,0 +1,446 @@
> > +/* ztest.c
Hi!
On Thu, 28 Sep 2017 17:30:53 -0700, Ian Lance Taylor wrote:
> This patch to libbacktrace adds support for compressed debug sections.
> [...]
> --- ztest.c (revision 0)
> +++ ztest.c (working copy)
> @@ -0,0 +1,446 @@
> +/* ztest.c -- Test for libbacktrace inflate code.
> +[...]
> +
This patch to libbacktrace adds support for compressed debug sections.
Rather than require all users of libbacktrace to link against -lz, I
wrote new code in libbacktrace to inflate a zlib stream. Because the
code does not have to be as flexible as zlib, and because it is only
used to uncompress f
This patch to libbacktrace provides dummy versions of lstat and
readlink if they are not available on the system. Bootstrapped and
ran libbacktrace tests on x86_64-pc-linux-gnu both normally and with a
hand-edited config.h. Committed to mainline.
Ian
2017-09-22 Ian Lance Taylor
PR sanitizer
I somehow failed to initialize the exe_filename field of phdr_data,
which most likely led to PR 82284. Bootstrapped and ran libbacktrace
tests for this obvious fix. Committed to mainline.
Ian
2017-09-21 Ian Lance Taylor
PR go/82284
* elf.c (backtrace_initialize): Set pd.exe_filename.
Index
The code in libbacktrace had a race when doing parallel
initialization: if two threads start to initialize at the same time,
and one completes first, the other, while running in
backtrace_initialize, may see that the structure is initialized and
thus not change *fileline_fn. The caller will then s
Although libbacktrace uses automake, it can't use automatic dependency
tracking, because it breaks when using bootstrap-lean (PR 54732). The
dependencies for sort.lo and stest.lo were never added to the list.
Also, the dependencies for backtrace.lo were not updated for my recent
change to that fil
On Tue, Sep 8, 2015 at 5:00 PM, Hans-Peter Nilsson
wrote:
>
> I've committed the following as obvious, following the pattern
> of the other files including internal.h, after observing
> all-libbacktrace (i.e. built for the host) complete.
>
> libbacktrace:
> * backtrace.c: #include .
Than
> From: Ian Lance Taylor
> Date: Tue, 8 Sep 2015 18:46:21 +0200
> PR other/67457
> * backtrace.c: #include "internal.h".
> (struct backtrace_data): Add can_alloc field.
> (unwind): If can_alloc is false, don't try to get file/line
> information.
> (backtrace_full): Set can_alloc field in bdata.
I've committed this libbacktrace patch to mainline to do a graceful
fallback if no memory can be allocated. In that case we print out the
PC addresses without trying to resolve file/line information. This is
imperfect but better than the earlier behaviour of producing a series
of error messages.
PR 67457 points out a crash in libbacktrace when there is no memory
available. This is because the code testing the mmap result for
failure is broken. This patch fixes it. Bootstrapped and ran
libbacktrace tests. Committed to mainline.
Ian
2015-09-08 Ian Lance Taylor
PR other/67457
* mma
This patch to libbacktrace fixes the type returned by the backup
definition of backtrace_atomic_load_pointer for the case where
libbacktrace is compiled with neither the atomic nor the sync
functions available. This case does not arise in general but could
arise from other uses of the library, or
1 - 100 of 130 matches
Mail list logo