Re: [PATCH 5/4] libbacktrace: improve getting debug information for loaded dlls

2024-05-03 Thread Ian Lance Taylor via Gcc
On Thu, May 2, 2024 at 12:23 PM Björn Schäpers wrote: > > Am 28.04.2024 um 20:16 schrieb Ian Lance Taylor: > > > > Which of your other patches are still relevant? Thanks. > > > only this one. Thanks. Committed. Ian

[gcc r15-140] libbacktrace: add DLLS as they are loaded

2024-05-03 Thread Ian Lance Taylor via Gcc-cvs
https://gcc.gnu.org/g:b69dac54ef769a33bcdca6de243c1b08e05c7881 commit r15-140-gb69dac54ef769a33bcdca6de243c1b08e05c7881 Author: Ian Lance Taylor Date: Fri May 3 15:23:23 2024 -0700 libbacktrace: add DLLS as they are loaded Patch from Björn Schäpers. * pecoff.c

Re: Updated Sourceware infrastructure plans

2024-05-02 Thread Ian Lance Taylor via Gcc
On Wed, May 1, 2024 at 11:48 PM Richard Biener wrote: > > We'd only know for sure if we try. But then I'm almost 100% sure that > having to click in a GUI is slower than 'nrOK^X' in the text-mode mail UA > I am using for "quick" patch review. It might be comparable to the > review parts I do in

[gcc r15-53] runtime: dump registers on Solaris

2024-04-29 Thread Ian Lance Taylor via Gcc-cvs
https://gcc.gnu.org/g:a05efc8bf5ed329ea7d9b1740c326bdc6b04e37a commit r15-53-ga05efc8bf5ed329ea7d9b1740c326bdc6b04e37a Author: Ian Lance Taylor Date: Sun Apr 28 13:30:39 2024 -0700 runtime: dump registers on Solaris Patch by Rainer Orth . Fixes PR go/106813

[gcc r15-52] runtime: use

2024-04-29 Thread Ian Lance Taylor via Gcc-cvs
https://gcc.gnu.org/g:678dc5e85053f1a1ca76997eec95ba8823bb6830 commit r15-52-g678dc5e85053f1a1ca76997eec95ba8823bb6830 Author: Ian Lance Taylor Date: Sun Apr 28 09:57:35 2024 -0700 runtime: use has been available since C99. Use it rather than defining our own boolean type

Re: [PATCH 5/4] libbacktrace: improve getting debug information for loaded dlls

2024-04-28 Thread Ian Lance Taylor via Gcc
On Thu, Apr 25, 2024 at 1:15 PM Björn Schäpers wrote: > > > Attached is the combined version of the two patches, only implementing the > > variant with the tlhelp32 API. > > > > Tested on x86 and x86_64 windows. > > > > Kind regards, > > Björn. > > A friendly ping. Thanks. Committed as follows.

[gcc r15-25] libbacktrace: load Windows modules

2024-04-28 Thread Ian Lance Taylor via Gcc-cvs
https://gcc.gnu.org/g:942a9cf2a958113d2ab46f5b015c36e569abedcf commit r15-25-g942a9cf2a958113d2ab46f5b015c36e569abedcf Author: Ian Lance Taylor Date: Sun Apr 28 11:14:17 2024 -0700 libbacktrace: load Windows modules Patch from Björn Schäpers . * configure.ac:

[gcc r14-10095] libbacktrace: test --compress-debug-sections=ARG for each ARG

2024-04-23 Thread Ian Lance Taylor via Gcc-cvs
https://gcc.gnu.org/g:d2f05fed44951001de3cb02c9193c687e9376170 commit r14-10095-gd2f05fed44951001de3cb02c9193c687e9376170 Author: Ian Lance Taylor Date: Tue Apr 23 10:00:03 2024 -0700 libbacktrace: test --compress-debug-sections=ARG for each ARG This should fix a testsuite

Re: Updated Sourceware infrastructure plans

2024-04-23 Thread Ian Lance Taylor via Gcc
On Tue, Apr 23, 2024 at 2:32 AM Richard Earnshaw (lists) via Gcc wrote: > > I've been forced to use gerrit occasionally. I hate it. No, I LOATHE it. > The UI is anything but intuitive with features hidden behind unobvious > selections. IMO It's not a tool for a casual developer, which makes

Re: Sourceware mitigating and preventing the next xz-backdoor

2024-04-03 Thread Ian Lance Taylor via Gcc
On Wed, Apr 3, 2024 at 11:05 AM Toon Moene wrote: > > Two questions arise (as far as I am concerned): > > 1. Do daemons like sshd *have* to be linked with shared libraries ? > Or could it be left to the security minded of the downstream > (binary) distributions to link it statically with

Re: Sourceware mitigating and preventing the next xz-backdoor

2024-04-02 Thread Ian Lance Taylor via Gcc
On Tue, Apr 2, 2024 at 1:21 PM Paul Koning via Gcc wrote: > > Would it help to require (rather than just recommend) "don't use root except > for the actual 'install' step" ? Seems reasonable, but note that it wouldn't make any difference to this attack. The liblzma library was modified to

[gcc r14-9698] compiler: use correct size and comparison in index value overflow check

2024-03-27 Thread Ian Lance Taylor via Gcc-cvs
https://gcc.gnu.org/g:bd8a3eecc4edffad6e5091ae42c1cb1c1730b2ab commit r14-9698-gbd8a3eecc4edffad6e5091ae42c1cb1c1730b2ab Author: Ian Lance Taylor Date: Wed Mar 27 13:37:45 2024 -0700 compiler: use correct size and comparison in index value overflow check This has apparently been

[gcc r14-9695] gcc/testsuite/go.test: update issue16016

2024-03-27 Thread Ian Lance Taylor via Gcc-cvs
https://gcc.gnu.org/g:9ff034fcff8ccab6eb82bf2cd36e2d24b2df9b78 commit r14-9695-g9ff034fcff8ccab6eb82bf2cd36e2d24b2df9b78 Author: Ian Lance Taylor Date: Wed Mar 27 11:44:42 2024 -0700 gcc/testsuite/go.test: update issue16016 This backports https://go.dev/cl/574536 into the GCC

[gcc r14-9693] compiler: initialize local variable in lower_method_expression

2024-03-27 Thread Ian Lance Taylor via Gcc-cvs
https://gcc.gnu.org/g:f85d3362cdb4bab611508dd9a38d9015c02ff7ca commit r14-9693-gf85d3362cdb4bab611508dd9a38d9015c02ff7ca Author: Ian Lance Taylor Date: Tue Mar 26 13:00:03 2024 -0700 compiler: initialize local variable in lower_method_expression Fixes PR go/114463

[gcc r14-9402] libbacktrace: don't assume compressed section is aligned

2024-03-08 Thread Ian Lance Taylor via Gcc-cvs
https://gcc.gnu.org/g:5825bd0e0d0040126e78269e56c9b9f533e2a520 commit r14-9402-g5825bd0e0d0040126e78269e56c9b9f533e2a520 Author: Ian Lance Taylor Date: Fri Mar 8 13:55:34 2024 -0800 libbacktrace: don't assume compressed section is aligned Patch originally by GitHub user ubyte at

Re: [PATCH 5/4] libbacktrace: improve getting debug information for loaded dlls

2024-01-25 Thread Ian Lance Taylor via Gcc
On Thu, Jan 25, 2024 at 11:53 AM Björn Schäpers wrote: > > Am 23.01.2024 um 23:37 schrieb Ian Lance Taylor: > > On Thu, Jan 4, 2024 at 2:33 PM Björn Schäpers wrote: > >> > >> Am 03.01.2024 um 00:12 schrieb Björn Schäpers: > >>> Am 30.11.2023 um 20:53 schrieb Ian Lance Taylor: > On Fri, Jan

Re: [PATCH 5/4] libbacktrace: improve getting debug information for loaded dlls

2024-01-23 Thread Ian Lance Taylor via Gcc
On Thu, Jan 4, 2024 at 2:33 PM Björn Schäpers wrote: > > Am 03.01.2024 um 00:12 schrieb Björn Schäpers: > > Am 30.11.2023 um 20:53 schrieb Ian Lance Taylor: > >> On Fri, Jan 20, 2023 at 2:55 AM Björn Schäpers wrote: > >>> > >>> From: Björn Schäpers > >>> > >>> Fixes

Re: [PATCH 4/4] libbacktrace: get debug information for loaded dlls

2023-11-30 Thread Ian Lance Taylor via Gcc
On Fri, Jan 20, 2023 at 2:55 AM Björn Schäpers wrote: > > From: Björn Schäpers > > Fixes https://github.com/ianlancetaylor/libbacktrace/issues/53, except > that libraries loaded after the backtrace_initialize are not handled. > But as far as I can see that's the same for elf. Thanks, but I

Re: [PATCH 3/4] libbacktrace: work with aslr on windows

2023-11-30 Thread Ian Lance Taylor via Gcc
On Mon, Nov 20, 2023 at 11:58 AM Björn Schäpers wrote: > > An updated version, using neither A or W, but just the macro. Thanks. Committed as follows. Ian 1017495bc91d40570f58c37e88ca013164782129 diff --git a/libbacktrace/pecoff.c b/libbacktrace/pecoff.c index 56af4828e27..f976a963bf3 100644

Re: [PATCH 2/4] libbacktrace: detect executable path on windows

2023-11-29 Thread Ian Lance Taylor via Gcc
On Mon, Nov 20, 2023 at 11:57 AM Björn Schäpers wrote: > > this is what I'm using with GCC 12 and 13 on my windows machines, rebased onto > the current HEAD. Thanks. Committed as follows. Ian * fileline.c: Include if available. (windows_get_executable_path): New

Re: libgo: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR109951] (was: [PATCH 3/4] libgo/test: Fix compilation for build sysroot)

2023-09-12 Thread Ian Lance Taylor via Gcc-patches
On Tue, Sep 12, 2023 at 4:16 AM Thomas Schwinge wrote: > > As we've found, this is conceptually problematic, as discussed in > > "Consider '--with-build-sysroot=[...]' for target libraries' build-tree > testing (instead of

godump.cc patch committed: Handle _BitInt

2023-09-06 Thread Ian Lance Taylor via Gcc-patches
This patch to godump.cc adds support for BITINT_TYPE. Bootstrapped and ran godump and Go tests on x86_64-pc-linux-gnu. Committed to mainline. Ian gcc/ PR go/111310 * godump.cc (go_format_type): Handle BITINT_TYPE. gcc/testsuite/ PR go/111310 *

libgo patch committed: permit $AR to include options

2023-09-06 Thread Ian Lance Taylor via Gcc-patches
This libgo patch changes the go tool to permit the AR environment variable to include options. This mirrors the way it already handles the CC environment variable. This ports https://go.dev/cl/526275 to the gofrontend repo. This is needed for gccgo testing because the top-level GCC Makefile now

Re: [RFC] GCC Security policy

2023-08-08 Thread Ian Lance Taylor via Gcc-patches
On Tue, Aug 8, 2023 at 7:37 AM Jakub Jelinek wrote: > > BTW, I think we should perhaps differentiate between production ready > libraries (e.g. libgcc, libstdc++, libgomp, libatomic, libgfortran, > libquadmath, > libssp) vs. e.g. the sanitizer libraries which are meant for debugging and > I

Re: [RFC] GCC Security policy

2023-08-08 Thread Ian Lance Taylor via Gcc-patches
On Tue, Aug 8, 2023 at 6:02 AM Jakub Jelinek via Gcc-patches wrote: > > On Tue, Aug 08, 2023 at 02:52:57PM +0200, Richard Biener via Gcc-patches > wrote: > > There's probably external tools to do this, not sure if we should replicate > > things in the driver for this. > > > > But sure, I think

Re: [PATCH] [libbacktrace] fix up broken test

2023-08-03 Thread Ian Lance Taylor via Gcc-patches
On Thu, Aug 3, 2023 at 6:27 AM Richard Biener via Gcc-patches wrote: > > zstdtest has some inline data where some testcases lack the > uncompressed length field. Thus it computes that but still > ends up allocating memory for the uncompressed buffer based on > that (zero) length. Oops. Causes

libbacktrace patch committed

2023-07-31 Thread Ian Lance Taylor via Gcc-patches
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:

libgo patch committet: Don't collect package CGOLDFLAGS

2023-07-20 Thread Ian Lance Taylor via Gcc-patches
This libgo patch to the go command sources stops collecting package CGOLDFLAGS when using gccgo. The flags are already collected via cmd/cgo. The gccgo_link_c test is tweaked to do real linking as with this change the cgo ldflags are not fully reflected in go build -n output, since they now only

Re: wishlist: support for shorter pointers

2023-07-03 Thread Ian Lance Taylor via Gcc
On Wed, Jun 28, 2023 at 11:21 PM Rafał Pietrak via Gcc wrote: > > W dniu 28.06.2023 o 17:44, Richard Earnshaw (lists) pisze: > [---] > > I think I understand what you're asking for but: > > 1) You'd need a new ABI specification to handle this, probably involving > > register assignments

Re: New version of gnu assembler

2023-07-02 Thread Ian Lance Taylor via Gcc
On Sun, Jul 2, 2023 at 9:50 AM Dave Blanchard wrote: > > On Sat, 01 Jul 2023 13:33:07 +0100 > Sam James via Gcc wrote: > > > If you've taken files from Binutils BFD, please make sure you preserve > > the copyright headers too. > > Why? How is that important? That's all you have to say about

Re: Merge from trunk to gccgo branch

2023-06-26 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 3a39a31b8ae9c6465434aefa657f7fcc86f905c0 to the gccgo branch. Ian

Go patch committed: Support -fgo-importcfg

2023-06-26 Thread Ian Lance Taylor via Gcc-patches
The gc Go compiler has a -importcfg option that takes a file that provides a mapping from import paths to the files that satisfy those imports. This is used by the go build tool to let the compiler read imported packages directly out of the build cache. Without this option the go build tool has

Go patch committed: Support bootstrapping Go 1.21

2023-06-23 Thread Ian Lance Taylor via Gcc-patches
compiler, libgo: support bootstrapping gc compiler In the Go 1.21 release the package internal/profile imports internal/lazyregexp. That works when bootstrapping with Go 1.17, because that compiler has internal/lazyregep and permits importing it. We also have internal/lazyregexp in libgo, but

Re: [PATCH 1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS

2023-06-22 Thread Ian Lance Taylor via Gcc-patches
On Thu, Jun 22, 2023, 4:47 PM Peter Bergner wrote: > On 6/22/23 6:37 PM, Peter Bergner via Gcc-patches wrote: > > On 6/16/23 12:01 PM, Ian Lance Taylor via Gcc-patches wrote: > >> On Fri, Jun 16, 2023 at 9:00 AM Paul E. Murphy via Gcc-patches > >> wrote: > &

Go patch committed: Determine types of Slice_{value, info} expressions

2023-06-21 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend determines the types of a couple of expressions types that accidentally failed to recurse into their subexpressions. The test case for this is https://go.dev/cl/505015. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Merge from trunk to gccgo branch

2023-06-21 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 577223aebc7acdd31e62b33c1682fe54a622ae27 to the gccgo branch. Ian

Re: libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jun 20, 2023 at 11:35 AM Andreas Schwab wrote: > > On Jun 20 2023, Ian Lance Taylor via Gcc-patches wrote: > > > This libgo patches changes the runtime pacakge to use a C function to call > > mmap. > > > > The final argument to mmap, of type off_t, varies

libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Ian Lance Taylor via Gcc-patches
This libgo patches changes the runtime pacakge to use a C function to call mmap. The final argument to mmap, of type off_t, varies. In https://go.dev/cl/445375 (https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604158.html) we changed it to always use the C off_t type, but that broke 32-bit

libgo patch committed: Add benchmarks and examples to test list

2023-06-16 Thread Ian Lance Taylor via Gcc-patches
In https://go.dev/cl/384695 (https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590289.html) I simplified the code that built lists of benchmarks, examples, and fuzz tests, and managed to break it. This patch corrects the code to once again make the benchmarks available, and to run the

Re: [PATCH 1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS

2023-06-16 Thread Ian Lance Taylor via Gcc-patches
On Fri, Jun 16, 2023 at 9:00 AM Paul E. Murphy via Gcc-patches wrote: > > TARGET_AIX is defined to a non-zero value on linux and maybe other > powerpc64le targets. This leads to unexpected behavior such as > dropping the .go_export section when linking a shared library > on linux/powerpc64le. >

Re: When do I need -fnon-call-exceptions?

2023-06-07 Thread Ian Lance Taylor via Gcc
On Wed, Jun 7, 2023 at 10:09 AM Helmut Zeisel via Gcc wrote: > > I wrote some simple program that set a signal handler for SIGFPE, throws a > C++ exception in the signal handler > and catches the exception. > I compiled with and without -fnon-call-exceptions (on x64 Linux). > In both cases, the

Re: [PATCH] libgcc: Use initarray section type for .init_stack

2023-05-31 Thread Ian Lance Taylor via Gcc-patches
On Wed, May 31, 2023 at 12:41 AM Kewen.Lin via Gcc-patches wrote: > > >> libgcc/ChangeLog: > >> > >> * config/i386/morestack.S: Use @init_array rather than > >> @progbits for section type of section .init_array. > >> * config/rs6000/morestack.S: Likewise. > >> *

libgo patch committed: Add syscall.prlimit

2023-05-11 Thread Ian Lance Taylor via Gcc-patches
As of https://go.dev/cl/476695 the package golang.org/x/sys/unix expects a syscall.prlimit function to exist. This libgo patch adds that function. This is for https://go.dev/issue/46279 and https://go.dev/issue/59712. Since this is a small patch and is needed to compile the widely used

Re: More C type errors by default for GCC 14

2023-05-09 Thread Ian Lance Taylor via Gcc
On Tue, May 9, 2023 at 9:45 AM Florian Weimer via Gcc wrote: > > The part David quoted above is about this: > > $ gcc -fno-gnu89-inline -std=gnu89 t.c > cc1: error: ‘-fno-gnu89-inline’ is only supported in GNU99 or C99 mode > > And some packages need -fno-gnu89-inline, but also rely on implicit

libgo patch committed: Remove test ordering dependency in mime

2023-04-07 Thread Ian Lance Taylor via Gcc-patches
This libgo patch removes a test ordering dependency in the mime package. This is a backport of https://go.dev/cl/421442 from the upstream repo. This fixes https://go.dev/issue/51648. Bootstrapped and ran mime tests on x86_64-pc-linux-gnu. Committed to mainline. Ian

Merge from trunk to gccgo branch

2023-03-29 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision aa8f4242efc99f24de73c59d53996f28db28c13f to the gccgo branch. Ian

Go patch committed: Mark Call_expression multi-results as result struct

2023-03-28 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend marks a Call_expression multiple results struct as a result struct. In https://go.dev/cl/343873 we stopped padding zero-sized trailing fields in functions that return multiple results where the last result is zero-sized. This CL makes the corresponding change on the

libbacktrace patch committed: Tweaks to zstd decompression

2023-03-28 Thread Ian Lance Taylor via Gcc-patches
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

Go patch committed: Add missing Slice_info_expression::do_traverse

2023-03-22 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend adds the missing Slice_info_expression::do_traverse method. Lack of the method caused https://go.dev/issue/59169. The test case is https://go.dev/cl/478217. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline and GCC 12 branch. Ian

Add notes for Go to gcc 12 and 13 changes file

2023-03-20 Thread Ian Lance Taylor via Gcc-patches
I committed this patch to the gcc-wwwdocs repo to add some notes about Go to the gcc 12 and 13 changes file. Ian pat e24f9ef56c11c69fc07bddf9a708ea2fc662f2b3 diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index c47d3285..d565c217 100644 --- a/htdocs/gcc-12/changes.html +++

Re: Now gcc-13: [Fwd: [PATCH] gcc-12: Re-enable split-stack support for GNU/Hurd.]

2023-03-15 Thread Ian Lance Taylor via Gcc-patches
On Wed, Mar 15, 2023 at 9:14 AM Svante Signell wrote: > > Package: gcc-snapshot > Version: 1:20230315-1 > Severity: important > Tags: patch > User: debian-h...@lists.debian.org > Usertags: hurd > Affects: gcc-snapshot > X-Debbugs-CC: debian-h...@lists.debian.org > > Hello, seems like the patch

Re: [PATCH] Always define `WIN32_LEAN_AND_MEAN` before

2023-03-05 Thread Ian Lance Taylor via Gcc-patches
On Fri, Mar 3, 2023 at 10:47 PM Xi Ruoyao wrote: > > On Sat, 2023-01-07 at 06:52 +, Jonathan Yong via Gcc-patches wrote: > > On 1/6/23 18:10, Jakub Jelinek wrote: > > > On Sat, Jan 07, 2023 at 02:01:05AM +0800, LIU Hao via Gcc-patches > > > wrote: > > > > libgomp/ > > > > > > > > PR

Re: [PATCH 2/4] libbacktrace: detect executable path on windows

2023-02-05 Thread Ian Lance Taylor via Gcc
On Sun, Feb 5, 2023 at 1:21 AM Björn Schäpers wrote: > > Am 24.01.2023 um 19:32 schrieb Ian Lance Taylor: > > On Tue, Jan 24, 2023 at 10:12 AM Eli Zaretskii via Gcc-patches > > wrote: > >> > >>> From: Ian Lance Taylor > >>> Date: Tue, 24 Jan 2023 09:58:10 -0800 > >>> Cc: g...@hazardy.de,

Re: [PATCH 2/4] libbacktrace: detect executable path on windows

2023-02-05 Thread Ian Lance Taylor via Gcc-patches
On Sun, Feb 5, 2023 at 1:21 AM Björn Schäpers wrote: > > Am 24.01.2023 um 19:32 schrieb Ian Lance Taylor: > > On Tue, Jan 24, 2023 at 10:12 AM Eli Zaretskii via Gcc-patches > > wrote: > >> > >>> From: Ian Lance Taylor > >>> Date: Tue, 24 Jan 2023 09:58:10 -0800 > >>> Cc: g...@hazardy.de,

Re: [PATCH 2/4] libbacktrace: detect executable path on windows

2023-01-24 Thread Ian Lance Taylor via Gcc
On Tue, Jan 24, 2023 at 10:12 AM Eli Zaretskii via Gcc-patches wrote: > > > From: Ian Lance Taylor > > Date: Tue, 24 Jan 2023 09:58:10 -0800 > > Cc: g...@hazardy.de, gcc-patc...@gcc.gnu.org, gcc@gcc.gnu.org > > > > I'd rather that the patch look like the appended. Can someone with a > > Windows

Re: [PATCH 2/4] libbacktrace: detect executable path on windows

2023-01-24 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jan 24, 2023 at 10:12 AM Eli Zaretskii via Gcc-patches wrote: > > > From: Ian Lance Taylor > > Date: Tue, 24 Jan 2023 09:58:10 -0800 > > Cc: g...@hazardy.de, gcc-patches@gcc.gnu.org, g...@gcc.gnu.org > > > > I'd rather that the patch look like the appended. Can someone with a > >

Re: [PATCH 2/4] libbacktrace: detect executable path on windows

2023-01-24 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jan 24, 2023 at 8:53 AM Eli Zaretskii via Gcc-patches wrote: > > > From: Ian Lance Taylor > > Date: Tue, 24 Jan 2023 06:35:21 -0800 > > Cc: g...@hazardy.de, gcc-patches@gcc.gnu.org, g...@gcc.gnu.org > > > > > > On Windows it seems that MAX_PATH is not > > > > a true limit, as an extended

Re: [PATCH 2/4] libbacktrace: detect executable path on windows

2023-01-24 Thread Ian Lance Taylor via Gcc
On Tue, Jan 24, 2023 at 8:53 AM Eli Zaretskii via Gcc-patches wrote: > > > From: Ian Lance Taylor > > Date: Tue, 24 Jan 2023 06:35:21 -0800 > > Cc: g...@hazardy.de, gcc-patc...@gcc.gnu.org, gcc@gcc.gnu.org > > > > > > On Windows it seems that MAX_PATH is not > > > > a true limit, as an extended

Re: [PATCH 2/4] libbacktrace: detect executable path on windows

2023-01-24 Thread Ian Lance Taylor via Gcc
On Tue, Jan 24, 2023 at 5:11 AM Eli Zaretskii via Gcc-patches wrote: > > > Date: Mon, 23 Jan 2023 15:00:56 -0800 > > Cc: gcc-patc...@gcc.gnu.org, gcc@gcc.gnu.org > > From: Ian Lance Taylor via Gcc > > > > > +#ifdef HAVE_WINDOWS_H > > > + > >

Re: [PATCH 2/4] libbacktrace: detect executable path on windows

2023-01-24 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jan 24, 2023 at 5:11 AM Eli Zaretskii via Gcc-patches wrote: > > > Date: Mon, 23 Jan 2023 15:00:56 -0800 > > Cc: gcc-patches@gcc.gnu.org, g...@gcc.gnu.org > > From: Ian Lance Taylor via Gcc > > > > > +#ifdef HAVE_WINDOWS_H > > > + > >

Re: [PATCH 2/4] libbacktrace: detect executable path on windows

2023-01-23 Thread Ian Lance Taylor via Gcc-patches
On Fri, Jan 20, 2023 at 2:56 AM Björn Schäpers wrote: > > From: Björn Schäpers > > This is actually needed so that libstdc++'s implementation > to be able to work on windows. > > Tested on x86_64-linux and i686-w64-mingw32. > > -- >8 -- > > * configure.ac: Add a check for windows.h. >

Re: [PATCH 2/4] libbacktrace: detect executable path on windows

2023-01-23 Thread Ian Lance Taylor via Gcc
On Fri, Jan 20, 2023 at 2:56 AM Björn Schäpers wrote: > > From: Björn Schäpers > > This is actually needed so that libstdc++'s implementation > to be able to work on windows. > > Tested on x86_64-linux and i686-w64-mingw32. > > -- >8 -- > > * configure.ac: Add a check for windows.h. >

Re: [PATCH 1/4] libbacktrace: change all pc related variables to uintptr_t

2023-01-20 Thread Ian Lance Taylor via Gcc
On Fri, Jan 20, 2023 at 2:54 AM Björn Schäpers wrote: > > From: Björn Schäpers > > It's the right thing to do, since the PC shouldn't go out of the > uintptr_t domain, and in backtrace_pcinfo the pc is uintptr_t. > This is a preparation for a following patch. > > Tested on x86_64-linux and

Re: [PATCH 1/4] libbacktrace: change all pc related variables to uintptr_t

2023-01-20 Thread Ian Lance Taylor via Gcc-patches
On Fri, Jan 20, 2023 at 2:54 AM Björn Schäpers wrote: > > From: Björn Schäpers > > It's the right thing to do, since the PC shouldn't go out of the > uintptr_t domain, and in backtrace_pcinfo the pc is uintptr_t. > This is a preparation for a following patch. > > Tested on x86_64-linux and

Go patch committed: Define builtin functions

2023-01-17 Thread Ian Lance Taylor via Gcc-patches
This patch by Andrew Pinski defines two builtin functions that are used by the middle-end. This fixes PR 108426. Bootstrapped and tested on x86_64-pc-linux-gnu. Committed to mainline. Ian PR go/108426 * go-gcc.cc (Gcc_backend::Gcc_backend): Define __builtin_ctzl and

libbacktrace patch committed: Only test --build-id if supported

2023-01-06 Thread Ian Lance Taylor via Gcc-patches
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

Re: [PATCH] go: fix clang warnings

2022-12-22 Thread Ian Lance Taylor via Gcc-patches
On Wed, Dec 21, 2022 at 12:05 AM Martin Liška wrote: > > The patch fixes the following Clang warnings: > > gcc/go/gofrontend/escape.cc:1290:17: warning: private field 'fn_' is not used > [-Wunused-private-field] > gcc/go/gofrontend/escape.cc:3478:19: warning: private field 'context_' is not >

Re: [PATCH] libgo: check if -lucontext is required for {make, set, get}context

2022-12-20 Thread Ian Lance Taylor via Gcc-patches
On Mon, Dec 19, 2022 at 8:59 AM wrote: > > From: Sören Tempel > > This patch is similar to the existing check for librt. If libucontext > is installed and libucontext.a provides the aforementioned symbols, then > it is added to $LIBS. If not, no error is emitted. We could, > alternatively, also

Re: Add zstd support to libbacktrace

2022-12-16 Thread Ian Lance Taylor via Gcc-patches
Some more tweaks of the libbacktrace zstd decompressor to make decompressing slightly faster: unpack all the literal data into the output buffer, rather than using scratch space. Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline. Ian * elf.c

libgo patch committed: Bump major version

2022-12-12 Thread Ian Lance Taylor via Gcc-patches
This libgo patch bumps the major version. The current version is the same as for GCC 12, but there have been minor changes like new type descriptors that make it impossible to run Go programs built with GCC 12 with the current GCC. This fixes https://gcc.gnu.org/PR108057. Bootstrapped on

Re: Add zstd support to libbacktrace

2022-12-09 Thread Ian Lance Taylor via Gcc-patches
On Wed, Dec 7, 2022 at 4:22 PM Ian Lance Taylor wrote: > > This patch adds zstd support to libbacktrace, to support the new > linker option --compress-debug-sections=zstd. This patch rewrites and simplifies the main zstd decompression loop using some ideas from the reference implementation.

Add zstd support to libbacktrace

2022-12-07 Thread Ian Lance Taylor via Gcc-patches
This patch adds zstd support to libbacktrace, to support the new linker option --compress-debug-sections=zstd. The zstd format is fairly complicated, so it's likely that there are some bugs here. It does pass the tests, at least. Unfortunately this decompressor only runs at about 1/3 the speed

Re: [PATCH v2] libgo: Don't rely on GNU-specific strerror_r variant on Linux

2022-11-30 Thread Ian Lance Taylor via Gcc-patches
On Tue, Nov 29, 2022 at 4:10 PM Ian Lance Taylor wrote: > > On Tue, Nov 29, 2022 at 9:54 AM wrote: > > > > From: Sören Tempel > > > > On glibc, there are two versions of strerror_r: An XSI-compliant and a > > GNU-specific version. The latter is only available on glibc. In order > > to avoid

Re: [PATCH v2] libgo: Don't rely on GNU-specific strerror_r variant on Linux

2022-11-29 Thread Ian Lance Taylor via Gcc-patches
On Tue, Nov 29, 2022 at 9:54 AM wrote: > > From: Sören Tempel > > On glibc, there are two versions of strerror_r: An XSI-compliant and a > GNU-specific version. The latter is only available on glibc. In order > to avoid duplicating the post-processing code of error messages, this > commit

Re: [PATCH] lto: Stream current working directory for first streamed relative filename and adjust relative paths [PR93865]

2022-11-14 Thread Ian Lance Taylor via Gcc-patches
On Thu, Sep 10, 2020 at 1:39 AM Jakub Jelinek via Gcc-patches wrote: > > If the gcc -c -flto ... commands to compile some or all objects are run in a > different directory (or in different directories) from the directory in > which the gcc -flto link line is invoked, then the .debug_line will be

Go patch committed: Define __atomic_fetch_add functions

2022-11-09 Thread Ian Lance Taylor via Gcc-patches
This patch to the GCC-specific part of the Go frontend defines the __atomic_fetch_add functions. The frontend only generates calls to the __atomic_add_fetch functions, but in some cases the middle-end can transform the latter into the former. This patch is originally by Marc Poulhiès. This

Re: [PATCH] libgo: use _off_t for mmap offset argument

2022-10-27 Thread Ian Lance Taylor via Gcc-patches
On Sat, Oct 22, 2022 at 6:45 AM Sören Tempel wrote: > > PING. > > soe...@soeren-tempel.net wrote: > > From: Sören Tempel > > > > On glibc-based systems, off_t is a 32-bit type on 32-bit systems and a > > 64-bit type on 64-bit systems by default. However, on systems using musl > > libc off_t is

Go patch committed: Treat S("") as a string constant

2022-10-10 Thread Ian Lance Taylor via Gcc-patches
This Go frontend patch treats S("") as a string constant. The compiler neglected to notice that a conversion from a string constant to a string type was a valid string constant. I didn't add a test case because this only caused a compiler failure when compiling without optimization, which is not

Go patch committed: Only build thunk struct type when needed

2022-10-10 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend delays building the struct type for a go/defer thunk until it is needed. We were building it in the determine_types pass. Now, we delay until the simplify_thunk_statements pass. That ensures that we are consistent in determining whether an argument is constant.

Go patch committed: better argument checking for builtins

2022-10-06 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend by Than McIntosh does some better argument type checking for some builtin functions. This avoids a compiler crash on cases like panic(panic("bad")). This fixes https://go.dev/issue/56071. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to

Re: [PATCH v2] libgo: Portable access to thread ID in struct sigevent

2022-09-27 Thread Ian Lance Taylor via Gcc-patches
On Fri, Sep 23, 2022 at 6:59 AM wrote: > > From: Sören Tempel > > Tested on x86_64 Arch Linux (glibc) and Alpine Linux (musl libc). > > Previously, libgo relied on the _sigev_un implementation-specific > field in struct sigevent, which is only available on glibc. This > patch uses the

libgo patch committed: Synchronize empty struct field handling

2022-09-27 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Funan Zeng synchronizes the handling of empty struct fields between the Go frontend and the libgo FFI code. In the compiler the logic for allocating one byte for the last field of a struct is: 1. the last field has zero size 2. the struct itself does not have zero size 3. the

Merge from trunk to gccgo branch

2022-09-22 Thread Ian Lance Taylor via Gcc-patches
I've merged trunk revision f35be1268c996d993ab0b4ff329734d467474445 to the gccgo branch. Ian

libgo patch committed: Add cgo.Incomplete

2022-09-22 Thread Ian Lance Taylor via Gcc-patches
This libgo patch changes the cgo command to use runtime/cgo.Incomplete instead of //go:notinheap, and to define the new type in the runtime/cgo package. This ports https://go.dev/cl/421879 to libgo. This is a quick port to update libgo to work with the version of cgo in gc mainline. A more

Re: libgo patch committed: Make runtime.Version return a useful value

2022-09-13 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jun 28, 2022 at 10:20 AM Ian Lance Taylor wrote: > > This libgo patch makes runtime.Version return a meaningful string. > This also means that "go version" will print something useful, e.g., > > go version go1.18 gccgo (GCC) 12.0.1 20220216 (experimental) linux/amd64 > > This fixes

Re: libgo patch committed: Ignore __morestack in runtime.Callers

2022-09-13 Thread Ian Lance Taylor via Gcc-patches
On Tue, Sep 6, 2022 at 6:40 PM Ian Lance Taylor wrote: > > This libgo patch ignores the __morestack function in runtime.Callers. > We were ignoring all functions starting with "__morestack_", but not > the function "__morestack" itself. Without this change, some tests > such as recover.go

libgo patch committed: Ignore __morestack in runtime.Callers

2022-09-06 Thread Ian Lance Taylor via Gcc-patches
This libgo patch ignores the __morestack function in runtime.Callers. We were ignoring all functions starting with "__morestack_", but not the function "__morestack" itself. Without this change, some tests such as recover.go started failing recently, though I'm not sure exactly what changed.

Re: gccgo emits GIMPLE with temporaries for boolean expressions unlike gcc, gdc

2022-08-10 Thread Ian Lance Taylor via Gcc
On Wed, Aug 3, 2022 at 6:26 AM j wrote: > > I've proposed a patch [1] for condition coverage profiling in gcc, > implemented in the middle-end alongside the branch coverage. I've > written most of the tests for C and a few for C++ and finally got around > to try it with a toy example for D and go

Re: [PATCH] PR bootstrap/106472: Add libgo depends on libbacktrace to Makefile.def

2022-07-30 Thread Ian Lance Taylor via Gcc-patches
On Sat, Jul 30, 2022 at 2:38 PM Roger Sayle wrote: > > > This patch fixes PR bootstrap/106472 by adding a missing dependency > to Makefile.def to allow make bootstrap when configured using > "--enable-languages=go" (and not using make with multiple threads). > > Tested on x86-64-pc-linux-gnu. Ok

Re: [PATCH] libgo: Explicitly define SYS_timer_settime for 32-bit musl targets

2022-07-30 Thread Ian Lance Taylor via Gcc-patches
On Thu, Jul 28, 2022 at 11:15 AM wrote: > > From: Sören Tempel > > On 32-bit systems, musl only defines SYS_timer_settime32 not > SYS_timer_settime. This causes the following compilation error: > > os_linux.go:251:30: error: reference to undefined name > '_SYS_timer_settime' >

Merge from trunk to gccgo branch

2022-07-27 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 5eb9f117a361538834b9740d59219911680717d1 to the gccgo branch. Ian

Re: [PATCH] libgo: make match.sh POSIX-shell compatible

2022-07-22 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jul 19, 2022 at 11:35 PM wrote: > > From: Sören Tempel > > The `(( expression ))` syntax is a Bash extension and not supported by > POSIX shell [1]. However, the arithmetic expressions used by the > gobuild() function can also be expressed using arithmetic POSIX > expansions with `$((

Re: libgo patch committed: Don't include in sysinfo.c

2022-07-21 Thread Ian Lance Taylor via Gcc-patches
On Thu, Jul 21, 2022 at 4:53 AM Martin Liška wrote: > > On 7/21/22 12:19, Richard Biener via Gcc-patches wrote: > > On Wed, Jul 13, 2022 at 6:03 PM Ian Lance Taylor via Gcc-patches > > wrote: > >> > >> This libgo patch stops including when building > &g

Go patch committed: Handle f().x if f returns a zero-sized type

2022-07-16 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend handles the case of f().x when the function f returns a zero-sized type. In that case the GCC interface will have changed f to return void, as the GCC middle-end does not have complete support for zero-sized types. This patch handles the case of void when in a

Go patch committed: Don't crash on f(g()) if g returns a zero-sized value

2022-07-15 Thread Ian Lance Taylor via Gcc-patches
This patch to the GCC interface of the Go frontend fixes a crash in f(g()) if g returns a zero-sized value. In that case the GCC interface modifies g to return void, since GCC's middle-end does not have solid support for zero-sized values. This patch detects the f(g()) case and replaces the call

libgo patch committed: Don't include in sysinfo.c

2022-07-13 Thread Ian Lance Taylor via Gcc-patches
This libgo patch stops including when building gen-sysinfo.go. Removing this doesn't change anything at least with glibc 2.33. The include was added in https://go.dev/cl/6100049 but it's not clear why. This should fix GCC PR 106266. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.

libbacktrace patch committed: Check for sys/link.h

2022-07-08 Thread Ian Lance Taylor via Gcc-patches
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.

libbacktrace patch committed: Don't exit Mach-O dyld loop on failure

2022-07-07 Thread Ian Lance Taylor via Gcc-patches
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

libbacktrace patch committed: Don't let "make clean" remove allocfail.sh

2022-07-07 Thread Ian Lance Taylor via Gcc-patches
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

Go patch committed: Propagate array length error marker

2022-07-05 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend propagates the array length error marker farther, to avoid a compiler crash on invalid code. This fixes https://go.dev/issue/53639. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian c70a48a8f8f6a43b35f783b5672c9a3c0a363c31 diff

  1   2   3   4   5   6   7   >