On Mon, Jul 24, 2017 at 8:44 AM, Paul Pluzhnikov wrote: > On Mon, Jul 10, 2017 at 8:56 AM, Joseph Myers wrote: >> On Mon, 10 Jul 2017, Szabolcs Nagy wrote: >> >>> you could call __cxa_atexit and __cxa_at_quick_exit >> >> Well, those should properly have such tests as well. > > > Revised patch attached. Thanks. I forgot to test the case where fn_final doesn't fire at all. Revised (only last line of do_test changed). 2017-07-24 Paul Pluzhnikov * stdlib/Makefile (tst-atexit, tst-at_quick_exit): New tests (tst-cxa_atexit, tst-on_exit): Likewise * stdlib/tst-atexit-common.c: New. * stdlib/tst-atexit.c: New. * stdlib/tst-at_quick_exit.c: New. * stdlib/tst-cxa_atexit.c: New. -- Paul Pluzhnikov