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

Chris Johns chrisj at rtems.org
Thu Feb 19 20:54:21 UTC 2015


On 19/02/2015 7:36 pm, Sebastian Huber wrote:
>
> On 19/02/15 00:52, Chris Johns wrote:
>> On 19/02/2015 7:25 am, Joel Sherrill wrote:
>>>
>>> Yep. But if all we have is writeable vector tables at 0x0, then it
>>> MIGHT be
>>> ok. GCC may not be able to detect.  But on the m68k's without a VBR
>>> register the table is always at 0x0.
>>
>> Yeap ...
>>
>> https://git.rtems.org/rtems/commit/?id=dd309b10544bfceda968ac847ad34c3d90ca8281
>>
>>
>> I hit this one when testing on the mc5235.
>
> This is not a GCC bug. Read/write from/to the 0 address is undefined in
> C. I think the only reliable solution for these kind of operations is to
> write assembly code or do some tricks that may fail with newer GCC
> version or link-time optimization.

Yes. I found this out after I had a patch. The ticket details the path I 
took to resolve the issue.

>
> See also:
>
> https://git.rtems.org/rtems/commit/?id=95d0c98cac5000da7f4f1fdd52299224b2f94235
>
>

Yes. This is difficult to resolve.

Chris


More information about the devel mailing list