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

Re: please help with #642266

On Wed, Jan 04, 2012 at 10:54:07AM -0200, Antonio Terceiro wrote:
> Dear sparc porters,
> I need some help from you to make ruby-ffi build correctly on sparc.
> The source actually compiles OK, but the test suite crashes with an
> "Illegal instruction" error. Is this a known problem?
> I managed to create a minimal test script that reproduces the problem
> without running the entire test suite. It is attached to this bug
> report (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=642266), and
> all you need to do is run it from the root of the package source dir (it
> will compile everything that's needed before running the actual test
> code).
> I also attached strace output from running the test script against both
> ruby1.8 and ruby1.9.1 (a second run, after having the C code built to
> remove unecessary cruft): they have similar results.

We used to have a bug in gcc-4.6 on sparc, which resulted in 
miscompilation of pack/unpack function in Ruby:


The fact that your test case causes a failure in pack-related function 
makes me think that this might be the same problem. Last ruby-ffi 
package has been built with gcc-4.6 4.6.2-4, according to


The first gcc-4.6 version containing a fix is 4.6.2-6, so the build 
still happened with broken gcc. If you can, try either building 
the code with older compiler and -fno-tree-sra flag, or newer 
compiler, to see whether this fixes the problem. I'm on vacation for 
another week and don't have access to my sparc box, so if you will not 
be able to confirm this fix, I'll be glad to give it a go once I'm 

Best regards,
Jurij Smakov                                           jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/                      KeyID: C99E03CC

Reply to: