Project

General

Profile

Bug #11684

Pack#unpack test failure on Solaris 10 with Oracle Solaris Studio 12.4

Added by ngoto (Naohisa Goto) almost 3 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.5.0dev (2017-12-19) [sparc64-solaris2.10]
[ruby-core:71485]

Description

On Solaris 10, when compiling ruby with Oracle Solaris Studio 12.4 with -xO4 optimization option, the following test failure is observed during make test-all. (tested with r52550)

  1) Failure:
TestPack#test_pack_unpack_atmark [XXXXX/test/ruby/test_pack.rb:548]:
<[nil]> expected but was
<[]>.

  2) Failure:
TestPack#test_short_string [/XXXXX/test/ruby/test_pack.rb:735]:
<[1, nil]> expected but was
<[1]>.

15885 tests, 2225854 assertions, 2 failures, 0 errors, 50 skips

It seems that String#unpack is incorrectly compiled with Oracle Solaris Studio 12.4 with -xO4.

$ irb
irb(main):001:0> [1,2].pack('i2')
=> "\x00\x00\x00\x01\x00\x00\x00\x02" ###<== OK
irb(main):002:0> "\x00\x00\x00\x01\x00\x00\x00\x02".unpack('i3')
=> [1, 2] ###<== [1, 2, nil] is expected

It seems that PACK_ITEM_ADJUST() is wiped out by wrong optimization.
I think this is a bug of Oracle Solaris Studio 12.4.

The failure is not observed with -xO3 or lower optimization option.
It is also not observed by using Oracle Solaris Studio 12.3, even speficying -xO4 optimization option.

Associated revisions

Revision 238c6c5b
Added by ngoto (Naohisa Goto) almost 3 years ago

  • pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Solaris Studio 12.4 on Solaris with -xO4 optimization option. [Bug #11684]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 52559
Added by ngoto (Naohisa Goto) almost 3 years ago

  • pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Solaris Studio 12.4 on Solaris with -xO4 optimization option. [Bug #11684]

Revision 52559
Added by ngoto (Naohisa Goto) almost 3 years ago

  • pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Solaris Studio 12.4 on Solaris with -xO4 optimization option. [Bug #11684]

Revision 52559
Added by ngoto (Naohisa Goto) almost 3 years ago

  • pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Solaris Studio 12.4 on Solaris with -xO4 optimization option. [Bug #11684]

Revision 52559
Added by ngoto (Naohisa Goto) almost 3 years ago

  • pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Solaris Studio 12.4 on Solaris with -xO4 optimization option. [Bug #11684]

Revision f687a147
Added by ngoto (Naohisa Goto) over 1 year ago

Workaround for optimization bug of Oracle Solaris Studio 12.4 and 12.5

  • pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Solaris Studio 12.4 and 12.5 (Oracle Developer Studio 12.5) on Solaris with -xO4 optimization option. [Bug #11684]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 58358
Added by ngoto (Naohisa Goto) over 1 year ago

Workaround for optimization bug of Oracle Solaris Studio 12.4 and 12.5

  • pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Solaris Studio 12.4 and 12.5 (Oracle Developer Studio 12.5) on Solaris with -xO4 optimization option. [Bug #11684]

Revision 58358
Added by ngoto (Naohisa Goto) over 1 year ago

Workaround for optimization bug of Oracle Solaris Studio 12.4 and 12.5

  • pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Solaris Studio 12.4 and 12.5 (Oracle Developer Studio 12.5) on Solaris with -xO4 optimization option. [Bug #11684]

Revision 504842d8
Added by ngoto (Naohisa Goto) 8 months ago

Workaround for optimization bug of Oracle Developer Studio 12.4-12.6

  • pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Developer Studio (Oracle Solaris Studio) 12.4, 12.5, and 12.6 on Solaris 10 with -xO4 optimization option. [Bug #11684]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 61344
Added by ngoto (Naohisa Goto) 8 months ago

Workaround for optimization bug of Oracle Developer Studio 12.4-12.6

  • pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Developer Studio (Oracle Solaris Studio) 12.4, 12.5, and 12.6 on Solaris 10 with -xO4 optimization option. [Bug #11684]

Revision 61344
Added by ngoto (Naohisa Goto) 8 months ago

Workaround for optimization bug of Oracle Developer Studio 12.4-12.6

  • pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Developer Studio (Oracle Solaris Studio) 12.4, 12.5, and 12.6 on Solaris 10 with -xO4 optimization option. [Bug #11684]

History

#1 [ruby-core:71484] Updated by ngoto (Naohisa Goto) almost 3 years ago

  • Subject changed from Pack#unpack test failure on to Pack#unpack test failure on Solaris 10 with Oracle Solaris Studio 12.4

#2 Updated by ngoto (Naohisa Goto) almost 3 years ago

  • Status changed from Open to Closed

Applied in changeset r52559.


  • pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Solaris Studio 12.4 on Solaris with -xO4 optimization option. [Bug #11684]

#3 [ruby-core:80690] Updated by ngoto (Naohisa Goto) over 1 year ago

  • Status changed from Closed to Open

The bug is also observed with Oracle Developer Studio 12.5 (the next version of Oracle Solaris Studio 12.4).

#4 Updated by ngoto (Naohisa Goto) over 1 year ago

  • Status changed from Open to Closed

Applied in changeset trunk|r58358.


Workaround for optimization bug of Oracle Solaris Studio 12.4 and 12.5

  • pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Solaris Studio 12.4 and 12.5 (Oracle Developer Studio 12.5) on Solaris with -xO4 optimization option. [Bug #11684]

#5 [ruby-core:84351] Updated by ngoto (Naohisa Goto) 8 months ago

  • ruby -v changed from ruby 2.3.0dev (2015-11-12) [sparc64-solaris2.10] to ruby 2.5.0dev (2017-12-19) [sparc64-solaris2.10]
  • Assignee set to ngoto (Naohisa Goto)
  • Status changed from Closed to Open

Reopen because this is also observed with Oracle Developer Studio 12.6.

#6 Updated by ngoto (Naohisa Goto) 8 months ago

  • Status changed from Open to Closed

Applied in changeset trunk|r61344.


Workaround for optimization bug of Oracle Developer Studio 12.4-12.6

  • pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Developer Studio (Oracle Solaris Studio) 12.4, 12.5, and 12.6 on Solaris 10 with -xO4 optimization option. [Bug #11684]

Also available in: Atom PDF