Issue #9681 has been updated by Geoff Nichols.


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)
~~~

----------------------------------------
Bug #9681: miniruby Bus Error at 0x3d44c4
https://bugs.ruby-lang.org/issues/9681#change-49576

* Author: Genie Sol
* Status: Feedback
* Priority: Normal
* Assignee: Naohisa Goto
* Category: 
* Target version: 
* ruby -v: ruby-2.1.1
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
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)
config.log (912 KB)
config.status (32.1 KB)
20141022-compile_data_alloc-word-align.patch (643 Bytes)


-- 
https://bugs.ruby-lang.org/