Project

General

Profile

Actions

Bug #9681

closed

miniruby Bus Error at 0x3d44c4

Added by genie (Genie Sol) almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby-2.1.1
[ruby-core:61715]

Description

Dear team,

I'm trying to compile ruby 2.1.1 on Solaris Oracle Solaris 11.1 SPARC, with gcc version 4.5.2 (GCC).

I wonder that maybe you can help on the issue.

Here is the result of the configure :

It complains for the conftest.c

checking for nroff... /usr/bin/nroff
.ext/include/sparc-solaris2.11/ruby/config.h updated
ruby library version = 2.1.0
configure: creating ./config.status
config.status: creating Makefile
make: Warning: Illegal dependency list for target `.DEFAULT'
config.status: creating ruby-2.1.pc
ake: Warning: Illegal dependency list for target `.DEFAULT'
config.status: creating ruby-2.1.pc

##

bignum.c: In function 'rb_absint_numwords':
bignum.c:3372:12: warning: 'nlz_bits' may be used uninitialized in this function

Here is the result of the gmake test :

In file included from ./include/ruby/ruby.h:24:0,
                 from ./include/ruby.h:33,
                 from ./missing/signbit.c:2:
.ext/include/sparc-solaris2.11/ruby/config.h:55:0: warning: "_FILE_OFFSET_BITS" redefined
/usr/include/sys/feature_tests.h:204:0: note: this is the location of the previous definition
compiling dmyext.c
processing probes in object files
rm -f probes.o
linking miniruby
./miniruby: [BUG] Bus Error at 0x3d44c4
ruby 2.1.1p76 (2014-02-24 revision 45161) [sparc-solaris2.11]

-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0002 E:000e94 TOP    [FINISH]


-- C level backtrace information -------------------------------------------
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'rb_vm_bugreport+0x100 [0x1e6240]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'report_bug+0x1a0 [0x84064]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'rb_bug+0x68 [0x84bcc]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'sigbus+0x1c [0x162d0c]
/lib/libc.so.1'__sighndlr+0xc [0xf0b45950]
/lib/libc.so.1'call_user_handler+0x370 [0xf0b38e58]
/lib/libc.so.1'sigacthandler+0x58 [0xf0b39048]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'new_insn_send+0x114 [0x1b3aa0]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'iseq_compile_each+0x40f4 [0x1b8c50]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'iseq_compile_each+0x14e8 [0x1b6044]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'iseq_compile_each+0x1b4 [0x1b4d10]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'rb_iseq_compile_node+0xd68 [0x1c17a4]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'rb_iseq_new_with_bopt_and_opt.clone.7+0x8c [0x1c6288]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'iseq_compile_each+0x23e8 [0x1b6f44]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'rb_iseq_compile_node+0x9b0 [0x1c13ec]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'rb_iseq_new_with_bopt_and_opt.clone.7+0x8c [0x1c6288]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'rb_iseq_compile_with_option+0x1f0 [0x1c6ed0]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'Init_prelude+0x50 [0x3f510]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'process_options+0x30c [0x161610]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'ruby_process_options+0x11c [0x1626cc]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'ruby_options+0xd0 [0x8c670]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'main+0x4c [0x3f42c]
/var/tmp/ede/puppet/ruby-2.1.1/miniruby'_start+0x5c [0x3f260]

-- Other runtime information -----------------------------------------------

* Loaded script: ./miniruby

* Loaded features:

    0 enumerator.so

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

gmake: *** [.rbconfig.time] Abort (core dumped)

Files

ruby2.1.1Sol11Core.gz (3.09 MB) ruby2.1.1Sol11Core.gz Core by compiling ruby2.1.1 on Solaris 11 genie (Genie Sol), 03/27/2014 10:04 AM
config.log (912 KB) config.log config.log by compiling ruby2.1.1 on Solaris 11 genie (Genie Sol), 03/27/2014 10:04 AM
config.status (32.1 KB) config.status config.status by compiling ruby2.1.1 on Solaris 11 genie (Genie Sol), 03/27/2014 10:04 AM
20141022-compile_data_alloc-word-align.patch (643 Bytes) 20141022-compile_data_alloc-word-align.patch ngoto (Naohisa Goto), 10/21/2014 04:46 PM
20141023-compile_data_alloc-word-align.patch (2.35 KB) 20141023-compile_data_alloc-word-align.patch ngoto (Naohisa Goto), 10/23/2014 10:09 AM
20141106-ruby2_1-r48288+r48289.patch (2.81 KB) 20141106-ruby2_1-r48288+r48289.patch r48288 + r48289 for Ruby 2.1 ngoto (Naohisa Goto), 11/06/2014 08:13 AM
20141106-ruby2_0_0-r48288+r48289.patch (2.81 KB) 20141106-ruby2_0_0-r48288+r48289.patch r48288 + r48289 for Ruby 2.0.0 ngoto (Naohisa Goto), 11/06/2014 08:14 AM

Updated by genie (Genie Sol) almost 10 years ago

Just to give an update.

After many different tries, the solutions for compiling ruby 2.1 is to use Sunstudio rather than gcc.

This has working well.

Updated by hsbt (Hiroshi SHIBATA) almost 10 years ago

  • Assignee set to ngoto (Naohisa Goto)

Updated by ngoto (Naohisa Goto) almost 10 years ago

  • Status changed from Open to Feedback

It might be due to GCC bug, because GCC 4.5.2 is too old. Could you please try latest GCC?

Updated by nobu (Nobuyoshi Nakada) almost 10 years ago

  • Description updated (diff)

Updated by dagobert (Dagobert Michelsen) over 9 years ago

I can confirm that the error is also present in Ruby 2.1.2 when compiling with gcc 4.9.0:

In file included from ./include/ruby/ruby.h:24:0,
                 from ./include/ruby.h:33,
                 from ./missing/signbit.c:2:
.ext/include/sparc-solaris2.10/ruby/config.h:57:0: warning: "_FILE_OFFSET_BITS" redefined
 #define _FILE_OFFSET_BITS 64
 ^
In file included from /usr/include/limits.h:17:0,
                 from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.0/include-fixed/limits.h:168,
                 from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.0/include-fixed/syslimits.h:7,
                 from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.0/include-fixed/limits.h:34,
                 from ./missing/signbit.c:1:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.0/include-fixed/sys/feature_tests.h:196:0: note: this is the location of the previous definition
 #define _FILE_OFFSET_BITS 32
 ^
compiling dmyext.c
processing probes in object files
rm -f probes.o
linking miniruby
./miniruby: [BUG] Bus Error at 0x418fdc
ruby 2.1.2p95 (2014-05-08 revision 45877) [sparc-solaris2.10]

-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0002 E:000a14 TOP    [FINISH]


-- Other runtime information -----------------------------------------------

* Loaded script: ./miniruby

* Loaded features:

    0 enumerator.so

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Makefile:1025: recipe for target '.rbconfig.time' failed
gmake: *** [.rbconfig.time] Abort (core dumped)
zsh: 21205 exit 2     gmake
dam@unstable10s [unstable10s]:/home/dam/tmp/ruby-2.1.2 > pstack core
core 'core' of 3073:    ./miniruby -I./lib -I. -I.ext/common ./tool/mkconfig.rb -timestamp=.rb
-----------------  lwp# 1 / thread# 1  --------------------
 ff0febd4 _lwp_kill (6, 0, ff177080, ff0de0f0, ffffffff, 6) + 8
 ff0729f0 abort    (3aa5b8, 1, 2ab614, ffb04, ff175518, 0) + 110
 0007d558 rb_bug   (24c250, 418fdc, 0, 0, 0, 3aa5b8) + 70
 0017a090 sigbus   (a, 3b7090, 3b6dd8, 1, 0, 0) + 1c
 ff0fb00c __sighndlr (a, 3b7090, 3b6dd8, 17a074, 0, 1) + c
 ff0ef6bc call_user_handler (a, 0, 9, 0, ff312a00, 3b6dd8) + 3b8
 ff0ef8a4 sigacthandler (a, 3b7090, 3b6dd8, 418ee0, 0, 0) + 60
 --- called from signal handler with signal 10 (SIGBUS) ---
 001d3ecc new_insn_send (418dc8, 2, cc8, 0, 0, 100) + 118
 001d9394 iseq_compile_each (418dc8, ffbfeeb8, 3aa0b8, 0, ffbfe9d8, 0) + 376c
 001d7e24 iseq_compile_each (418dc8, ffbfeeb8, 3aa100, 1, ff1723f0, 418f18) + 21fc
 001d5d98 iseq_compile_each (418dc8, ffbfeeb8, 3a9e90, 0, 7f00, 0) + 170
 001e324c rb_iseq_compile_node (3a9d40, 3a9e60, 0, ffbfeeb8, 418dc8, 0) + c58
 001e8478 rb_iseq_new_with_opt (3a9e60, 3a9d58, 3a9db8, 4, 3, 3a9e00) + 8c
 001d73f8 iseq_compile_each (418a08, ffbff150, 3a9e48, 0, 3a9e60, 418b34) + 17d0
 001e2f10 rb_iseq_compile_node (3a9e00, 3a9e30, 0, ffbff150, 418a08, 0) + 91c
 001e6980 rb_iseq_new_with_bopt_and_opt.isra.7 (3a9e30, 3a9e18, 3aa1c0, 4, 3, 0) + 8c
 001e8fb0 rb_iseq_compile_with_option (3aa1d8, 3aa1c0, 4, 3, 0, 3a9e30) + 1f8
 00023098 Init_prelude (3aa1f0, 3aa220, 2acddc, 344d, 417900, 3aa1d8) + 50
 001789bc process_options (4, ffbff9c8, ffbff7e8, 2b38c8, ff191b30, 347ad8) + 734
 001799a8 ruby_process_options (2710, ffbff9b4, 2710, 9, 2b38c8, ffbff7e8) + 13c
 00086064 ruby_options (9, ffbff9b4, ffbff840, ffbff8d8, 0, 2c3df8) + d0
 002263d8 main     (9, ffbff9b4, ffbff9dc, 2c3fe8, ff310100, 0) + 4c
 00022d78 _start   (0, 0, 0, 0, 0, 0) + 5c
-----------------  lwp# 2 / thread# 2  --------------------
 ff0fe7b0 __pollsys (ff243f90, 2, 0, 0, 0, 2c40d8) + 8
 ff094ccc poll     (ff243f90, 2, ffffffff, 0, fee70200, ff0f46a8) + 7c
 00214298 thread_timer (2c4060, 2ac748, 2ac750, 2c3e08, 2c3dec, 2c4340) + 370
 ff0faee0 _lwp_start (0, 0, 0, 0, 0, 0)
dam@unstable10s [unstable10s]:/home/dam/tmp/ruby-2.1.2 > 

Updated by dagobert (Dagobert Michelsen) over 9 years ago

I can also confirm that Ruby 2.1.2 works on Solaris 10 x86 when compiled with Oracle Studio 12.3:

dam@unstable10x [global]:/home/dam/tmp/rubyx/ruby-2.1.2 > gmake test
        CC = /opt/solarisstudio12.3/bin/cc
        LD = /usr/ccs/bin/ld
        LDSHARED = /opt/solarisstudio12.3/bin/cc -G
        CFLAGS =  -g  
        XCFLAGS = -DRUBY_EXPORT
        CPPFLAGS =   -I. -I.ext/include/i386-solaris2.10 -I./include -I.
        DLDFLAGS =  
        SOLIBS = 
cc: Sun C 5.12 SunOS_i386 Patch 148918-08 2013/10/18

test succeeded
PASS all 1008 tests
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems "./bootstraptest/runner.rb" --ruby="ruby --disable-gems"   ./KNOWNBUGS.rb
2014-07-04 14:01:19 +0200
Driver is ruby 2.1.2p95 (2014-05-08 revision 45877) [i386-solaris2.10]
Target is ruby 2.1.2p95 (2014-05-08 revision 45877) [i386-solaris2.10]

KNOWNBUGS.rbPASS 0
No tests, no problem

Updated by ngoto (Naohisa Goto) over 9 years ago

Thank you very much!

In my experience, compiling ruby with --enable-dtrace (enabled by default on Solaris during configure) and relatively higher compiler optimization flags (-O2, -O3 or higher) fails with bus error or segmentation fault. I still cannot specify whether the error is caused by compiler's optimization bug or Ruby source code.

Could you please also try gcc with optflags="-O1 -fno-fast-math" ?

Updated by nichogl (Geoff Nichols) over 9 years ago

Hello, are there any plans to fix this issue in Ruby 2.1.4?

Updated by ngoto (Naohisa Goto) over 9 years ago

Hello, are there any plans to fix this issue in Ruby 2.1.4?

No, because no one can identify the cause of the problem, and no one have provided patches.

Could you please try the following three configure options?

% ./configure --disable-dtrace
% optflags="-O0" ./configure
% optflags="-O0" ./configure --disable-dtrace

In addition, please confirm all available OS patches provided by Oracle are correctly applied.

I was bothered by bugs in dtrace command bundled in Solaris 10. Most of these bugs have been fixed by Solaris OS patches. Without patches, compiling ruby with optimization may fail.

Updated by nichogl (Geoff Nichols) over 9 years ago

The issue still exists using the suggested ./configure and optflags. Not sure if this is obvious from the thread, but a compile builds a miniruby, but a bus error results from execution of that compiled miniruby. The miniruby gives expected output to ./miniruby --version or ./miniruby --help, but produces the bus error when called without any arguments.

$ ./miniruby --version
ruby 2.1.3p242 (2014-09-19 revision 47630) [sparc-solaris2.11]

Bus error on execution of miniruby:

$ ./miniruby
./miniruby: [BUG] Bus Error at 0x4126fc
ruby 2.1.3p242 (2014-09-19 revision 47630) [sparc-solaris2.11]

-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0002 E:0019b4 TOP [FINISH]

-- C level backtrace information -------------------------------------------
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_vm_bugreport+0x94 [0x207a30]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'report_bug+0x14c [0x8c048]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_bug+0x68 [0x8caf4]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'sigbus+0x1c [0x17d5f0]
/lib/libc.so.1'__sighndlr+0xc [0xff177d0c]
/lib/libc.so.1'call_user_handler+0x370 [0xff16b07c]
/lib/libc.so.1'sigacthandler+0x58 [0xff16b384]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'new_insn_send+0x118 [0x1d4fa0]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'iseq_compile_each+0x35c4 [0x1d8ce8]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'iseq_compile_each+0x1e20 [0x1d7544]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'iseq_compile_each+0x170 [0x1d5894]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_iseq_compile_node+0xc8c [0x1e4400]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_iseq_new_with_opt+0x8c [0x1e8e90]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'iseq_compile_each+0x13e8 [0x1d6b0c]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_iseq_compile_node+0x828 [0x1e3f9c]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_iseq_new_with_opt+0x8c [0x1e8e90]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_iseq_compile_with_option+0x234 [0x1e9c20]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'Init_prelude+0x50 [0x401f0]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'process_options+0x744 [0x17c4e0]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'ruby_process_options+0x114 [0x17cfb0]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'ruby_options+0x90 [0x9684c]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'main+0x4c [0x221448]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'_start+0x5c [0x3febc]

-- Other runtime information -----------------------------------------------

Loaded script: ./miniruby

Loaded features:

0 enumerator.so

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Abort (core dumped)

If I can help by providing any additional information, trying a build with different optflags, etc., please don't hesitate to ask.

Updated by ngoto (Naohisa Goto) over 9 years ago

Please try this patch. (attached file, or see below)

Index: compile.c
===================================================================
--- compile.c	(revision 48073)
+++ compile.c	(working copy)
@@ -590,6 +590,15 @@
     struct iseq_compile_data_storage *storage =
 	iseq->compile_data->storage_current;
 
+    size_t mod = 0;
+
+    /* The code assumes that SIZEOF_VALUE is 2 ** N,
+     * SIZEOF_VALUE is enough for word-alignment, and
+     * &storage->buff[0] is always word-aligned. */
+    if ((mod = size & (size_t)(SIZEOF_VALUE - 1)) > 0) {
+      size += (SIZEOF_VALUE - mod);
+    }
+
     if (storage->pos + size > storage->size) {
 	unsigned long alloc_size = storage->size * 2;
 

Updated by nichogl (Geoff Nichols) over 9 years ago

It looks like building with the compile.c patch still produces a miniruby with the bus error. Here's the backtrace:

./miniruby: [BUG] Bus Error at 0x4a230c
ruby 2.1.3p242 (2014-09-19 revision 47630) [sparc-solaris2.11]

-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0002 E:001904 TOP    [FINISH]


-- C level backtrace information -------------------------------------------
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_print_backtrace+0x28 [0x28802c]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_vm_bugreport+0xb8 [0x2881a0]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'report_bug+0x190 [0xa9410]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_bug+0x70 [0xa9554]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'sigbus+0x3c [0x1d8ddc]
/lib/libc.so.1'__sighndlr+0xc [0xff177d0c]
/lib/libc.so.1'call_user_handler+0x370 [0xff16b07c]
/lib/libc.so.1'sigacthandler+0x58 [0xff16b384]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'new_callinfo+0xbc [0x248628]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'new_insn_send+0x5c [0x2486d8]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'iseq_compile_each+0x58c4 [0x254c28]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'iseq_compile_each+0x3af0 [0x252e54]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'iseq_compile_each+0x2b4 [0x24f618]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_iseq_compile_node+0x374 [0x2478dc]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_iseq_new_with_bopt_and_opt+0xa4 [0x25e7a8]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_iseq_new_with_opt+0x48 [0x25e814]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'new_child_iseq+0x78 [0x248794]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'iseq_compile_each+0x8378 [0x2576dc]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_iseq_compile_node+0x4dc [0x247a44]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_iseq_new_with_bopt_and_opt+0xa4 [0x25e7a8]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_iseq_new_with_opt+0x48 [0x25e814]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'rb_iseq_compile_with_option+0x2cc [0x25f720]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'prelude_eval+0x28 [0x4dad8]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'Init_prelude+0x60 [0x4db58]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'ruby_init_prelude+0x14 [0x1d4080]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'process_options+0x9d4 [0x1d4f98]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'ruby_process_options+0xdc [0x1d7100]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'ruby_options+0x13c [0xb0dd0]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'main+0x78 [0x4d9c0]
/export/home/geoff.nichols/buildruby/unpacked/ruby-2.1.3/miniruby'_start+0x5c [0x4d6dc]

-- Other runtime information -----------------------------------------------

* Loaded script: ./miniruby

* Loaded features:

    0 enumerator.so

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

gmake: *** [.rbconfig.time] Abort (core dumped)

Updated by ngoto (Naohisa Goto) over 9 years ago

Please try to add "-mcpu=v9" to gcc, e.g.

% ./configure CFLAGS="-mcpu=v9" CXXFLAGS="-mcpu=v9" LDFLAGS="-mcpu=v9"

Updated by ngoto (Naohisa Goto) over 9 years ago

I can reproduce the Bug Error on SPARC Solaris10 with /usr/sfw/bin/gcc (gcc 3.4.3, SUNWgcc package).

The reason why this only occurs with gcc is that gcc generates SPARC V7 code by default, and 8-byte aligned memory access for 8-byte word (long long) may be required.

On the other hand, Oracle Solaris Studio seems to generate code using instructions extended in SPARCV8PLUS that allows unaligned memory access.

Updated by ngoto (Naohisa Goto) over 9 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

Applied in changeset r48288.


  • compile.c (compile_data_alloc): add padding when strict alignment
    is required for memory access. Currently, the padding is enabled
    only when the CPU is 32-bit SPARC and the compiler is GCC.
    [Bug #9681] [ruby-core:61715]

  • compile.c (STRICT_ALIGNMENT): defined if strict alignment is required

  • compile.c (ALIGNMENT_SIZE, ALIGNMENT_SIZE_MASK, PADDING_SIZE_MAX):
    new macros for alignemnt word size, bit mask, max size of padding.

  • compile.c (calc_padding): new function to calculate padding size.

Updated by ngoto (Naohisa Goto) over 9 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED

Updated by usa (Usaku NAKAMURA) over 9 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: DONE, 2.1: REQUIRED

Applied the patch to ruby_2_0_0 at r48296.
Thank you!

Updated by nagachika (Tomoyuki Chikanaga) over 9 years ago

  • Backport changed from 2.0.0: DONE, 2.1: REQUIRED to 2.0.0: DONE, 2.1: DONE

Backported into ruby_2_1 branch at r48302.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0