Program that segfaults with -Ofast

Jeffrey Walton noloader@gmail.com
Mon Jan 8 11:31:00 GMT 2018


On Mon, Jan 8, 2018 at 6:26 AM, Christer Solskogen
<christer.solskogen@gmail.com> wrote:
> On 08.01.2018 11:33, Mason wrote:
>
>> Can you apply the following patch and report what was printed?
>>
> A oldpos=0 i=0 size=32 name=/home/alarm/amiberry-dev zipname=(null)
> size=4096 seek=0
> B oldpos=0 i=0 size=32 name=/home/alarm/amiberry-dev zipname=(null)
> size=4096 seek=0
> A oldpos=0 i=0 size=32 name=/home/alarm/amiberry-dev zipname=(null)
> size=4096 seek=0
> B oldpos=0 i=0 size=32 name=/home/alarm/amiberry-dev zipname=(null)
> size=4096 seek=0
> A oldpos=0 i=0 size=32 name=/home/alarm/amiberry-dev zipname=(null)
> size=4096 seek=0
> B oldpos=0 i=0 size=32 name=/home/alarm/amiberry-dev zipname=(null)
> size=4096 seek=0
>
>
> The thing is that the emulator "expects" kickstart rom files in kickstart/ -
> if those files are present there's no segfault with Ofast. It only segfaults
> if there are no kickstart rom files there.

I noticed on OS X some miscompiles occurred if using -Ofast without
-fno-common. Eventually we avoided -fno-common, and used
__attribute__((section ("nocommon"))) on the variables producing the
findings. We were catching Valgrind findings, not crashes though.

Jeff



More information about the Gcc-help mailing list