Re: Segfault in _Unwind_* code called from pthread_exit

2017-11-14 Thread Gerald Pfeifer
Hi everyone, just a heads-up that... On Sun, 5 Nov 2017, Gerald Pfeifer wrote: > I should have gcc8-devel updated in the next 24 hours, gcc7-devel > and gcc6-devel over the week as new snapshots are released. : > Once the respective -devel ports are updated, I'll take care of > the

Re: Segfault in _Unwind_* code called from pthread_exit

2017-11-05 Thread Gerald Pfeifer
On Sun, 5 Nov 2017, Andreas Tobler wrote: > Pushed on all active branches, 8/7/6. Saw that, thank you. Very well done, Andreas! I should have gcc8-devel updated in the next 24 hours, gcc7-devel and gcc6-devel over the week as new snapshots are released. > If you could do the gcc* branches,

Re: Segfault in _Unwind_* code called from pthread_exit

2017-11-05 Thread Andreas Tobler
On 05.11.17 21:31, Gerald Pfeifer wrote: On Sun, 5 Nov 2017, Andreas Tobler wrote: Pushed on all active branches, 8/7/6. Saw that, thank you. Very well done, Andreas! I should have gcc8-devel updated in the next 24 hours, gcc7-devel and gcc6-devel over the week as new snapshots are

Re: Segfault in _Unwind_* code called from pthread_exit

2017-11-05 Thread Andreas Tobler
On 01.11.17 14:21, Gerald Pfeifer wrote: On Wed, 1 Nov 2017, Tijl Coosemans wrote: Please commit it to the ports tree as well, because there are reports that ftp/curl can trigger the problem. What Andreas and me usually are doing is that he commits fixes upstream (from HEAD down to release

Re: Segfault in _Unwind_* code called from pthread_exit

2017-11-01 Thread Gerald Pfeifer
On Wed, 1 Nov 2017, Tijl Coosemans wrote: > Please commit it to the ports tree as well, because there are reports > that ftp/curl can trigger the problem. What Andreas and me usually are doing is that he commits fixes upstream (from HEAD down to release branches), I pick them up when updating

Re: Segfault in _Unwind_* code called from pthread_exit

2017-11-01 Thread Tijl Coosemans
On Tue, 31 Oct 2017 22:52:33 +0100 Andreas Tobler wrote: > On 31.10.17 22:36, Gerald Pfeifer wrote: >> On Tue, 31 Oct 2017, Andreas Tobler wrote: >> Those possibly still stuck on obsolete versions of FreeBSD don't >> need/want fancy new compilers and GCC 4.9 is still

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-31 Thread Gerald Pfeifer
On Tue, 31 Oct 2017, Andreas Tobler wrote: > Do we, FreeBSD'ers, want to have gcc unwind support on older than > FreeBSD 9.3 releases? I think the gcc folks do not care, but we are the > ones who might have an need for such a support? > @Gerald, do you have an opinion? Yes. No. :-) Those

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-31 Thread Andreas Tobler
On 31.10.17 22:36, Gerald Pfeifer wrote: On Tue, 31 Oct 2017, Andreas Tobler wrote: Do we, FreeBSD'ers, want to have gcc unwind support on older than FreeBSD 9.3 releases? I think the gcc folks do not care, but we are the ones who might have an need for such a support? @Gerald, do you have an

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-31 Thread Konstantin Belousov
On Tue, Oct 31, 2017 at 08:37:29PM +0100, Andreas Tobler wrote: > On 31.10.17 10:28, Konstantin Belousov wrote: > > On Mon, Oct 30, 2017 at 10:54:05PM +0100, Andreas Tobler wrote: > >> On 30.10.17 15:32, Tijl Coosemans wrote: > >>> On Sun, 29 Oct 2017 20:40:46 +0100 Andreas Tobler > >>>

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-31 Thread Andreas Tobler
On 31.10.17 10:28, Konstantin Belousov wrote: On Mon, Oct 30, 2017 at 10:54:05PM +0100, Andreas Tobler wrote: On 30.10.17 15:32, Tijl Coosemans wrote: On Sun, 29 Oct 2017 20:40:46 +0100 Andreas Tobler wrote: Attached what I have for libgcc. It can be applied to

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-31 Thread Tijl Coosemans
On Mon, 30 Oct 2017 22:54:05 +0100 Andreas Tobler wrote: > On 30.10.17 15:32, Tijl Coosemans wrote: >> On Sun, 29 Oct 2017 20:40:46 +0100 Andreas Tobler >> wrote: >>> Attached what I have for libgcc. It can be applied to gcc5-8, should >>>

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-31 Thread Konstantin Belousov
On Mon, Oct 30, 2017 at 10:54:05PM +0100, Andreas Tobler wrote: > On 30.10.17 15:32, Tijl Coosemans wrote: > > On Sun, 29 Oct 2017 20:40:46 +0100 Andreas Tobler > > wrote: > >> Attached what I have for libgcc. It can be applied to gcc5-8, should > >> give no issues. The

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-30 Thread Andreas Tobler
On 30.10.17 15:32, Tijl Coosemans wrote: On Sun, 29 Oct 2017 20:40:46 +0100 Andreas Tobler wrote: Attached what I have for libgcc. It can be applied to gcc5-8, should give no issues. The mentioned tc from this thread and mine,

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-30 Thread Tijl Coosemans
On Sun, 29 Oct 2017 20:40:46 +0100 Andreas Tobler wrote: > Attached what I have for libgcc. It can be applied to gcc5-8, should > give no issues. The mentioned tc from this thread and mine, > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82635 do pass. > > What do you

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-30 Thread Tijl Coosemans
On Sun, 29 Oct 2017 21:13:58 +0200 Konstantin Belousov wrote: > On Sun, Oct 29, 2017 at 06:23:51PM +0100, Tijl Coosemans wrote: >> On Sat, 26 Aug 2017 21:40:34 +0300 Konstantin Belousov >> wrote: >>> On Sat, Aug 26, 2017 at 08:28:13PM +0200, Tijl

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-29 Thread Andreas Tobler
On 29.10.17 20:13, Konstantin Belousov wrote: On Sun, Oct 29, 2017 at 06:23:51PM +0100, Tijl Coosemans wrote: On Sat, 26 Aug 2017 21:40:34 +0300 Konstantin Belousov wrote: On Sat, Aug 26, 2017 at 08:28:13PM +0200, Tijl Coosemans wrote: I did consider using a CFI

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-29 Thread Konstantin Belousov
On Sun, Oct 29, 2017 at 06:23:51PM +0100, Tijl Coosemans wrote: > On Sat, 26 Aug 2017 21:40:34 +0300 Konstantin Belousov > wrote: > > On Sat, Aug 26, 2017 at 08:28:13PM +0200, Tijl Coosemans wrote: > >> I did consider using > >> a CFI directive (see patch below) and it

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-29 Thread Tijl Coosemans
On Sat, 26 Aug 2017 21:40:34 +0300 Konstantin Belousov wrote: > On Sat, Aug 26, 2017 at 08:28:13PM +0200, Tijl Coosemans wrote: >> I did consider using >> a CFI directive (see patch below) and it works, but it's architecture >> specific and it's inserted after the function

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-23 Thread Tijl Coosemans
On Sun, 22 Oct 2017 23:05:15 +0200 Andreas Tobler wrote: > On 22.10.17 02:18, Tijl Coosemans wrote: >> On Sat, 21 Oct 2017 22:02:38 +0200 Andreas Tobler >> wrote: >>> On 26.08.17 20:40, Konstantin Belousov wrote: On Sat, Aug 26, 2017 at

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-22 Thread Andreas Tobler
On 22.10.17 02:18, Tijl Coosemans wrote: On Sat, 21 Oct 2017 22:02:38 +0200 Andreas Tobler wrote: On 26.08.17 20:40, Konstantin Belousov wrote: On Sat, Aug 26, 2017 at 08:28:13PM +0200, Tijl Coosemans wrote: On Sat, 26 Aug 2017 02:44:42 +0300 Konstantin Belousov

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-21 Thread Tijl Coosemans
On Sat, 21 Oct 2017 22:02:38 +0200 Andreas Tobler wrote: > On 26.08.17 20:40, Konstantin Belousov wrote: >> On Sat, Aug 26, 2017 at 08:28:13PM +0200, Tijl Coosemans wrote: >>> On Sat, 26 Aug 2017 02:44:42 +0300 Konstantin Belousov >>> wrote:

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-21 Thread Konstantin Belousov
On Sat, Oct 21, 2017 at 10:02:38PM +0200, Andreas Tobler wrote: > On 26.08.17 20:40, Konstantin Belousov wrote: > > On Sat, Aug 26, 2017 at 08:28:13PM +0200, Tijl Coosemans wrote: > >> On Sat, 26 Aug 2017 02:44:42 +0300 Konstantin Belousov > >> wrote: > >>> How does llvm

Re: Segfault in _Unwind_* code called from pthread_exit

2017-10-21 Thread Andreas Tobler
On 26.08.17 20:40, Konstantin Belousov wrote: On Sat, Aug 26, 2017 at 08:28:13PM +0200, Tijl Coosemans wrote: On Sat, 26 Aug 2017 02:44:42 +0300 Konstantin Belousov wrote: How does llvm unwinder detects that the return address is a garbage ? It just stops unwinding

Re: Segfault in _Unwind_* code called from pthread_exit

2017-08-26 Thread Tijl Coosemans
On Sat, 26 Aug 2017 21:40:34 +0300 Konstantin Belousov wrote: > On Sat, Aug 26, 2017 at 08:28:13PM +0200, Tijl Coosemans wrote: >> On Sat, 26 Aug 2017 02:44:42 +0300 Konstantin Belousov >> wrote: >>> How does llvm unwinder detects that the return

Re: Segfault in _Unwind_* code called from pthread_exit

2017-08-26 Thread Konstantin Belousov
On Sat, Aug 26, 2017 at 08:28:13PM +0200, Tijl Coosemans wrote: > On Sat, 26 Aug 2017 02:44:42 +0300 Konstantin Belousov > wrote: > > How does llvm unwinder detects that the return address is a garbage ? > > It just stops unwinding when it can't find frame information

Re: Segfault in _Unwind_* code called from pthread_exit

2017-08-26 Thread Tijl Coosemans
On Sat, 26 Aug 2017 02:44:42 +0300 Konstantin Belousov wrote: > On Fri, Aug 25, 2017 at 05:38:51PM +0200, Tijl Coosemans wrote: >> So both GCC and LLVM unwinding look up the return address in the CFI >> table and fail when the return address is garbage, but LLVM treats this

Re: Segfault in _Unwind_* code called from pthread_exit

2017-08-25 Thread Konstantin Belousov
On Fri, Aug 25, 2017 at 05:38:51PM +0200, Tijl Coosemans wrote: > So both GCC and LLVM unwinding look up the return address in the CFI > table and fail when the return address is garbage, but LLVM treats this > as an end-of-stack condition while GCC further tries to see if the > return address

Re: Segfault in _Unwind_* code called from pthread_exit

2017-08-25 Thread Mark Millard
Tijl Coosemans tijl at FreeBSD.org wrote on Fri Aug 25 15:40:10 UTC 2017 : > So both GCC and LLVM unwinding look up the return address in the CFI > table and fail when the return address is garbage, but LLVM treats this > as an end-of-stack condition while GCC further tries to see if the > return

Re: Segfault in _Unwind_* code called from pthread_exit

2017-08-25 Thread Tijl Coosemans
On Thu, 24 Aug 2017 18:08:30 +0200 Tijl Coosemans wrote: > On Thu, 24 Aug 2017 18:42:35 +0300 Konstantin Belousov > wrote: >> On Wed, Aug 23, 2017 at 04:37:07PM +0200, Tijl Coosemans wrote: >>> The following program segfaults for me on amd64 when linked

Re: Segfault in _Unwind_* code called from pthread_exit

2017-08-24 Thread Tijl Coosemans
On Thu, 24 Aug 2017 18:42:35 +0300 Konstantin Belousov wrote: > On Wed, Aug 23, 2017 at 04:37:07PM +0200, Tijl Coosemans wrote: >> The following program segfaults for me on amd64 when linked like this: >> >> cc -o test test.c -lpthread -L/usr/local/lib/gcc5 -lgcc_s -rpath

Re: Segfault in _Unwind_* code called from pthread_exit

2017-08-24 Thread Konstantin Belousov
On Wed, Aug 23, 2017 at 04:37:07PM +0200, Tijl Coosemans wrote: > Hi, > > The following program segfaults for me on amd64 when linked like this: > > cc -o test test.c -lpthread -L/usr/local/lib/gcc5 -lgcc_s -rpath > /usr/local/lib/gcc5 > > > #include >

Re: Segfault in _Unwind_* code called from pthread_exit

2017-08-23 Thread Mark Millard
Tijl Coosemans tijl at FreeBSD.org wrote on Wed Aug 23 14:38:27 UTC 2017 : > The following program segfaults for me on amd64 when linked like this: > > cc -o test test.c -lpthread -L/usr/local/lib/gcc5 -lgcc_s -rpath > /usr/local/lib/gcc5 > > > #include >

Segfault in _Unwind_* code called from pthread_exit

2017-08-23 Thread Tijl Coosemans
Hi, The following program segfaults for me on amd64 when linked like this: cc -o test test.c -lpthread -L/usr/local/lib/gcc5 -lgcc_s -rpath /usr/local/lib/gcc5 #include #include void * thr( void *arg ) { return( NULL ); } int main( void ) {