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: svn commit: r322875 - head/sys/dev/nvme

2017-08-25 Thread Warner Losh
On Fri, Aug 25, 2017 at 6:53 AM, Ed Schouten wrote: > 2017-08-25 9:46 GMT+02:00 Mark Millard : > > It appears that at least 11.1-STABLE -r322807 does not handle > > -std=c++98 styles of use of _Static_assert for g++7 in that > > g++7 reports an error: > > Maybe

Re: svn commit: r322875 - head/sys/dev/nvme

2017-08-25 Thread Ed Schouten
2017-08-25 9:46 GMT+02:00 Mark Millard : > It appears that at least 11.1-STABLE -r322807 does not handle > -std=c++98 styles of use of _Static_assert for g++7 in that > g++7 reports an error: Maybe we need to do something like this? Index: sys/sys/cdefs.h

Re: svn commit: r322875 - head/sys/dev/nvme

2017-08-25 Thread Mark Millard
On 2017-Aug-25, at 12:14 AM, David Chisnall wrote: > On 25 Aug 2017, at 07:32, Mark Millard wrote: >> >> As I remember _Static_assert is from C11, not >> the older C99. > > In pre-C11 dialects of C, _Static_assert is an identifier reserved for the > implementation. sys/cdefs.h defines it

Re: svn commit: r322875 - head/sys/dev/nvme

2017-08-25 Thread Ed Schouten
2017-08-25 8:32 GMT+02:00 Mark Millard : >> # g++49 main.cc >> main.cc:2:15: error: expected constructor, destructor, or type conversion >> before '(' token >> _Static_assert(1,"Test"); Yeah, that's because GCC is such a pain in the neck compiler that it doesn't want to

Re: svn commit: r322875 - head/sys/dev/nvme

2017-08-25 Thread David Chisnall
On 25 Aug 2017, at 07:32, Mark Millard wrote: > > As I remember _Static_assert is from C11, not > the older C99. In pre-C11 dialects of C, _Static_assert is an identifier reserved for the implementation. sys/cdefs.h defines it to generate a zero-length array if the

Re: svn commit: r322875 - head/sys/dev/nvme

2017-08-25 Thread Mark Millard
> Author: imp > Date: Fri Aug 25 04:33:06 2017 > New Revision: 322875 > URL: > https://svnweb.freebsd.org/changeset/base/322875 > > > Log: > Use _Static_assert > > These files are compiled in userland too, so we can't use sys/systm.h > and rely on CTASSERT. Switch to using