]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
test/rbd_mirror: clear Namespace::s_instance at the end of a test 61960/head
authorIlya Dryomov <idryomov@gmail.com>
Tue, 18 Feb 2025 16:51:47 +0000 (17:51 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Sat, 22 Feb 2025 15:19:08 +0000 (16:19 +0100)
commita54c69152af0a499b5164833e9914c74c02a4377
treec69bc343187d5c1ab5608b7ed5925499cba6ef85
parentd5f77b91f4241913b4495fe116b286cf6dad30e2
test/rbd_mirror: clear Namespace::s_instance at the end of a test

TestMockPoolReplayer.Namespaces and NamespacesError tests leave behind
a dangling pointer to a stack-allocated MockNamespace which leads to an
easily reproducible use-after-free and segfault when tests are shuffled.

Fixes: https://tracker.ceph.com/issues/70041
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit c0f5359b7b47bb424d700f69a2af43ab81fa87c2)
src/test/rbd_mirror/test_mock_PoolReplayer.cc