mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +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
|
@ -1,3 +1,9 @@
|
|||
2022-01-24 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSException.m:
|
||||
Wrap bfd backtrace code in a lock, just in case something in there
|
||||
is not thread-safe.
|
||||
|
||||
2022-01-08 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* ChangeLog: Update for new release
|
||||
|
|
|
@ -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…
Reference in a new issue