1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-26 03:11:44 +02:00

Fix a test failure

The test contains hints to users of unw_backtrace() and friends
on how to ensure correctness in a multi-threaded program
This commit is contained in:
Arun Sharma 2012-08-04 17:58:24 -07:00
parent 814bd79fb1
commit 32202619c4

View file

@ -108,7 +108,6 @@ void
foo1 (void)
{
foo2 ();
return NULL;
}
int
@ -123,6 +122,10 @@ main (int argc, char **argv)
if (pthread_key_create (&key, NULL))
panic ("FAILURE: unable to create key %d\n", i);
}
/* Call backtrace right after thread creation,
* where we are sure that we're not inside malloc */
do_backtrace();
num_mallocs = num_callocs = 0;
foo1 ();
num_errors = num_mallocs + num_callocs;
if (num_errors > 0)