Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.15.7, 6.4.2
-
None
-
distro: ArchLinux
hardware: amd64
Qt5 Version: 5.15.8+kde+r181-1
Qt6 Version: 6.4.2-1
Description
On ArchLinux, Qt is configured with the relocatable feature.
In QlibraryInfo.cpp, if the cdUp function call fails and prefixPath is not root, the program will not be able to exit the loop.
#if defined(Q_OS_LINUX) && !defined(QT_STATIC) && defined(__GLIBC__) const QString libdir = QString::fromLocal8Bit( qt_configure_strs.viewAt(QLibraryInfo::LibrariesPath - 1)); QDir prefixDir(prefixPath); while (!prefixDir.exists(libdir)) { prefixDir.cdUp(); // failed, prefixDir will not be changed prefixPath = prefixDir.absolutePath(); if (prefixDir.isRoot()) { // dead loop prefixPath.clear(); break; } } #endif
My suggestion for this case is to determine if the cdUp call was successful:
while (!prefixDir.exists(libdir)) { if(prefixDir.cdUp()){ // Avoiding a dead loop prefixPath.clear(); break; } prefixPath = prefixDir.absolutePath(); if (prefixDir.isRoot()) { prefixPath.clear(); break; } }