]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
libcephsqlite: ensure atexit handlers are registered after openssl 68263/head
authorPatrick Donnelly <pdonnell@ibm.com>
Tue, 7 Apr 2026 20:43:56 +0000 (16:43 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Fri, 5 Jun 2026 14:43:29 +0000 (10:43 -0400)
commitf003bb2357306183bf0e0d395e94099b43d2ad6c
tree438ac26b4e084e9604d3776eec0a678a5aec0723
parentb1a251c2b017583019e0fc221db18e759b7aa30e
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>
(cherry picked from commit 7949cd5f12eb7cc0dc85fd1b5c1d795fad1df922)
src/libcephsqlite.cc