aboutsummaryrefslogtreecommitdiff
path: root/stdlib/exit.h
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@redhat.com>2016-06-06 14:20:58 -0400
committerCarlos O'Donell <carlos@redhat.com>2016-06-06 21:40:25 -0400
commit47dd3543d36465496970406da03db5aecdc377ee (patch)
tree2288d28761125dcb0b27e150f76314d064decc43 /stdlib/exit.h
parent3f61232ab337b8162ed1a37558b30ce714dba894 (diff)
downloadglibc-47dd3543d36465496970406da03db5aecdc377ee.zip
glibc-47dd3543d36465496970406da03db5aecdc377ee.tar.gz
glibc-47dd3543d36465496970406da03db5aecdc377ee.tar.bz2
Bug 20198: quick_exit should not call destructors.
In C++11 18.5.12 says "Objects shall not be destroyed as a result of calling quick_exit." In C11 quick_exit is silent about thread object destruction. Therefore to make glibc C++ compliant we do not call any thread local destructors. A new regression test verifies the fix. I will note that C++11 18.5.3 makes it clear that C++ defines additional requirements for _Exit() to prevent it from executing destructors. Given that the point of _Exit() is to terminate the process immediately it makes sense the C and C++ should line up and avoid calling destructors. No failures. New regtest passes.
Diffstat (limited to 'stdlib/exit.h')
-rw-r--r--stdlib/exit.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/stdlib/exit.h b/stdlib/exit.h
index b28a4c9..b55e5d1 100644
--- a/stdlib/exit.h
+++ b/stdlib/exit.h
@@ -63,8 +63,9 @@ extern struct exit_function_list *__quick_exit_funcs attribute_hidden;
extern struct exit_function *__new_exitfn (struct exit_function_list **listp);
extern uint64_t __new_exitfn_called attribute_hidden;
-extern void __run_exit_handlers (int status, struct exit_function_list **listp,
- bool run_list_atexit)
+extern void __run_exit_handlers (int status,
+ struct exit_function_list **listp,
+ bool run_list_atexit, bool run_dtors)
attribute_hidden __attribute__ ((__noreturn__));
extern int __internal_atexit (void (*func) (void *), void *arg, void *d,