Actions
Bug #1262
closedHeap Corruption in DL::Handle
Description
=begin
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
=end
Files
Actions
Like0
Like0Like0