qt5/qtbase: add hack to work around geq/qgis build failure on aarch64

atexit handlers in Python when running the pyuic_wrapper.sh during the
geo/qgis build segfault due to a double free in the QWaitCondition
destructor. Add a workaround to avoid this.

discussed with landry, phessler
ok rsadowski
This commit is contained in:
tb 2022-07-04 12:01:52 +00:00
parent 81c5f3e4ac
commit a1883e66a7
2 changed files with 20 additions and 1 deletions

View File

@ -7,7 +7,7 @@ COMMENT-mysql = MySQL plugin for Qt5
COMMENT-psql = PostgresSQL plugin for Qt5
COMMENT-tds = TDS plugin for Qt5
REVISION-main = 9
REVISION-main = 10
REVISION-examples = 0
PKGNAME-mysql = qt5-mysql-${VERSION}

View File

@ -0,0 +1,19 @@
Fix the build of geo/qgis. py3-qt5's atexit handlers in Python cause a
double free on aarch64 during the build, so use a hack as a workaround.
Index: src/corelib/thread/qwaitcondition_unix.cpp
--- src/corelib/thread/qwaitcondition_unix.cpp.orig
+++ src/corelib/thread/qwaitcondition_unix.cpp
@@ -181,9 +181,12 @@ QWaitCondition::QWaitCondition()
QWaitCondition::~QWaitCondition()
{
+ if (d == nullptr)
+ return;
report_error(pthread_cond_destroy(&d->cond), "QWaitCondition", "cv destroy");
report_error(pthread_mutex_destroy(&d->mutex), "QWaitCondition", "mutex destroy");
delete d;
+ d = nullptr;
}
void QWaitCondition::wakeOne()