This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Obscure crashes due to gcc 4.9 -O2 => -fisolate-erroneous-paths-dereference


> On Feb 20, 2015, at 12:01 PM, Jeff Law <law@redhat.com> wrote:
> 
> ...
> Regardless, the right thing to do is to disable elimination of NULL pointer checks on targets where page 0 is mapped and thus a reference to *0 may not fault.  In my mind this is an attribute of both the processor (see H8 above) and/or the target OS.
> 
> On those targets the C-runtime had better also ensure that its headers aren't decorated with non-null attributes, particularly for the mem* and str* functions.

pdp11 is an example of such a target, independent of OS (with only 8 pages, clearly no one is going to unmap page 0).  Fortunately there one is unlikely to find C program data structures at 0 (instead, vectors if kernel, stack limit if user mode).  So no fault is correct there, but no null (0 bits) pointer is also â for practical purposes â a valid assumption.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]