Bug #2353: hash.c:setenv causes crashes in Solaris
http://redmine.ruby-lang.org/issues/show/2353

Author: Christian Höltje
Status: Open, Priority: Normal
Category: core
ruby -v: ruby 1.9.2dev (2009-11-10 trunk 25704) [sparc-solaris2.8]

Hi!

I submitted this as a pull request for shyouhei's ruby git repo, via github.
I want to document this here too.

The environ manipulations that are done in the fall-back code in hash.c (the code that runs if !WIN32 and !HAVE_SETENV) causes crashes in Solaris some times. In addition, it fails hard if you use the binary on a newer version of Solaris.

The code I wrote works on Solaris 8 (all tests pass) and works when the binary is copied to a Solaris 10 system and some simple test code that sets and unsets lots of environment variable is run.

With a clean ruby, the test cases pass in Solaris 8 (usually) but my test code would not run at all when the binary is copied to Solaris 10.

If there is anything else I should do, please don't hesitant to tell me.

Ciao!


----------------------------------------
http://redmine.ruby-lang.org