Bug #9558
closedBus Error on Sparc in r45155 due to __attribute__((packed))
Description
Since r45155, the following error occurs on Sparc Solaris.
$ ./ruby --disable-gems -e 'p Time.now.utc'
-e:1: [BUG] Bus Error at 0xffffffff7fffe775
ruby 2.2.0dev (2014-02-23) [sparc64-solaris2.10]
-- Control frame information -----------------------------------------------
c:0003 p:---- s:0008 e:000007 CFUNC :utc
c:0002 p:0014 s:0005 E:001fb8 EVAL -e:1 [FINISH]
c:0001 p:0000 s:0002 E:0006e8 TOP [FINISH]
-- Ruby level backtrace information ----------------------------------------
-e:1:in <main>' -e:1:in
utc'
-- Other runtime information -----------------------------------------------
-
Loaded script: -e
-
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
This is due to attribute((packed)) added in r45155.
SPARC (and many other CPUs) can not access to unaligned memory address.
Please revert r45155.
Updated by Anonymous almost 11 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r45165.
time: only use packed struct on x86*
- configure.in: define PACKED_STRUCT_UNALIGNED for x86*
- timev.h (struct vtm): use PACKED_STRUCT_UNALIGNED
- time.c (struct time_object): ditto
[Bug #9558] non-x86 cannot safely access unaligned addresses
Updated by normalperson (Eric Wong) almost 11 years ago
ngotogenome@gmail.com wrote:
This is due to attribute((packed)) added in r45155.
SPARC (and many other CPUs) can not access to unaligned memory address.Please revert r45155.
Sorry about that, can you try r45165? Thanks.
I'm only packing the struct on x86* now.