Cog segfaults on linux

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cog segfaults on linux

Eliot Miranda-2
 
Hi All,

    today I noticed that the default stack alignment for Cog on linux is only 4 bytes.  On Mac OS X x86 it has always been 16 bytes to support SSE 64-bit and 128-bit instructions.  I wonder whether this might be anything to do with the random crashes people have seen running Cog on linux.  If you have seen random crashes perhaps you could recompile using the attached version of platforms/Cross/vm/sqCogStackAlignment.h and report back.  You'll have to do a make reallyclean and repeat the configure command to recompile everything (ok you can also say rm */*o */*a */.libs/*).

best
Eliot


sqCogStackAlignment.h (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cog segfaults on linux

johnmci
 
Ah,  in the macintosh FFI stuff I have... 

subl %ecx, %esp
and     $0xFFFFFFF0,%esp /*align to 128-bits*/

What is a killer is that some quicktime API calls *assume* gee we KNOW there is like 4 bytes up there on the stack that isn't used because of the alignment so we'll just STUFF some bytes up there to 
save time and energy... 


*Cough* obviously forgoing this causes interesting side effects. 

On 2010-07-14, at 6:58 PM, Eliot Miranda wrote:

Hi All,

    today I noticed that the default stack alignment for Cog on linux is only 4 bytes.  On Mac OS X x86 it has always been 16 bytes to support SSE 64-bit and 128-bit instructions.  I wonder whether this might be anything to do with the random crashes people have seen running Cog on linux.  If you have seen random crashes perhaps you could recompile using the attached version of platforms/Cross/vm/sqCogStackAlignment.h and report back.  You'll have to do a make reallyclean and repeat the configure command to recompile everything (ok you can also say rm */*o */*a */.libs/*).

best
Eliot

<sqCogStackAlignment.h>

--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================





smime.p7s (3K) Download Attachment