Ruby/DLでSEGV

落ちた。少なくともmswin32版はハンドルしてない…と。

__declspec(dllexport) void foo();

void foo() {
  *(char *)0 = 1;
}
require 'dl/import'

module Foo
  extend DL::Importable
  dlload 'foo.dll'
  extern "void foo()"
end

Foo.foo


~$ ruby foo.rb
(eval):5: [BUG] Segmentation fault
ruby 1.8.6 (2007-06-07) [i386-mswin32]


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.