Re: [PATCH] PR libstdc++/89446 fix null pointer dereference in char_traits

2019-02-23 Thread Jonathan Wakely
On 23/02/19 10:55 +0100, Eric Botcazou wrote: I forgot to say that this is a conservative list of targets where -fnon-call-exceptions is supported. Maybe it could run on other targets, but this should be enough to ensure we don't get a regression for this bug. What do you mean by supported exac

Re: [PATCH] PR libstdc++/89446 fix null pointer dereference in char_traits

2019-02-23 Thread Eric Botcazou
> I forgot to say that this is a conservative list of targets where > -fnon-call-exceptions is supported. Maybe it could run on other > targets, but this should be enough to ensure we don't get a regression > for this bug. What do you mean by supported exactly? Ada and Go set it by default and th

Re: [PATCH] PR libstdc++/89446 fix null pointer dereference in char_traits

2019-02-22 Thread Jonathan Wakely
On 23/02/19 01:26 +, Jonathan Wakely wrote: On 23/02/19 02:06 +0100, Jakub Jelinek wrote: On Sat, Feb 23, 2019 at 01:02:20AM +, Jonathan Wakely wrote: PR libstdc++/89446 * include/bits/char_traits.h (__constant_char_array): Check index is in range before derefere

Re: [PATCH] PR libstdc++/89446 fix null pointer dereference in char_traits

2019-02-22 Thread Jonathan Wakely
On 23/02/19 01:02 +, Jonathan Wakely wrote: +// { dg-options "-std=gnu++17 -fexceptions -fnon-call-exceptions -O1" } +// { dg-do run { target { powerpc*-*-linux* i?86-*-linux* x86_64-*-linux* } } } I forgot to say that this is a conservative list of targets where -fnon-call-exceptions is su

Re: [PATCH] PR libstdc++/89446 fix null pointer dereference in char_traits

2019-02-22 Thread Jonathan Wakely
On 23/02/19 02:06 +0100, Jakub Jelinek wrote: On Sat, Feb 23, 2019 at 01:02:20AM +, Jonathan Wakely wrote: PR libstdc++/89446 * include/bits/char_traits.h (__constant_char_array): Check index is in range before dereferencing. * testsuite/21_strings/basic_strin

Re: [PATCH] PR libstdc++/89446 fix null pointer dereference in char_traits

2019-02-22 Thread Jakub Jelinek
On Sat, Feb 23, 2019 at 01:02:20AM +, Jonathan Wakely wrote: > PR libstdc++/89446 > * include/bits/char_traits.h (__constant_char_array): Check index is > in range before dereferencing. > * testsuite/21_strings/basic_string_view/operators/char/89446.cc: > New test.