]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
libcephsqlite: ensure atexit handlers are registered after openssl 68125/head
authorPatrick Donnelly <pdonnell@ibm.com>
Tue, 7 Apr 2026 20:43:56 +0000 (16:43 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Tue, 7 Apr 2026 20:44:39 +0000 (16:44 -0400)
commit7949cd5f12eb7cc0dc85fd1b5c1d795fad1df922
treea86a4629aa76345691206b40b220dbfbb1ed1a08
parentbe4e248f1355de2b1f6e6b3673926d4783d5c8c9
libcephsqlite: ensure atexit handlers are registered after openssl

When the sqlite3 executable encounters an error with .bail=on, it will
make a call to exit(). The atexit() handlers will execute in LIFO order.
We need to ensure that openssl (before OpenSSL 4.0 [1]) atexit handlers are
registered before libcephsqlite.

[1] http://github.com/openssl/openssl/commit/31659fe32673a6bd66abf3f8a7d803e81c6ffeed (OpenSSL 4.0 no longer arms `OPENSSL_cleanup()` function as an `atexit(3)`)

Fixes: https://tracker.ceph.com/issues/59335
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
src/libcephsqlite.cc