Project

General

Profile

Actions

Bug #1262

closed

Heap Corruption in DL::Handle

Added by cfis (Charlie Savage) over 15 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2dev (2009-03-06) [i386-mswin32_90]
Backport:
[ruby-core:22822]

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

dl_handle.patch (583 Bytes) dl_handle.patch cfis (Charlie Savage), 03/11/2009 04:41 AM
Actions #1

Updated by cfis (Charlie Savage) over 15 years ago

=begin
Hmm, gettimeofday is not defined, which reveals the bug.
=end

Actions #2

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

Also available in: Atom PDF

Like0
Like0Like0