]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
test: test_bluefs_ex.cc - use after free bug
authorBill Scales <bill_scales@uk.ibm.com>
Thu, 20 Mar 2025 11:45:46 +0000 (11:45 +0000)
committerBill Scales <bill_scales@uk.ibm.com>
Thu, 20 Mar 2025 11:45:46 +0000 (11:45 +0000)
commit9dfe5c17646bf7d505864419e48b9499e2d36e01
treea1d30da1507a9a78b780b1c0d7629526f6deab19
parentea4a8954421d8bb7ef5dbd4ce3604f87d1642166
test: test_bluefs_ex.cc - use after free bug

This test case calls exit() to terminiate a test mid flight to test
recovery from crashes at different points in the code. However it
does not stop threads before calling exit and consequently these
threads can continue to access mempool structures that have gone
out of scope and are freed by the exiting thread.

The introduction of a unique_ptr into mempool causes these threads
to assert when they access the freed memory.

The simple fix is to call _exit instead of exit in the test case
so that global destructors are not run.

Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
src/test/objectstore/test_bluefs_ex.cc