rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.66k stars 192 forks source link

Test threading_spec.rb fails on armel #300

Closed rhertzog closed 9 months ago

rhertzog commented 10 years ago

I packaged ruby-libv8 and ruby-therubyracer for Kali Linux (a Debian derivative) to work around the fact that the respective gem fails to build on armel/armhf. I have now patched ruby-libv8 to build with -fPIC and thus got a seemingly working ruby-libv8 on all architectures.

Now I tried to build ruby-therubyracer and it builds & works everywhere except on armel where it builds but one of the tests fails (at least with ruby1.9.1 that we use):

/usr/bin/ruby1.9.1 -S rspec ./spec/c/array_spec.rb ./spec/c/constants_spec.rb ./spec/c/exception_spec.rb
./spec/c/external_spec.rb ./spec/c/function_spec.rb ./spec/c/handles_spec.rb ./spec/c/locker_spec.rb
./spec/c/object_spec.rb ./spec/c/script_spec.rb ./spec/c/string_spec.rb ./spec/c/template_spec.rb
./spec/c/trycatch_spec.rb ./spec/mem/blunt_spec.rb ./spec/threading_spec.rb ./spec/v8/context_spec.rb
./spec/v8/conversion_spec.rb ./spec/v8/error_spec.rb ./spec/v8/function_spec.rb ./spec/v8/object_spec.rb
Stacktrace (dead0000-dead0001) 0x594c9b21 0x4fa08261:
==== JS stack trace =========================================

Security context: 0x594d56c5 <JS Object>#0#
    1: /* anonymous */ [<eval>:~1] (this=0x594d576d <JS Global Object>#1#)

==== Details ================================================

[1]: /* anonymous */ [<eval>:~1] (this=0x594d576d <JS Global Object>#1#) {
  // stack-allocated locals
  var .result = 0x3a808091 <undefined>
  // expression stack (top to bottom)
  [02] : 0x51c0a451 Cell for 5888#2#
  [01] : 0x594c9b21 <FixedArray[68]>#3#
--------- s o u r c e   c o d e ---------
for (i=10000;i;i--){};--x
-----------------------------------------
}

==== Key         ============================================

 #0# 0x594d56c5: 0x594d56c5 <JS Object>
 #1# 0x594d576d: 0x594d576d <JS Global Object>
 #2# 0x51c0a451: 0x51c0a451 Cell for 5888
 #3# 0x594c9b21: 0x594c9b21 <FixedArray[68]>
                 0: 0x594c9c39 <JS Function Empty>#4#
                 1: 0
                 2: 0x594d56c5 <JS Object>#0#
                 3: 0x594d56c5 <JS Object>#0#
                 4: 0x594d576d <JS Global Object>#1#
                 5: 0x594d56c5 <JS Object>#0#
                 6: 0x594d4bed <an Arguments>#5#
                 7: 0x594d4c6d <an Arguments>#6#
                 8: 0x594d4cb9 <an Arguments>#7#
                 9: 0x4fa11d11 <Map(elements=3)>#8#
                  ...
 #4# 0x594c9c39: 0x594c9c39 <JS Function Empty>
 #5# 0x594d4bed: 0x594d4bed <an Arguments>
            length: 0x3a808091 <undefined>
            callee: 0x3a808091 <undefined>
 #6# 0x594d4c6d: 0x594d4c6d <an Arguments>
            length: 0x3a808091 <undefined>
            callee: 0x3a808091 <undefined>
 #7# 0x594d4cb9: 0x594d4cb9 <an Arguments>
            length: 0x3a808091 <undefined>
 #8# 0x4fa11d11: 0x4fa11d11 <Map(elements=3)>
=====================

/usr/bin/ruby1.9.1 -S rspec ./spec/c/array_spec.rb ./spec/c/constants_spec.rb ./spec/c/exception_spec.rb
./spec/c/external_spec.rb ./spec/c/function_spec.rb ./spec/c/handles_spec.rb ./spec/c/locker_spec.rb
./spec/c/object_spec.rb ./spec/c/script_spec.rb ./spec/c/string_spec.rb ./spec/c/template_spec.rb
./spec/c/trycatch_spec.rb ./spec/mem/blunt_spec.rb ./spec/threading_spec.rb ./spec/v8/context_spec.rb
./spec/v8/conversion_spec.rb ./spec/v8/error_spec.rb ./spec/v8/function_spec.rb ./spec/v8/object_spec.rb
failed
................................F.ERROR: Test "ruby1.9.1" failed. Exiting.

The bit of source code mentionned comes from spec/threading_spec.rb so I assume that this is the failing test. The build enviroment is Kali Linux on armel, which is very close to Debian 7 Wheezy on armel.

if you want me to try to reproduce something or to try out some patch, just let me know.