Project

General

Profile

Actions

Bug #1265

closed

test_import calls printf in different c runtime libraries

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

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

Description

=begin
On Windows, test import loads msvcrt.dll and then calls printf. That only works with mingw or VC6. Any newer version of VC will cause a segmentation fault since you cannot mix file handles across runtime libraries.

Patch causes test to not be run on Windows.
=end


Files

test_import.patch (449 Bytes) test_import.patch cfis (Charlie Savage), 03/11/2009 06:45 AM
Actions #1

Updated by usa (Usaku NAKAMURA) about 15 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r22890.
=end

Actions #2

Updated by cfis (Charlie Savage) about 15 years ago

=begin
Hi Usaku,

I tried the same approach before submitting my patch, put it doesn't work:

ruby test_dl2.rb:

  1. Error:
    test_empty(DL::TestBase):
    DL::DLError: Invalid argument
    C:/Development/src/ruby_trunk/test/dl/test_base.rb:65:in initialize' C:/Development/src/ruby_trunk/test/dl/test_base.rb:65:in dlopen'
    C:/Development/src/ruby_trunk/test/dl/test_base.rb:65:in `setup'

Not a very helpful error message, but it seems like you can't dynamically load msvcr90.dll (or if you can it doesn't work for me).

Also, in your logic, instead of this:

libc_so = libm_so = RbConfig::CONFIG["RUBY_SO_NAME"].split(/-/, 2)[0] + ".dll"

Could you do this:

libc_so = libm_so = RbConfig::CONFIG["sitearch"].split(/-/, 2)[1] + ".dll"

Thanks,

Charlie

  1. Error:
    test_call_double(DL::TestDL):
    DL::DLError: unknown symbol "atof"
    test_dl2.rb:26:in []' test_dl2.rb:26:in test_call_double'

Etc....

The new code loads ruby19.dll. Is that what you mean to do? Or were you trying to

=end

Actions #3

Updated by usa (Usaku NAKAMURA) about 15 years ago

  • Category changed from core to ext
  • Status changed from Closed to Open
  • Assignee set to usa (Usaku NAKAMURA)

=begin

=end

Actions #4

Updated by nobu (Nobuyoshi Nakada) about 15 years ago

  • Status changed from Open to Closed

=begin
Applied in changeset r22986.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0