fix [2170898] abort() doesn't print a stack tarce
the issue here is that abort() can be called from anywhere, in particular from malloc or free. When we try to use the debug_log functions, these can end up calling into some code (like malloc/free) that called abort() in the first place and end up in an infinite recursion loop.
This commit is contained in:
@@ -73,10 +73,8 @@ abort(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* temporary, for bug hunting */
|
/* temporary, for bug hunting */
|
||||||
debug_log("abort() called in pid %d\n", getpid());
|
|
||||||
/* seg fault seems to produce better debuggerd results than SIGABRT */
|
/* seg fault seems to produce better debuggerd results than SIGABRT */
|
||||||
*((char*)0xdeadbaad) = 39;
|
*((char*)0xdeadbaad) = 39;
|
||||||
debug_log("somehow we're not dead?\n");
|
|
||||||
/* -- */
|
/* -- */
|
||||||
|
|
||||||
(void)kill(getpid(), SIGABRT);
|
(void)kill(getpid(), SIGABRT);
|
||||||
|
Reference in New Issue
Block a user