Skip to content
Snippets Groups Projects
Commit 4d55070f authored by Eric Cano's avatar Eric Cano
Browse files

Moved the locking around the right function :-/. (Race reproduced in about 25% of cases so far).

parent 220dfce6
No related branches found
No related tags found
No related merge requests found
......@@ -30,10 +30,11 @@
castor::exception::Backtrace::Backtrace(): m_trace() {
void * array[200];
g_lock.lock();
size_t depth = ::backtrace(array, sizeof(array)/sizeof(void*));
g_lock.lock();
char ** strings = ::backtrace_symbols(array, depth);
g_lock.unlock();
if (!strings)
m_trace = "";
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment