From 54a32bdacf17144302dea9ac313fdf0c367d7625 Mon Sep 17 00:00:00 2001 From: Jacek Poplawski Date: Fri, 2 Feb 2024 12:43:56 +0100 Subject: [PATCH] Disable unloading libraries on VxWorks Unloading plugins after each test case in QtDeclarative autotests leads to crashes (signal 11) during type registration in subsequent test cases. The issue arises due to the unloading process, where unloading and then re-registering types in the next test case leads to sig11. Disabling the unloading of libraries prevents the crashes. Task-number: QTBUG-115777 Change-Id: I6712f687134fd452fb0b962363a8f0fde85344ff Reviewed-by: Thiago Macieira (cherry picked from commit ef5ab6e00664caf0af23b21593f809d718c9dfc7) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/plugin/qlibrary_unix.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp index 84f572a003c..1e088bcf6b7 100644 --- a/src/corelib/plugin/qlibrary_unix.cpp +++ b/src/corelib/plugin/qlibrary_unix.cpp @@ -262,6 +262,7 @@ bool QLibraryPrivate::load_sys() bool QLibraryPrivate::unload_sys() { +#if !defined(Q_OS_VXWORKS) // Unloading on VxWorks causes crashes in QtDeclarative autotests if (dlclose(pHnd.loadAcquire())) { #if defined (Q_OS_QNX) // Workaround until fixed in QNX; fixes crash in char *error = dlerror(); // QtDeclarative auto test "qqmlenginecleanup" for instance @@ -275,6 +276,7 @@ bool QLibraryPrivate::unload_sys() return false; } errorString.clear(); +#endif return true; }