From: Charlie Savage Date: 2009-03-11T04:39:23+09:00 Subject: [ruby-core:22822] [Bug #1262] Heap Corruption in DL::Handle Bug #1262: Heap Corruption in DL::Handle http://redmine.ruby-lang.org/issues/show/1262 Author: Charlie Savage Status: Open, Priority: Normal Category: core, Target version: 1.9.1 ruby -v: ruby 1.9.2dev (2009-03-06) [i386-mswin32_90] The test case below on Window, when running with -RCT1, reveals heap corruption. The problem is that gettimeofday is defined in the c library on windows, so the function is never found. That causes handle.c to incorrectly deallocate a buffer which it then writes to. Patch is attached. Charlie -------------------- require 'test_base' require 'dl/import' module DL module LIBC extend Importer dlload LIBC_SO extern "int gettimeofday(timeval*, timezone*)" rescue nil end class TestImport < TestBase def test_doesnt_matter assert(true) end end end ---------------------------------------- http://redmine.ruby-lang.org