libbacktrace patch committed: Add support for Mach-O 64-bit FAT files

2020-08-24 Thread Ian Lance Taylor via Gcc-patches
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

Go patch committed: Export thunks referenced by inline functions

2020-08-17 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go fronted exports thunks referenced by inline functions. Otherwise we get a link time error. The test case is https://golang.org/cl/248637. This fixes https://golang.org/issue/40252. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline and GCC 10

Re: [PATCH] libibery/hashtab: add new functions

2020-08-17 Thread Ian Lance Taylor via Gcc-patches
On Mon, Aug 17, 2020 at 7:06 AM Martin Liška wrote: > > Adding libiberty maintainer to CC. I guess I'm not sure why either of these belong in libiberty. htab_insert can be written elsewhere as needed. And while perhaps some sort of stats API would be reasonable, I don't think it should be

[no subject]

2020-08-12 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Clément Chigot correctly handles AIX FAT library creation. The previous patch wasn't working everytime. Especially when AR had "-X32_64", the new .so would replace the default one and not just being added. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed

libgo patch committed: Fix system call numbers for ppc

2020-08-11 Thread Ian Lance Taylor via Gcc-patches
The libgo update to the Go1.15rc1 release accidentally broke the system call numbers used for 32-bit PPC. This patch fixes the problem. This fixes GCC PR 96567. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to mainline. Ian 2dda65380ae0b038884ed0e8b30c624486a516c2 diff --git

Go patch committed: Use eqtype on AIX

2020-08-10 Thread Ian Lance Taylor via Gcc-patches
This patch by Clément Chigot changes the Go frontend and library to use an eqtype function on AIX. The AIX linker is not able to merge identical type descriptors in a single symbol if they are coming from different object or shared object files. This results into several pointers referencing the

libgo patch committed: Update to go1.15rc2

2020-08-07 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the go1.15rc2 release candidate. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 10c8507372f3e1c09df0bfe6449c126dee5075de diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index c21b6000229..b6089f3f01d 100644 ---

Re: libgo patch committed: Update to go1.15rc1

2020-08-04 Thread Ian Lance Taylor via Gcc-patches
On Sun, Aug 2, 2020 at 1:00 PM Rainer Orth wrote: > > Hi Ian, > > > This libgo patch updates the sources to the go1.15rc1 release > > candidate. As usual, the changes for this update are too large to > > include in an e-mail message. I've just included the highlights and > > changes to

libgcc patch committed: Increase x86_64 split-stack backoff size

2020-08-03 Thread Ian Lance Taylor via Gcc-patches
With the ever increasing number of vector registers, and the use of the xsavec instruction in the dynamic linker trampolines in newer glibc, we need to ensure a lot more space on the stack when using -fsplit-stack. This patch adds 2048 additional bytes to the required stack space with

Re: libgo patch committed: Update to go1.15rc1

2020-08-03 Thread Ian Lance Taylor via Gcc-patches
On Mon, Aug 3, 2020 at 10:28 AM Andreas Schwab wrote: > > On Aug 03 2020, Ian Lance Taylor wrote: > > > On Sun, Aug 2, 2020 at 12:50 AM Andreas Schwab > > wrote: > >> > >> This breaks ia64-linux. According to > >> arch/ia64/kernel/syscalls/syscall.tbl, the getrandom syscall is 315 and > >>

Re: libgo patch committed: Update to go1.15rc1

2020-08-03 Thread Ian Lance Taylor via Gcc-patches
On Sun, Aug 2, 2020 at 12:50 AM Andreas Schwab wrote: > > This breaks ia64-linux. According to > arch/ia64/kernel/syscalls/syscall.tbl, the getrandom syscall is 315 and > copy_file_range is 323. > > ../../../libgo/go/internal/syscall/unix/copy_file_range_linux.go:13:42: > error: reference to

libgo patch committed: Update to go1.15rc1

2020-08-01 Thread Ian Lance Taylor via Gcc-patches
This libgo patch updates the sources to the go1.15rc1 release candidate. As usual, the changes for this update are too large to include in an e-mail message. I've just included the highlights and changes to GCC-specific files below. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.

Go patch committed: Pass only ptr and len to some runtime calls

2020-07-27 Thread Ian Lance Taylor via Gcc-patches
This patch changes the Go frontend and the libgo runtime package to pass only ptr and len to some runtime calls, rather than passing an entire slice. This ports https://golang.org/cl/227163 to the Go frontend. This is a step toward moving up to the go1.15rc1 release. The original change says

Go patch committed: turn global "a = b; b = x' to "a = x" when possible

2020-07-27 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend changes package-scope "a = b; b = x" to just set "a = x". This avoids requiring an init function to initialize the variable. This can only be done if x is a static initializer. The go1.15rc1 runtime package relies on this optimization. The package has a variable

Go patch committed: Scan all function literals for escape analysis

2020-07-27 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend scans all function literals for escape analysis. We were scanning only function literals with closures, but not all function literals have closures. The effect of this is a missed optimization in some cases: we will allocate some variables on the heap unnecessarily.

Re: libgo patch committed: Update to Go 1.14.6 release

2020-07-23 Thread Ian Lance Taylor via Gcc-patches
On Fri, Jul 17, 2020 at 2:28 PM Ian Lance Taylor wrote: > > This patch to libgo updates it to the Go 1.14.6 release. Bootstrapped > and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. I have now committed this to the GCC 10 branch as well. Ian

libgo patch committed: Add AIX FAT libraries support

2020-07-23 Thread Ian Lance Taylor via Gcc-patches
This patch by Clément Chigot adds AIX FAT library support to libgo. This follows the same general idea as support in other GCC libraries like libgcc and libsdc++. Committed to mainline. Ian 83cc5e2b2f887d4bb2305658da382a65fdcaab29 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE

libgo patch committed: Update to Go 1.14.6 release

2020-07-17 Thread Ian Lance Taylor via Gcc-patches
This patch to libgo updates it to the Go 1.14.6 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian patch.txt.bz2 Description: application/bzip

Go patch committed: Avoid generating unnamed bool type descriptor

2020-07-11 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend avoids generating a type descriptor for the unnamed abstract boolean type. We were generating it in cases where a boolean expression was converted directly to an empty interface type, which caused equality comparisons to fail. This patch adds a check that we never

Go patch committed: Handle aliases to pointer types with interfaces

2020-07-11 Thread Ian Lance Taylor via Gcc-patches
The Go frontend miscompiled some cases where a program defined an alias to a pointer type, and then tried to convert that type to an interface type, or build a method table for that type. This patch fixes those problems. The test case is https://golang.org/cl/241997. Bootstrapped and ran Go

libgo patch committed: Update to Go 1.14.4 release

2020-07-10 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the Go 1.14.4 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to trunk and GCC 10 branch. Ian 2b6d99468d4d988fd5f5ea3e9be41a3dc95a1291 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index ecef60400cc..64b13f410e0 100644

Patch RFA: In C++ demangler don't treat lambda as substitution candidate

2020-07-10 Thread Ian Lance Taylor via Gcc-patches
As discussed in PR 96143, the C++ frontend and the demangler disagree as to whether a lambda is a substitution candidate. According to the ABI, the C++ frontend is behaving correctly. This patch changes the demangler accordingly. This caused the demangling of several existing test cases to

Re: [PATCH] libbacktrace: configure check linker support for DWARF-5

2020-07-07 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jul 7, 2020 at 6:59 AM CHIGOT, CLEMENT wrote: > > Description: > On AIX, the compiler is able to handle DWARF-5 but not the linker. > > Changelog: > 2020-07-07 Clement Chigot > * configure.ac: Extend check to the linker for DWARF-5 support > * configure: Regenerate > > Please apply

Go patch committed: Remove some erroneous code that was never run

2020-06-29 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend removes some erroneous code that was never run. The code accidentally called Type::type_descriptor rather than the do_type_descriptor method. Calling Type::type_descriptor with a second argument of NULL would always crash. Since that never happened, it revealed

libgo patch committed: Update x/sys/cpu to support all GOARCH values

2020-06-15 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Tobias Klauser updates the x/sys/cpu package to add all GOARCH values supported by gccgo. This brings in https://golang.org/cl/237897 from the external x/sys/cpu repo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

libgo patch committed: Use getrandom_linux_generic.go on riscv

2020-06-15 Thread Ian Lance Taylor via Gcc-patches
This patch by Tobias Klauser adds (32-bit) riscv support for the getrandom function in internal/syscall/unix. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 274fa3704bdb79f75088e245772150ab1e83b460 diff --git a/gcc/go/gofrontend/MERGE

libgo patch committed: Correct arenaBaseOffset for aix/ppc

2020-06-12 Thread Ian Lance Taylor via Gcc-patches
This change by Clément Chigot corrects the value of arenaBaseOffset for aix/ppc. The existing value was correct for aix/ppc64, but not for 32-bit ppc. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to master. Ian 75452d68672ff7da6e5a167924b6aeb07b5b2ed1 diff --git

Re: gcc/testsuite/go: increase memory in issue4085b.go

2020-06-12 Thread Ian Lance Taylor via Gcc-patches
On Tue, May 19, 2020 at 6:35 AM CHIGOT, CLEMENT wrote: > > Description: > On aix/ppc64, it's possible to allocate an array of 1<<50 int, because of > the > wider address space. Thus, increase it to 1<<59 like in Golang toolchain in > order to trigger the panic. > > Changelog: > 2020-05-19

Re: ChangeLog files - server and client scripts

2020-05-25 Thread Ian Lance Taylor via Gcc-patches
On Mon, May 25, 2020 at 12:48 AM Martin Liška wrote: > > On 5/23/20 12:14 AM, Ian Lance Taylor wrote: > > Sure, I can wait. Thanks for looking at it. > > Hello. > > Thank you for patience. There's a patch that fixes that, > I'm going to install it. Thanks. I was able to push my change to

libgo patch committed: update x/sys/cpu after gccgo support added

2020-05-25 Thread Ian Lance Taylor via Gcc-patches
This libgo patch updates the x/sys/cpu directory with better support for gccgo on AIX. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to master. Ian e479602af14fc5e76c9040846b2f5e85e126a472 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index

Re: ChangeLog files - server and client scripts

2020-05-22 Thread Ian Lance Taylor via Gcc-patches
On Fri, May 22, 2020 at 12:48 PM Jakub Jelinek wrote: > > On Fri, May 22, 2020 at 12:37:29PM -0700, Ian Lance Taylor wrote: > > Thanks for looking into this. > > > > Unfortunately, my push is still failing. I'm not sure why. > > > > remote: *** ChangeLog format failed: > > remote: ERR: cannot

Re: ChangeLog files - server and client scripts

2020-05-22 Thread Ian Lance Taylor via Gcc-patches
On Fri, May 22, 2020 at 4:11 AM Jakub Jelinek wrote: > > On Fri, May 22, 2020 at 12:04:10PM +0100, Richard Earnshaw wrote: > > >> The directories in question are > > >> > > >> gcc/go/gofrontend > > >> libgo > > >> gcc/testsuite/go.test/test > > > > > > The script has: > > > ignored_prefixes = [ >

Re: ChangeLog files - server and client scripts

2020-05-21 Thread Ian Lance Taylor via Gcc-patches
On Tue, May 19, 2020 at 2:26 AM Martin Liška wrote: > > We've just installed server git hooks that verify git messages > for a correct ChangeLog format. For a limited time period, please > still apply ChangeLog changes to the corresponding ChangeLog files. > We'll use it for comparison of

Re: libgo patch committed: Build syscall test with -static

2020-05-15 Thread Ian Lance Taylor via Gcc-patches
On Fri, May 15, 2020 at 6:42 AM Rainer Orth wrote: > > > On Thu, May 14, 2020 at 12:43 PM Rainer Orth > > wrote: > >> > >> > This libgo patch builds the syscall test with -static. This avoids > >> > problems finding libgo.so when running the test as root, which invokes > >> > the test as a

Re: libgo patch committed: Build syscall test with -static

2020-05-14 Thread Ian Lance Taylor via Gcc-patches
On Thu, May 14, 2020 at 12:43 PM Rainer Orth wrote: > > > This libgo patch builds the syscall test with -static. This avoids > > problems finding libgo.so when running the test as root, which invokes > > the test as a child process in various limited environments. This > > fixes GCC PR 95061.

libgo patch committed: Build syscall test with -static

2020-05-13 Thread Ian Lance Taylor via Gcc-patches
This libgo patch builds the syscall test with -static. This avoids problems finding libgo.so when running the test as root, which invokes the test as a child process in various limited environments. This fixes GCC PR 95061. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to

libbacktrace patch committed: Mark state unused in ztest.c test_large

2020-05-13 Thread Ian Lance Taylor via Gcc-patches
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

libbacktrace patch committed: Treat EACCES like ENOENT

2020-05-13 Thread Ian Lance Taylor via Gcc-patches
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

libgo patch committed: Fix TestCallersNilPointerPanic for GoLLVM

2020-05-11 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Eric Fang fixes TestCallersNilPointerPanic when using GoLLVM. The expected result of TestCallersNilPointerPanic has changed in GoLLVM. This change makes some elements of the expected result optional so that this test passes in both gccgo and GoLLVM. Bootstrapped and ran Go

libgo patch committed: Append to, don't clobber, environment in test

2020-05-11 Thread Ian Lance Taylor via Gcc-patches
This libgo patch changes some tests in the syscall package to append to the environment in tests rather than clobbering the environment. In particular, this preserves LD_LIBRARY_PATH. This is a partial backport of https://golang.org/cl/233318 from the master sources. It's only a partial backport

Go frontend patch committed: Use some const string references

2020-05-11 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend uses const string references in a couple of places that were using plain std::string. This will save some std::string copying. This fixes GCC PR 94766. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to master. Ian diff --git

libbacktrace patch committed: Declare getpagesize if necessary

2020-05-11 Thread Ian Lance Taylor via Gcc-patches
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.

libbacktrace patch committed: Don't crash if no section headers

2020-05-09 Thread Ian Lance Taylor via Gcc-patches
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

libbacktrace patch committed: Don't free strtab if error after reading symbols

2020-05-09 Thread Ian Lance Taylor via Gcc-patches
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

libbacktrace patch committed: Add Mach-O support

2020-05-09 Thread Ian Lance Taylor via Gcc-patches
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. *

libbacktrace patch committed: Support short reads

2020-05-09 Thread Ian Lance Taylor via Gcc-patches
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

libbacktrace patch committed: sometimes read debug sections individually

2020-05-09 Thread Ian Lance Taylor via Gcc-patches
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

libbacktrace patch committed: get executable name on FreeBSD and NetBSD

2020-05-09 Thread Ian Lance Taylor via Gcc-patches
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

libgo patch committed: increase test timeout

2020-04-23 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Eric Fang increases the test timeout to 10 minutes, so that tests can pass on some slow machines. This matches the timeout for the gc tests. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 483096e3130c468a0e1bd224504b394b42662748 diff

libgo patch commit: fix NetBSD build

2020-04-20 Thread Ian Lance Taylor via Gcc-patches
This patch to the libgo by Benny Siegert fixes compiling the runtime package on NetBSD. On NetBSD si_code in siginfo_t is a macro on NetBSD, not a member of the struct itself, so add a C trampoline for receiving its value. Also replace references to mos.waitsemacount with the replacement and add

libgo patch committed: Use 64 bits of hash seed on arm64

2020-04-15 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Eric Fang fixes the Aarch64 implementation of aeshashbody to use all 64 bits of the hash seed. This is the gccgo fix for https://golang.org/issue/33960. Committed to mainline. Ian 4312e0f1391133d6bcd617bb5a81c7caaf6faf99 diff --git a/gcc/go/gofrontend/MERGE

Go patch committed: Mark builtin_prefetch as novops

2020-04-15 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend marks builtin_prefetch as novops. This corresponds to how it is defined in builtins.def. This fixes GCC PR 94607. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 2020-04-15 Ian Lance Taylor PR go/94607 * go-gcc.cc (class

Re: Merge from master to gccgo branch

2020-04-10 Thread Ian Lance Taylor via Gcc-patches
On Tue, Apr 7, 2020 at 12:30 PM Ian Lance Taylor wrote: > > On Mon, Apr 6, 2020 at 5:51 PM Ian Lance Taylor wrote: > > > > I merged master revision 52fa80f853c0b0f623ea9e4c7198e324ce44ff30 to > > the gccgo branch. > > Another merge from master to gccgo branch, of revision >

libgo patch committed: Update to final 1.14.2 release

2020-04-09 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the final 1.14.2 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian d79a22eddc694970316992927c669dd801e07557 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index b3cc9ecb9d1..138425a19d2 100644 ---

Go patch committed: Look up composite literal keys in global namespace

2020-04-09 Thread Ian Lance Taylor via Gcc-patches
In the Go frontend, a composite literal key may not have a global definition, so Gogo::define_global_names may not see it. In order to correctly handle the case in which a predeclared identifier is used as a composite literal key, do an explicit check of the global namespace. The test case is

Re: Merge from master to gccgo branch

2020-04-07 Thread Ian Lance Taylor via Gcc-patches
On Mon, Apr 6, 2020 at 5:51 PM Ian Lance Taylor wrote: > > I merged master revision 52fa80f853c0b0f623ea9e4c7198e324ce44ff30 to > the gccgo branch. Another merge from master to gccgo branch, of revision 50c7853216e8511971c55b51d7fe29173db4749b. Ian

Re: libgcc patch committed: Avoid hooks in split-stack code

2020-04-07 Thread Ian Lance Taylor via Gcc-patches
On Tue, Apr 7, 2020 at 3:33 AM Jakub Jelinek wrote: > > On Tue, Apr 07, 2020 at 12:19:45PM +0200, Richard Biener via Gcc-patches > wrote: > > On Fri, Apr 3, 2020 at 11:59 PM Ian Lance Taylor via Gcc-patches > > wrote: > > > > > > The split-stack code

Merge from master to gccgo branch

2020-04-06 Thread Ian Lance Taylor via Gcc-patches
I merged master revision 52fa80f853c0b0f623ea9e4c7198e324ce44ff30 to the gccgo branch. Ian

libgo patch committed: Update to close to 1.14.2 release

2020-04-06 Thread Ian Lance Taylor via Gcc-patches
I've committed a libgo patch to update to the current Go 1.14 release branch, which is close to the 1.14.2 release. Bootstrapped and tested on x86_64-pc-linux-gnu. Committed to mainline. Ian 2b280af10aa96cb5a6f20a695636b83a187a4e9b diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE

Re: libgcc patch committed: Avoid hooks in split-stack code

2020-04-04 Thread Ian Lance Taylor via Gcc-patches
On Sat, Apr 4, 2020 at 1:35 PM H.J. Lu wrote: > > On Sat, Apr 4, 2020 at 1:28 PM Eric Botcazou wrote: > > > > > Hmmm, sorry about that. Which target? x86_64? It does seem that > > > glibc consolidated mmap implementations in 2.26, but even in 2.22 I > > > see definitions for __mmap. > > > >

Re: libgcc patch committed: Avoid hooks in split-stack code

2020-04-04 Thread Ian Lance Taylor via Gcc-patches
On Sat, Apr 4, 2020 at 10:10 AM Eric Botcazou wrote: > > > 2020-04-03 Ian Lance Taylor > > > > * generic-morestack.c: On GNU/Linux use __mmap/__munmap rather > > than mmap/munmap, to avoid hooks. > > This breaks the build of gotools for me with undefined references to __mmap > and __munmap

libgcc patch committed: Avoid hooks in split-stack code

2020-04-03 Thread Ian Lance Taylor via Gcc-patches
The split-stack code invokes mmap and munmap with a limited amount of stack space. That is fine when the functions just make a system call, but it's not fine when programs use LD_PRELOAD or linker tricks to add hooks to mmap/munmap. Those hooks may use too much stack space, leading to an obscure

Re: [PATCH] [libiberty] Fix read buffer overflow in split_directories

2019-11-29 Thread Ian Lance Taylor via gcc-patches
On Thu, Nov 28, 2019 at 1:11 PM Tim Rühsen wrote: > > An empty name param leads to read buffer overflow in > function split_directories. > > * libiberty/make-relative-prefix.c (split_directories): > Return early on empty name. > --- > libiberty/ChangeLog | 7 +++ >

Re: [PATCH] Fix slowness in demangler

2019-11-12 Thread Ian Lance Taylor via gcc-patches
On Tue, Nov 12, 2019 at 6:15 AM Tim Rühsen wrote: > > this is a proposal to fix > https://sourceware.org/bugzilla/show_bug.cgi?id=25180 > > In short: > cxxfilt > _ZZ1_DO1z1Dclaa1D1VEE1VE2zo > > takes several minutes with 100%

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-11-08 Thread Ian Lance Taylor via gcc-patches
On Fri, Nov 8, 2019 at 11:17 AM Eduard-Mihai Burtescu wrote: > > On Fri, Nov 8, 2019, at 7:43 PM, Ian Lance Taylor wrote: > > On Fri, Nov 8, 2019 at 9:02 AM Eduard-Mihai Burtescu wrote: > > > > > > Ping #2 for https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01830.html > > > Original patch (without

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-11-08 Thread Ian Lance Taylor via gcc-patches
On Fri, Nov 8, 2019 at 9:02 AM Eduard-Mihai Burtescu wrote: > > Ping #2 for https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01830.html > Original patch (without the early exit optimization): > https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01591.html Sorry for letting this slide. Do we need the

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-10-22 Thread Ian Lance Taylor via gcc-patches
On Tue, Oct 22, 2019 at 11:08 AM Eduard-Mihai Burtescu wrote: > > @@ -160,27 +159,20 @@ cplus_demangle (const char *mangled, int options) >if ((options & DMGL_STYLE_MASK) == 0) > options |= (int) current_demangling_style & DMGL_STYLE_MASK; > > + /* The Rust demangling is implemented

Re: [Patch][Demangler] Fix for complex values

2019-10-18 Thread Ian Lance Taylor via gcc-patches
On Thu, Oct 17, 2019 at 10:20 PM Miguel Saldivar wrote: > > This is a small fix for Bug 67299, where symbol: `Z1fCf` which would become > `f(float complex)` instead of `f(floatcomplex )`. > I thought this would be the preferred way of printing, because both > `llvm-cxxfilt` and `cpp_filt` both

Re: [PATCH] Fix up go regressions caused by my recent switchconv changes (PR go/91617)

2019-08-31 Thread Ian Lance Taylor via gcc-patches
On Sat, Aug 31, 2019 at 6:12 AM Jakub Jelinek wrote: > > Hi! > > Apparently my recent tree-{cfg,switch-conversion}.c changes broke a bunch of > go tests. > The problem is that range_check_type actually doesn't guarantee an unsigned > type; it forces integer type for enum/bool (that was what was

Re: [PATCH] Simplify and generalize rust-demangle's unescaping logic.

2019-08-26 Thread Ian Lance Taylor via gcc-patches
On Wed, Aug 14, 2019 at 10:24 AM Eduard-Mihai Burtescu wrote: > > Previously, rust-demangle.c was special-casing a fixed number > of '$uXY$' escapes, but 'XY' can technically be any hex value, > representing some Unicode codepoint. > > This patch adds more general support for '$u...$' escapes, >

Re: [PATCH] implement -Wformat-diag, v2

2019-06-21 Thread Ian Lance Taylor via gcc-patches
On Wed, Jun 19, 2019 at 12:49 PM Martin Sebor wrote: > > > gcc-wformat-diag-checker.diff > > gcc/c-family/ChangeLog: > > * c-format.c (function_format_info::format_type): Adjust type. > (function_format_info::is_raw): New member. >

Re: [PATCH] Move rust_{is_mangled,demangle_sym} to a private libiberty header.

2019-06-02 Thread Ian Lance Taylor via gcc-patches
On Sat, Jun 1, 2019 at 7:15 AM Eduard-Mihai Burtescu wrote: > > 2019-06-01 Eduard-Mihai Burtescu > include/ChangeLog: > * demangle.h (rust_is_mangled): Move to libiberty/rust-demangle.h. > (rust_demangle_sym): Move to libiberty/rust-demangle.h. > libiberty/ChangeLog: >

Re: [PATCH] libiberty: Only declare vasprintf if it was checked for

2019-04-24 Thread Ian Lance Taylor via gcc-patches
On Mon, Apr 22, 2019 at 11:51 PM Michael Forney wrote: > > This matches how the the rest of the libc functions are declared and > prevents a potential conflict with the system declaration when libiberty.h > is included from a directory that did not check for vasprintf, but it is > available. It

Re: [PATCH] Fix PR71598, aliasing between enums and compatible types

2019-04-03 Thread Ian Lance Taylor via gcc-patches
On Wed, Apr 3, 2019 at 6:19 AM Christophe Lyon wrote: > > Thanks, here is what I have committed as r270126. > (skip one test on short_enums targets, skip the other one on > non-short_enums targets) I noticed that your testsuite/ChangeLog entry is marked 2019-04-13, but it should perhaps be

Re: [PATCH] [libbacktrace] Initialize st in elf_is_symlink

2019-03-18 Thread Ian Lance Taylor via gcc-patches
On Mon, Mar 18, 2019 at 11:57 AM James Hilliard wrote: > > On Mon, Mar 18, 2019 at 11:19 AM Ian Lance Taylor wrote: > > > > On Sun, Mar 17, 2019 at 6:22 PM wrote: > > > > > > From: James Hilliard > > > > > > Fixes error: ‘st.st_mode’ may be used uninitialized in this function > > > --- > > >

Re: [PATCH] [libbacktrace] Initialize st in elf_is_symlink

2019-03-18 Thread Ian Lance Taylor via gcc-patches
On Sun, Mar 17, 2019 at 6:22 PM wrote: > > From: James Hilliard > > Fixes error: ‘st.st_mode’ may be used uninitialized in this function > --- > libbacktrace/elf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c > index

Re: [PATCH][libbacktrace] Add btest_lto

2019-02-26 Thread Ian Lance Taylor via gcc-patches
On Tue, Feb 26, 2019 at 6:27 AM Tom de Vries wrote: > > On 26-02-19 13:00, Thomas Schwinge wrote: > > Hi Tom! > > > > On Tue, 26 Feb 2019 12:28:34 +0100, Tom de Vries wrote: > >> On 26-02-19 10:40, Thomas Schwinge wrote: > >>> On Mon, 25 Feb 2019 18:11:23 +0100, Tom de Vries wrote: > On

Re: [PATCH][libbacktrace] Handle bsearch with NULL base in dwarf_lookup_pc

2019-02-12 Thread Ian Lance Taylor via gcc-patches
On Tue, Feb 12, 2019 at 12:36 AM Tom de Vries wrote: > > The call to bsearch in dwarf_lookup_pc can have NULL as base argument when > the nmemb argument is 0. The base argument is required to be pointing to the > initial member of an array of nmemb objects. It is not specified what >

Re: [PATCH][libbacktrace] Add btest_lto

2019-02-09 Thread Ian Lance Taylor via gcc-patches
On Fri, Feb 8, 2019 at 1:42 AM Tom de Vries wrote: > > Add libbacktrace test-case using -flto. > > OK for trunk? > > Thanks, > - Tom > > [libbacktrace] Add btest_lto > > 2019-02-08 Tom de Vries > > * Makefile.am (BUILDTESTS): Add btest_lto. > * Makefile.in: Regenerate. >

Re: [PATCH 9/9] [libbacktrace] Add printdwarftest_dwz_cmp.sh test-case

2019-01-18 Thread Ian Lance Taylor via gcc-patches
On Fri, Jan 18, 2019 at 4:45 PM Tom de Vries wrote: > > On 18-01-19 15:23, Ian Lance Taylor wrote: > > On Thu, Jan 17, 2019 at 5:59 AM Tom de Vries wrote: > >> > >> now that the rest of the patch series has been committed, here's an > >> updated version of this patch that applies to trunk. > > >

Re: [PATCH 9/9] [libbacktrace] Add printdwarftest_dwz_cmp.sh test-case

2019-01-18 Thread Ian Lance Taylor via gcc-patches
On Thu, Jan 17, 2019 at 5:59 AM Tom de Vries wrote: > > now that the rest of the patch series has been committed, here's an > updated version of this patch that applies to trunk. I would much rather put dwarf_data into internal.h than to #include "dwarf.c" from a different file. Using #include

Re: [PATCH 1/9] [libbacktrace] Read .gnu_debugaltlink

2019-01-16 Thread Ian Lance Taylor via gcc-patches
On Wed, Jan 16, 2019 at 8:26 AM Tom de Vries wrote: > > On 16-01-19 01:56, Ian Lance Taylor wrote: > > On Tue, Dec 11, 2018 at 2:14 AM Tom de Vries wrote: > >> > >> Read the elf file pointed at by the .gnu_debugaltlink section, and verify > >> that > >> the build id matches. > >> > >>

Re: [PATCH 6/9] [libbacktrace] Factor out read_referenced_name_1

2019-01-15 Thread Ian Lance Taylor via gcc-patches
On Tue, Dec 11, 2018 at 2:15 AM Tom de Vries wrote: > > Factor out the common handling of DW_AT_abstract_origin and > DW_AT_specification from read_function_entry and read_referenced_name. > > 2018-12-10 Tom de Vries > > * dwarf.c (read_referenced_name_1): New function. Factor out of

Re: [PATCH 5/9] [libbacktrace] Unify function name preference handling

2019-01-15 Thread Ian Lance Taylor via gcc-patches
On Tue, Dec 11, 2018 at 2:15 AM Tom de Vries wrote: > > Both read_function_entry and read_referenced_name implement a priority scheme > for names. The priorities are: > - 1st: DW_AT_linkage_name > - 2nd: Name from DW_AT_abstract_origin or DW_AT_specification > - 3rd: DW_AT_name. > > Ensure both

Re: [PATCH 4/9] [libbacktrace] Handle DW_FORM_GNU_strp_alt

2019-01-15 Thread Ian Lance Taylor via gcc-patches
On Tue, Dec 11, 2018 at 2:15 AM Tom de Vries wrote: > > Handle DW_FORM_GNU_strp_alt which references the .debug_str section in the > .gnu_debugaltlink file. > > 2018-11-11 Tom de Vries > > * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt > using altlink. This is OK.

Re: [PATCH 1/9] [libbacktrace] Read .gnu_debugaltlink

2019-01-15 Thread Ian Lance Taylor via gcc-patches
On Tue, Dec 11, 2018 at 2:14 AM Tom de Vries wrote: > > Read the elf file pointed at by the .gnu_debugaltlink section, and verify that > the build id matches. > > 2018-11-11 Tom de Vries > > * elf.c (elf_add): Add and handle with_buildid_data and > with_buildid_size parameters.

Re: [PATCH 4/4][libbacktrace] Add tests for unused formats

2019-01-03 Thread Ian Lance Taylor via gcc-patches
On Thu, Jan 3, 2019 at 3:49 AM Iain Sandoe wrote: > > > On 2 Jan 2019, at 13:26, Iain Sandoe wrote: > > > > > >> On 2 Jan 2019, at 13:20, Rainer Orth wrote: > >> > >> Gerald Pfeifer writes: > >> > >>> > > >>> > >>> I believe that in addition to FreeBSD this probably also fails on > >>>

Re: [PATCH 5/5][libbacktrace] Reduce memory usage in build_address_map

2018-12-27 Thread Ian Lance Taylor via gcc-patches
On Wed, Nov 28, 2018 at 3:18 PM Tom de Vries wrote: > > In build_address_map we allocate a unit, and then look for addresses in the > unit, which we store in the addrs vector, with the elements pointing to the > unit. However, if we cannot find addresses in the unit, the allocated unit is > not

Re: [PATCH 4/5][libbacktrace] Simplify memory management in build_address_map

2018-12-27 Thread Ian Lance Taylor via gcc-patches
On Wed, Nov 28, 2018 at 3:17 PM Tom de Vries wrote: > > In the main loop in build_address_map, we first read the abbrevs into a local > variable abbrevs, and then allocate the corresponding unit, after which we > assign > the abbrevs to the unit. This results in dedicated free-upon-failure >

Re: [PATCH 3/5][libbacktrace] Fix memory leak in loop in build_address_map

2018-12-27 Thread Ian Lance Taylor via gcc-patches
On Wed, Nov 28, 2018 at 3:17 PM Tom de Vries wrote: > > When failing in build_address_map, we free the unit that's currently being > handled in the loop, but the ones that already have been allocated are leaked. > > Fix this by keeping track of allocated units in a vector, and releasing them >

Re: [PATCH 2/5][libbacktrace] Fix memory leak in build_address_map

2018-12-27 Thread Ian Lance Taylor via gcc-patches
On Wed, Nov 28, 2018 at 3:16 PM Tom de Vries wrote: > > While upon failure in build_address_map we call free_unit_addrs_vector, this > does not actually free the addrs vector, but merely the abbrevs of the units > pointed at by the elements of the addrs vector. > > Fix this by adding code to

Re: RFA: libiberty: Add a limit on demangling qualifiers (PR 87241) (version 2)

2018-12-12 Thread Ian Lance Taylor via gcc-patches
On Wed, Dec 12, 2018 at 3:40 AM Nick Clifton wrote: > > *sigh* 5 minutes after sending the patch for this PR, I realised that >I had made a mistake. I should have conditionalized the limit on the >number of supported qualifiers, so that the check is only made if we >have resource

Re: [PATCH][libbacktrace] Add allocfail.sh test-case

2018-12-12 Thread Ian Lance Taylor via gcc-patches
On Tue, Dec 11, 2018 at 11:04 PM Tom de Vries wrote: > > [ Fixed ENOPATCH ] > > On 12-12-18 08:03, Tom de Vries wrote: > > On 11-12-18 18:59, Ian Lance Taylor wrote: > >> On Wed, Nov 28, 2018 at 4:50 AM Tom de Vries wrote: > >>> > >>> Add test-case that forces alloc.c functions to fail, and

Re: [PATCH][libbacktrace] Add allocfail.sh test-case

2018-12-11 Thread Ian Lance Taylor via gcc-patches
On Wed, Nov 28, 2018 at 4:50 AM Tom de Vries wrote: > > Add test-case that forces alloc.c functions to fail, and check whether fail > handling is robust. > > This is the test-case for "[libbacktrace] Fix segfault upon allocation > failure". Without that patch, this test-case fails like this: >

Re: [PATCH] Set DEMANGLE_RECURSION_LIMIT to 1536

2018-12-11 Thread Ian Lance Taylor via gcc-patches
On Tue, Dec 11, 2018 at 3:05 AM Pedro Alves wrote: > > I noticed that the comment on top of __cxa_demangle says: > > "If OUTPUT_BUFFER is not long enough, it is expanded using realloc." > > and __cxa_demangle calls 'free'. > > And d_demangle, seemingly the workhorse for __cxa_demangle says: > >

Re: [PATCH] Set DEMANGLE_RECURSION_LIMIT to 1536

2018-12-10 Thread Ian Lance Taylor via gcc-patches
On Mon, Dec 10, 2018 at 7:35 AM Jakub Jelinek wrote: > > On Mon, Dec 10, 2018 at 03:26:18PM +, Nick Clifton wrote: > > >> My current suggestion > > >> is to raise the limit to 2048, which allows the libiberty patch to > > >> pass. But do you have a feel for how much is a realistic limit ? >

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler [v5]

2018-12-06 Thread Ian Lance Taylor via gcc-patches
On Thu, Dec 6, 2018 at 3:12 AM Nick Clifton wrote: > > Is the patch OK with you ? Yes, thanks. Ian

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler [v3]

2018-12-03 Thread Ian Lance Taylor via gcc-patches
On Mon, Dec 3, 2018 at 6:45 AM, Nick Clifton wrote: > Hi Richard, > >>> * The description of the DMGL_RECURSE_LIMIT option in demangle.h has >>> been enhanced to add a note that if the option is not used, then >>> bug reports about stack overflows in the demangler will be rejected. >>

Re: [PATCH 4/4][libbacktrace] Add tests for unused formats

2018-11-30 Thread Ian Lance Taylor via gcc-patches
On Fri, Nov 30, 2018 at 1:06 AM, Tom de Vries wrote: > On 29-11-18 19:28, Ian Lance Taylor wrote: >> On Fri, Nov 23, 2018 at 12:56 PM, Tom de Vries wrote: >>> >>> When building libbacktrace, we typically use elf.c, and don't build >>> pecoff.c, >>> xcoff.c or unknown.c >>> >>> Add testcases

Re: [PATCH 1/4][libbacktrace] Test check_PROGRAMS without mmap

2018-11-30 Thread Ian Lance Taylor via gcc-patches
>> As far as I know libbacktrace does not currently rely on using GNU >> make. I'd rather not add that dependency for this purpose (I don't >> mind adding this kind of testing but to me this seems only of mild >> interest--I expect that all significant libbacktrace users have mmap). >> You should

<    1   2   3   4   5   6   >