]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
libcephsqlite: register atexit handler for cleanup
authorPatrick Donnelly <pdonnell@redhat.com>
Sat, 26 Jun 2021 18:26:41 +0000 (11:26 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Sun, 27 Jun 2021 02:29:21 +0000 (19:29 -0700)
commit7985b282cac8b9177130e4a7997c68c6d158577e
treeb38353355023394261a29ad6fa272a5470beacc0
parent664c2590010eaf95d726393a60fb2a6f7ebfbf6f
libcephsqlite: register atexit handler for cleanup

We need to tear down the ceph vfs when sqlite3 (or other binaries) call
exit(). Otherwise global state gets destructed which can cause library
threads to segfault or raise exceptions.

Also pull vfs struct out of appdata. We need to be able to detect double
calls to the atexit handler which, sadly, can happen.

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