From 752626d607ccf3554dcbbd84cef321f91c02a7c3 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 9 Jul 2024 08:13:33 -0700 Subject: [PATCH] SegFault 20.04 C++11 MinSizeRel all tests, but only first pass after git clean -fdx NO SegFault 20.04 C++11 Debug all tests, even in first pass after git clean -fdx BUT then suddenly SegFaults not reproducible anymore even with MinSizeRel!? Current thread 0x00007f6c7165e740 (most recent call first): File "/mounted_pybind11/tests/test_class_sh_shared_ptr_copy_move.py", line 9 in test_shptr_copy line 9: lst = m.test_ShPtr_copy() This line was added after last observed SegFault del mth --- tests/test_class_sh_shared_ptr_copy_move.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_class_sh_shared_ptr_copy_move.py b/tests/test_class_sh_shared_ptr_copy_move.py index 6833717ce..ac4b9aff2 100644 --- a/tests/test_class_sh_shared_ptr_copy_move.py +++ b/tests/test_class_sh_shared_ptr_copy_move.py @@ -6,8 +6,13 @@ from pybind11_tests import class_sh_shared_ptr_copy_move as m def test_shptr_copy(): - pytest.skip("BAKEIN_BREAK: Segmentation fault") - txt = m.test_ShPtr_copy()[0].get_history() + lst = m.test_ShPtr_copy() + itm = lst[0] + del lst + mth = itm.get_history + del itm + txt = mth() + del mth assert txt == "FooShPtr_copy"