Added another @synchronized() test that results in a segfault

main
qmathe 15 years ago
parent 10cb4f9b5c
commit c4cc8f4734

@ -29,6 +29,7 @@ static int stringsEqual(const char *a, const char *b)
- (int) manyTypes;
- (void) synchronizedCode;
+ (void) synchronizedCode;
+ (id) shared;
- (BOOL) basicThrowAndCatchException;
@end
@ -62,6 +63,11 @@ static int stringsEqual(const char *a, const char *b)
{
@synchronized(self) { }
}
+ (id) shared
{
@synchronized(self) { }
return nil;
}
- (void) throwException
{
@throw [NSException exceptionWithName: @"RuntimeTestException" reason: @"" userInfo: nil];
@ -214,6 +220,7 @@ void testSynchronized()
printf("Enter synchronized code\n");
[foo synchronizedCode];
[foo release];
[Foo shared];
printf("testSynchronized() ran\n");
}

Loading…
Cancel
Save