> It doesn't crash for me.
> What platform (os, ruby version, compiler, etc.) are you using?

That's strange,
Im using gentoo linux, ruby version emerged is 1.8.0-r6, compiling command
is 'g++ testruby.cpp -g -lruby18 -I<ruby path>'
Ive checked the version of ruby by printing out the defines
RUBY_VERSION and RUBY_RELEASE_DATE, and the library/include matches up.

Ive just tried it with ruby 1.8.1-r6 and this dumps as well.

Hmm... This is stranger, it works with ruby 1.6.8.  Has garbage collection
management methods changed in between versions?

> Where in rb_gc() does the crash occur?

The following is from gdb, valgrind gives many errors, all related to
rb_gc and rb_gc_mark_locations, but it is very verbose:

Program received signal SIGSEGV, Segmentation fault.
0x4007c683 in rb_gc_mark_locations () from /usr/lib/libruby18.so.1.8
(gdb) bt
#0  0x4007c683 in rb_gc_mark_locations () from /usr/lib/libruby18.so.1.8
#1  0x4007e156 in rb_gc () from /usr/lib/libruby18.so.1.8
#2  0x08048b18 in dontCrash(std::string) (s=Cannot access memory at address 0x0
) at testruby.cpp:12
#3  0x08048b8f in main () at testruby.cpp:22


Thanks again,
-Godot