[RFC] Avoid spurious isolate-erroneous-paths failures

Jeff Law law@redhat.com
Mon Nov 18 16:42:00 GMT 2013


On 11/18/13 08:39, Ondřej Bílka wrote:
> Hi,
>
> a gcc isolate-erroneous-paths switch causes trapping of
> memset (NULL, 0, 0), see
> http://gcc.gnu.org/ml/gcc/2013-11/msg00345.html
>
> This could give a isolate-erroneous-paths bad reputation as it will
> cause more spurious failures than real problems.
>
> One way how to fix this would be drop nonnull attribute from mem* and
> strn* function as patch below does.
I would recommend against this.

A better fallback is to leave glibc as-is and not optimize these cases 
in GCC by default and improve GCC to issue warnings for this stuff.

That allows for a transition period where people can find the errors in 
their code.  That can't happen if glibc remove the non-null attributes.

jeff



More information about the Libc-alpha mailing list