mySTEP

Issue 555: NSInvocation / NSMethodSignature

Reported by Nikolaus Schaller, Jan 16, 2014

has been heavily improved recently so that it runs many of the 
UnitTests without crashing.

Still crashing are:
* test15
* test16 (both have struct return and parameters)
* forward45 (forwarding within forwardInvocation: to a different 
selector)

The other tests give this result:


Test Suite 'NSInvocationTest' started at 20140116T164323Z+0000
Test Case '-[NSInvocationTest test00]' passed (0.113 seconds).
Test Case '-[NSInvocationTest test01]' passed (0.261 seconds).
Test Case '-[NSInvocationTest test02]' passed (0.242 seconds).
Test Case '-[NSInvocationTest test03]' passed (0.255 seconds).
Test Case '-[NSInvocationTest test10]' passed (0.130 seconds).
Test Case '-[NSInvocationTest test11]' passed (0.132 seconds).
NSInvocationTest.m:216: error: -[NSInvocationTest test12] : '0' 
should be equal to '3.14159265359': 
NSInvocationTest.m:217: error: -[NSInvocationTest test12] : 
'0.000000' should be equal to '2.718280': 
NSInvocationTest.m:240: error: -[NSInvocationTest test12] : 
'0.000000' should be equal to '5.859873': 
Test Case '-[NSInvocationTest test12]' failed (0.290 seconds).
NSInvocationTest.m:251: error: -[NSInvocationTest test13] : 
"sel_isEqual(_cmd, @selector(invoke13:b:c:d:e:f:g:))" 
should be true. 
NSInvocationTest.m:252: error: -[NSInvocationTest test13] : 
'<nil>' should be equal to 'a' 
NSInvocationTest.m:253: error: -[NSInvocationTest test13] : 
'<nil>' should be equal to 'b' 
Test Case '-[NSInvocationTest test13]' failed (0.277 seconds).
NSInvocationTest.m:314: error: -[NSInvocationTest test14] : '' 
should be equal to 'a': 
NSInvocationTest.m:315: error: -[NSInvocationTest test14] : '0' 
should be equal to '3003': 
NSInvocationTest.m:319: error: -[NSInvocationTest test14] : 
'-5299962206984168629' should be equal to '123456789012345678': 
NSInvocationTest.m:320: error: -[NSInvocationTest test14] : (g) == 
((char *) "g") raised -[NSValue value:withObjCType:] 
unrecognized objc type *. 
Test Case '-[NSInvocationTest test14]' failed (0.275 seconds).
Test Case '-[NSInvocationTest test17]' passed (0.129 seconds).
Test Case '-[NSInvocationTest test20]' passed (0.219 seconds).
Test Case '-[NSInvocationTest test30]' passed (0.108 seconds).
NSInvocationTest.m:617: error: -[NSInvocationTest test40] : '45' 
should be equal to '40': 
NSInvocationTest.m:660: error: -[NSInvocationTest test40] : '45' 
should be equal to '40': 
Test Case '-[NSInvocationTest test40]' failed (1.135 seconds).
NSInvocationTest.m:675: error: -[NSInvocationTest test60] : '0' 
should be equal to '1': 
NSInvocationTest.m:676: error: -[NSInvocationTest test60] : '0' 
should be equal to '1': 
NSInvocationTest.m:731: error: -[NSInvocationTest test60] : '2' 
should be equal to '1': 
Test Case '-[NSInvocationTest test60]' failed (0.276 seconds).
Test Case '-[NSInvocationTest test61]' passed (0.132 seconds).
NSInvocationTest.m:796: error: -[NSInvocationTest test63] : '1' 
should be equal to '2': 
Test Case '-[NSInvocationTest test63]' failed (0.136 seconds).
Test Suite 'NSInvocationTest' finished at 20140116T164327Z+0000.
Passed 16 tests, with 16 failures (0 unexpected) in 4.110 (4.155) 
seconds

This means that there are still problems with
* test12: passing float/double
* test13: comparing selectors,and a/b
* test14: integers/chars
* test60/63: small differences in memory management

Comment 1 by Nikolaus Schaller, Apr 2, 2014

libffi may enlighten for the stack layout for VFP (armhf):

https://github.com/atgreen/libffi/blob/master/src/arm/ffi.c

Comment 2 by Nikolaus Schaller, Apr 2, 2014

Summary: NSInvocation / NSMethodSignature

Comment 3 by Nikolaus Schaller, Apr 2, 2014

Labels: Priority:Critical Priority:Medium

Comment 4 by Nikolaus Schaller, May 9, 2016

Needs complete rewrite for new libobjc API since gcc 4.8

Created: 10 years 6 months ago by Nikolaus Schaller

Updated: 8 years 2 months ago

Status: New

Labels:
Type:Defect
Priority:Critical