mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Aim to improve thread safety of stacktrace generation.
This commit is contained in:
parent
7c52bd7c21
commit
35a763f3cb
2 changed files with 8 additions and 0 deletions
|
@ -1188,6 +1188,7 @@ GSPrivateReturnAddresses(NSUInteger **returns)
|
|||
|
||||
a = [[NSMutableArray alloc] initWithCapacity: count];
|
||||
|
||||
GS_MUTEX_LOCK(traceLock);
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
GSFunctionInfo *aFrame = nil;
|
||||
|
@ -1246,6 +1247,7 @@ GSPrivateReturnAddresses(NSUInteger **returns)
|
|||
[a addObject: [aFrame description]];
|
||||
}
|
||||
symbols = [a copy];
|
||||
GS_MUTEX_UNLOCK(traceLock);
|
||||
[a release];
|
||||
#elif defined(_WIN32)
|
||||
void **ptrs = (void**)&returns[FrameOffset];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue