discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: segfault on solaris10/sparc


From: Riccardo Mottola
Subject: Re: segfault on solaris10/sparc
Date: Fri, 20 Jun 2014 10:14:18 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26.1

Hi,

Wolfgang Lux wrote:
Does it still segfault if you compile the program with "gcc -O2 config.align.c" and then 
run "a.out"? It's about a decade ago that I have been using a Sparc machine, but I recall 
having a similar problem where gcc was generating code with different alignment constraints 
depending on whether optimization was turned on or not. Though in my case the problem was for 
floating point numbers.
so it is! the version compiled with gcc -O2 does not crash.

I wonder if we can foce executing the test without opt. flags or complicate so that it doesn't get optimized..

During compilation I get these warnings:
config.align.c: In function 'main':
config.align.c:13:16: warning: incompatible implicit declaration of built-in function 'malloc'
   char  *buf = malloc(30);
                ^
config.align.c:27:6: warning: assignment from incompatible pointer type
   sp = (short*)(v + 1);
      ^
config.align.c:28:6: warning: assignment from incompatible pointer type
   sq = (short*)(v + 2);
      ^

I think the twp sp and sq variable should be declared "short". But that doesn't change that we need to fool the compiler better.

R



reply via email to

[Prev in Thread] Current Thread [Next in Thread]