diff --git a/test/test_crash.rb b/test/test_crash.rb new file mode 100644 index 0000000..8d8a656 --- /dev/null +++ b/test/test_crash.rb @@ -0,0 +1,10 @@ +$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) +require 'mini_racer' + +context = MiniRacer::Context.new(timeout: 10) +context.attach("echo", proc{|msg| GC.start; p msg; msg}) +GC.disable +100.times { 'foo' } # alloc a handful of objects +GC.enable + +context.eval("while(true) echo('foo');")