Bug #7591

SEGV on sparc Solaris10 when Marshal.dump

Added by Naohisa Goto about 2 years ago. Updated about 2 years ago.

[ruby-dev:46772]
Status:Closed
Priority:Normal
Assignee:-
ruby -v:ruby 2.0.0dev (2012-12-16) [sparc64-solaris2.10] Backport:

Description

sparc Solaris10 上にて、Oracle Solaris Studio 12.3 にてデフォルトの最適化オプションである -O (-xO4 相当)を付けて make すると、rdoc作成時に Marshal.dump 内にて SEGV が発生します。make test-all すると、 TestMarshal が Failure になります。

marshal.c の marshal_dump および marshal_load 関数にて、変数 wrapper が最適化のためスタックに乗らないようで、w_object などの呼び出した先の関数の中で走ったGCによって消されてしまい、SEGVに至るようです。関数の最後のほうにある RB_GC_GUARD(wrapper) は効果が無いようです。

添付のパッチのように修正すると治りました。
添付のパッチ適用後は、関数末尾の RB_GC_GUARD(wrapper) は無くても動くようですが、念のため残しています。

marshal-prevent-GC.patch Magnifier (828 Bytes) Naohisa Goto, 12/19/2012 11:26 PM

Associated revisions

Revision 38473
Added by Naohisa Goto about 2 years ago

  • marshal.c (marshal_dump, marshal_load): fix SEGV during make rdoc and test failure in TestMarshal#test_gc and test_context_switch on SPARC Solaris 10 compiled with Oracle Solaris Studio 12.3. [Bug #7591]

Revision 38473
Added by Naohisa Goto about 2 years ago

  • marshal.c (marshal_dump, marshal_load): fix SEGV during make rdoc and test failure in TestMarshal#test_gc and test_context_switch on SPARC Solaris 10 compiled with Oracle Solaris Studio 12.3. [Bug #7591]

History

#1 Updated by Naohisa Goto about 2 years ago

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

This issue was solved with changeset r38473.
Naohisa, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • marshal.c (marshal_dump, marshal_load): fix SEGV during make rdoc and test failure in TestMarshal#test_gc and test_context_switch on SPARC Solaris 10 compiled with Oracle Solaris Studio 12.3. [Bug #7591]

Also available in: Atom PDF