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
Updated by cfis (Charlie Savage) over 15 years ago
=begin
Hmm, gettimeofday is not defined, which reveals the bug.
=end
Updated by nobu (Nobuyoshi Nakada) over 15 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
Applied in changeset r22883.
=end
Actions
Like0
Like0Like0