Index: atexit.c =================================================================== RCS file: /cvsroot/src/lib/libc/stdlib/atexit.c,v retrieving revision 1.29 diff -u -r1.29 atexit.c --- atexit.c 19 Apr 2015 18:15:26 -0000 1.29 +++ atexit.c 2 Nov 2017 17:55:41 -0000 @@ -205,7 +205,7 @@ if (dso == NULL || dso == ah->ah_dso || ah->ah_atexit == NULL) { if (ah->ah_atexit != NULL) { void *p = atexit_handler_stack; - if (ah->ah_dso != NULL) { + if (ah->ah_dso != NULL || ah->ah_arg != NULL) { cxa_func = ah->ah_cxa_atexit; ah->ah_cxa_atexit = NULL; (*cxa_func)(ah->ah_arg);