[#11073] segfault printing instruction sequence for iterator — <noreply@...>

Bugs item #10527, was opened at 2007-05-02 14:42

14 messages 2007/05/02
[#11142] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Nobuyoshi Nakada <nobu@...> 2007/05/10

Hi,

[#11188] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Paul Brannan <pbrannan@...> 2007/05/16

On Thu, May 10, 2007 at 04:51:18PM +0900, Nobuyoshi Nakada wrote:

[#11234] Planning to release 1.8.6 errata — Urabe Shyouhei <shyouhei@...>

Hi all.

17 messages 2007/05/25

[ ruby-Bugs-3658 ] Passing wrong data type to Win32API#call causes segfault

From: <noreply@...>
Date: 2007-05-29 17:25:08 UTC
List: ruby-core #11303
Bugs item #3658, was opened at 2006-02-24 18:33
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=3658&group_id=426

>Category: External APIs / Interfacing
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Daniel Berger (djberg96)
Assigned to: Nobody (None)
Summary: Passing wrong data type to Win32API#call causes segfault

Initial Comment:
Windows XP
Ruby 1.8.4 (both hand built and the installer)

Passing the wrong data type to an instance of Win32API causes a segfault:

require 'Win32API'
RegFormat = Win32API.new('user32', 'RegisterClipboardFormat', 'P', 'I')
RegFormat.call(1) # Boom!

Shouldn't it just raise a TypeError?  Segfaulting the interpreter seems pretty harsh.

Regards,

Dan

----------------------------------------------------------------------

Comment By: Daniel Berger (djberg96)
Date: 2006-03-23 10:28

Message:
Specifically, it appears to be choking on line 194:

ret = ApiFunction(param);

Where ApiFunction is defined as:

FARPROC ApiFunction = (FARPROC)NUM2ULONG(obj_proc);

Any ideas?

Dan

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=3658&group_id=426

In This Thread

Prev Next