Skip to content

Commit dff2733

Browse files
author
Your Name
committed
* NSInvocation does not raise anymore during -init as noone should raise during init
* NSAutoreleasePool name can now be 48-1 bytes long added animation.html generator for debugging some tests ("hidden" in test/TAO/forward)
1 parent 4db6a22 commit dff2733

File tree

20 files changed

+190
-54
lines changed

20 files changed

+190
-54
lines changed

.mulle/share/env/environment-plugin.sh

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.mulle/share/env/version

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.mulle/share/sde/version/mulle-sde/cmake

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ only and for instance not on `<unistd.h>`.
1010

1111
| Release Version | Release Notes
1212
|-------------------------------------------------------|--------------
13-
| ![Mulle kybernetiK tag](https://img.shields.io/github/tag/mulle-objc/MulleObjC.svg?branch=release) [![Build Status](https://github.com/mulle-objc/MulleObjC/workflows/CI/badge.svg?branch=release)](//github.com/mulle-objc/MulleObjC/actions) | [RELEASENOTES](RELEASENOTES.md) |
13+
| ![Mulle kybernetiK tag](https://img.shields.io/github/tag/mulle-objc/MulleObjC.svg) [![Build Status](https://github.com/mulle-objc/MulleObjC/workflows/CI/badge.svg)](//github.com/mulle-objc/MulleObjC/actions) | [RELEASENOTES](RELEASENOTES.md) |
1414

1515

1616
## API

RELEASENOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## 0.25.0
22

3+
* NSInvocation does not raise anymore during -init as noone should raise during init
4+
* NSAutoreleasePool name can now be 48-1 bytes long
5+
36
* added new types `NSUIntegerAtomic` and `NSIntegerAtomic` to facilitate @property code
47
* experimental and *untested* `MulleProxy` class added
58
* added NSAutoreleasePool debugging facility to dump contents into CSV format for postprocessing with sqlite or scripts

cmake/share/InstallRpath.cmake

Lines changed: 9 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MulleObjCIntegralType.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include <mulle-c11/mulle-c11-bool.h>
1515
#include <mulle-c11/mulle-c11-integer.h>
16+
#include <mulle-thread/mulle-thread.h>
1617

1718
typedef enum
1819
{

src/class/NSAutoreleasePool.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
{
5757
NSAutoreleasePool *_owner;
5858
void *_storage;
59-
char _mulleNameUTF8String[ 32];
59+
char _mulleNameUTF8String[ 48];
6060
}
6161

6262
// MEMO: this is marked as threadsafe, but that's because its assumed
@@ -265,5 +265,11 @@ void MulleObjCDumpAutoreleasePoolsToFileIndexed( char *filename);
265265
MULLE_OBJC_GLOBAL
266266
void MulleObjCDumpAutoreleasePoolsToFILEWithOptions( FILE *fp, int indexed);
267267

268+
//
269+
// MEMO: like the functions above, you should only use them when you
270+
// are in the debugger and a breakpoint has happened, but for debugging
271+
// you can sometimes get by even in running programs, if threads are
272+
// waiting for each other.
273+
//
268274
MULLE_OBJC_GLOBAL
269275
unsigned long MulleObjCDumpAutoreleasePoolsFrame( void);

src/class/NSAutoreleasePool.m

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,18 @@ void mulle_objc_thread_done_poolconfiguration( struct _mulle_objc_universe *un
241241
- (char *) mulleNameUTF8String
242242
{
243243
if( ! _mulleNameUTF8String[ 0])
244-
mulle_snprintf( _mulleNameUTF8String, sizeof( _mulleNameUTF8String), "%p", self);
244+
mulle_snprintf( _mulleNameUTF8String, sizeof( _mulleNameUTF8String),
245+
"<NSAutoreleasePool %p>",
246+
MulleObjCInstanceGetClassNameUTF8String( self),
247+
self);
245248
return( &_mulleNameUTF8String[ 0]);
246249
}
247250

248251

249252
- (void) mulleSetNameUTF8String:(char *) s
250253
{
251254
strncpy( _mulleNameUTF8String, s ? s : "", sizeof( _mulleNameUTF8String) - 1);
255+
_mulleNameUTF8String[ sizeof( _mulleNameUTF8String) - 1] = 0;
252256
}
253257

254258

@@ -1181,7 +1185,10 @@ static inline void _dump_info_init( struct dump_info *p,
11811185
{
11821186
if( thread != info->thread.mainthread)
11831187
{
1184-
mulle__pointermap_set( &p->thread_index_map, thread, (void *) (intptr_t) thread_index, NULL);
1188+
mulle__pointermap_set( &p->thread_index_map,
1189+
thread,
1190+
(void *) (intptr_t) thread_index,
1191+
NULL);
11851192
++thread_index;
11861193
}
11871194
}
@@ -1190,6 +1197,9 @@ static inline void _dump_info_init( struct dump_info *p,
11901197

11911198
static inline void _dump_info_done( struct dump_info *p)
11921199
{
1200+
mulle_free( p->thread_name);
1201+
mulle_free( p->pool_name);
1202+
11931203
_mulle__pointermap_done( &p->thread_index_map, NULL);
11941204
_mulle__pointermap_done( &p->object_index_map, NULL);
11951205
}
@@ -1204,7 +1214,9 @@ static void _dumpinfo_dump_thread( struct dump_info *info,
12041214
struct _mulle_objc_poolconfiguration *config;
12051215

12061216
info->thread_adr = thread;
1207-
info->thread_name = [thread mulleNameUTF8String];
1217+
1218+
mulle_free( info->thread_name);
1219+
info->thread_name = mulle_strdup( [thread mulleNameUTF8String]);
12081220
info->thread_index = (int) index;
12091221
info->pool_index = 0;
12101222

@@ -1214,7 +1226,8 @@ static void _dumpinfo_dump_thread( struct dump_info *info,
12141226

12151227
for( pool = config->tail; pool; pool = pool->_owner)
12161228
{
1217-
info->pool_name = [pool mulleNameUTF8String];
1229+
mulle_free( info->pool_name);
1230+
info->pool_name = mulle_strdup( [pool mulleNameUTF8String]);
12181231
info->pool_adr = pool;
12191232

12201233
--info->pool_index;
@@ -1250,7 +1263,11 @@ static void _dumpinfo_dump_thread( struct dump_info *info,
12501263
_dump_info_done( &dump_info);
12511264
}
12521265

1253-
1266+
//
1267+
// Though we do a "lock" its just to block another
1268+
// MulleObjCDumpAutoreleasePoolsToFILEWithOptions, dumping other threads
1269+
// autoreleasepools is obviously risky.
1270+
//
12541271
void MulleObjCDumpAutoreleasePoolsToFILEWithOptions( FILE *fp, int options)
12551272
{
12561273
struct _mulle_objc_universe *universe;

src/class/NSInvocation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
- (void) setSelector:(SEL) selector;
9090

9191
- (id) target;
92-
- (void) setTarget:target;
92+
- (void) setTarget:(id) target;
9393

9494
- (void) invoke;
9595
- (void) invokeWithTarget:(id) target;

0 commit comments

Comments
 (0)