Граф коммитов

59 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 1d9e377adf [runtime] Fix potential memory leak in error conditions. (#1723)
This was found by clang's static analyzer:

    trampolines.m:94:16: warning: Potential leak of memory pointed to by 'buf'
                                                             return NULL;
                                                                    ^~~~
2017-02-20 19:35:40 +01:00
Rolf Bjarne Kvinge a4d2998e5b [runtime] Allocate memory correctly to make clang's static analyzer happy. (#1724)
trampolines.m:75:22: warning: Result of 'malloc' is converted to a pointer of type 'id', which is incompatible with sizeof operand type 'void *'
                                    id *buf = (id *) malloc (sizeof (void *) * length);
                                    ~~~~             ^~~~~~  ~~~~~~~~~~~~~~~
2017-02-20 19:29:13 +01:00
Rolf Bjarne Kvinge cfb84f6e17 [runtime] Use printf on watchOS, NSLog doesn't shown up (by default) (#772)
* [runtime] Use printf on watchOS, NSLog doesn't shown up (by default).

* [runtime] Use a wrapper function for logging.

So that we can chose between printf and NSLog at runtime,
depending on where we're running.
2016-09-06 16:55:23 -04:00
Rolf Bjarne Kvinge 2d28e24837 [runtime] Handle any exceptions whenever we return from managed code. 2016-06-08 20:05:54 +02:00
Rolf Bjarne Kvinge 4a5ce42b48 [runtime] Add a MONO_ASSERT_GC_SAFE_OR_DETACHED.
Since MONO_ASSERT_GC_SAFE asserts when executed on a detached thread,
and yet it's clearly safe for the GC to run when a thread is detached.
2016-05-26 17:47:10 +02:00
Rolf Bjarne Kvinge af0d01c93a Initial review pass for COOP for watchOS. 2016-05-26 17:47:10 +02:00
Rolf Bjarne Kvinge 79c68238ce [runtime] Don't use NSMethodSignature to compute frame size, it can't handle all method signature encodings.
In particular NSMethodSignature chokes on encodings like this:

	[NSDecimalNumber initWithDecimal:] = "@36@0:8{?=b8b4b1b1b18[8S]}16"

with an exception:

	NSInvalidArgumentException Reason: +[NSMethodSignature signatureWithObjCTypes:]: unsupported type encoding spec '{?}'

so implement our own code to calculate the frame size.
2016-05-17 11:24:02 +02:00
Rolf Bjarne Kvinge 1f1f6991a3 Implement support for exception marshalling. 2016-05-17 11:23:48 +02:00
Rolf Bjarne Kvinge ac418df815 Build our runtime. 2016-04-24 14:47:24 -04:00