Bug #2789

segfault in DL callbacks with mingw32

Added by Ethan - almost 2 years ago. Updated 10 months ago.

[ruby-core:28330]
Status:Open Start date:02/25/2010
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
ruby -v:ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]

Description

Attempting to use a callback with DL in mingw32 causes segmentation fault. 
(I apologize if I'm in the wrong place - I could not find any bug tracker or any sort of community for DL itself, and since it is included with ruby, I figured the tracker for ruby would be the appropriate place - I'd appreciate it if somebody could point me to where I should be, if that's incorrect.) 

The attached script works correctly in ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]. 
It segfaults in any mingw32 build I try including:
ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32] (this is the latest release candidate, RC2, from rubyinstaller.org)
ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32] (this is the latest release candidate, RC2, from rubyinstaller.org)
ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32] (this is the second-latest release candidate, RC1, from rubyinstaller.org)

Running the attached script, this is the output:

calling enumwindows ...
hwnd is 329524
dl_18_callback_mingw32.rb:10: [BUG] Segmentation fault
ruby 1.8.6 (2010-02-04) [i386-mingw32]

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

dl_18_callback_mingw32.rb - Script to reproduce segfault on mingw32 (443 Bytes) Ethan -, 02/25/2010 02:19 am

Also available in: Atom PDF