From ffad0940517730bce8f77e1ddb57d797ffa6e4a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Wed, 10 Jan 2024 21:27:35 +0100 Subject: [PATCH] [App] Fix segfault due to missing Py_Initialize in StringIDRefTest The PyObject desctructor requires an initialized interpreter, otherwise PyGILState_Ensure crashes. Fixes #11878 --- tests/src/App/StringHasher.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/src/App/StringHasher.cpp b/tests/src/App/StringHasher.cpp index 6f60dc5a41..c13b0b6620 100644 --- a/tests/src/App/StringHasher.cpp +++ b/tests/src/App/StringHasher.cpp @@ -1006,6 +1006,7 @@ TEST_F(StringIDRefTest, toBytes) // NOLINT TEST_F(StringIDRefTest, getPyObject) // NOLINT { + Py_Initialize(); // Arrange auto ref = App::StringIDRef(createStringID()); auto empty = App::StringIDRef();