help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] [PATCH 3/3] cint: Fail the VMpr_CFuncDescriptor_cal


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] [PATCH 3/3] cint: Fail the VMpr_CFuncDescriptor_call primitive with wrong args
Date: Sat, 05 Feb 2011 16:29:28 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 02/04/2011 10:52 PM, Holger Hans Peter Freyther wrote:
On 02/04/2011 10:28 PM, Holger Hans Peter Freyther wrote:
+    testDoNotCrashWithWrongTypes [
+        "The objective is to see if wrong types for a cCallout will
+         make the VM crash or not. It should also check if these calls
+         raise the appropriate exception."
+        | socket impl |
+
+        socket := DatagramSocket new.
+        impl := socket implementation.
+
+        self should: [impl accept: -1 peer: nil addrLen: 0] raise: 
SystemExceptions.PrimitiveFailed.
+        self should: [impl getPeerName: -1 addr: nil addrLen: 0] raise: 
SystemExceptions.PrimitiveFailed.
+        self should: [impl getSockName: -1 addr: nil addrLen: 0] raise: 
SystemExceptions.PrimitiveFailed.
+        self should: [impl receive: -1 buffer: nil size: 0 flags: 0 from: nil 
size: 0] raise: SystemExceptions.PrimitiveFailed.
+    ]
  ]

this fails from within the testsuite as it is generating stderr output. Is
this something we can handle in autotest?

I'll make it XFAIL for now. For 3.3 we can change the PrimitiveFailed to invoke a Smalltalk implementation of the type checks and raise a proper exception.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]