xml4r/libxml-ruby — pull request #71 by dbussink (2013-08-01 07:37:38+00:00)
Title: During a GC cycle one should not call back into Ruby land

In MRI you get away with this since rb_warning is all implemented in C
and probably doesn't allocate any objects itself. In Rubinius rb_warning
is actually implemented in Ruby.

This causes an issue because now it tries to call back into Ruby land
while a GC phase is running that does not allow for concurrency.

Since rb_warning gives you no guarantees about it's implementation, it
should not be called from a GC mark function since this exposes
undefined behavior.

If a warning must be printed here, it's probably better to manually
print to stderr.