Bug #2353
closedhash.c:setenv causes crashes in Solaris
Description
=begin
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!
=end
Files