summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r--src/corelib/plugin/qlibrary.cpp14
-rw-r--r--src/corelib/plugin/qplugin.h2
2 files changed, 15 insertions, 1 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index a2c575a..0f99948 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -620,6 +620,20 @@ bool QLibraryPrivate::isPlugin(QSettings *settings)
QByteArray key;
bool success = false;
+#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
+ if (fileName.endsWith(QLatin1String(".debug"))) {
+ // refuse to load a file that ends in .debug
+ // these are the debug symbols from the libraries
+ // the problem is that they are valid shared library files
+ // and dlopen is known to crash while opening them
+
+ // pretend we didn't see the file
+ errorString = QLibrary::tr("The shared library was not found.");
+ pluginState = IsNotAPlugin;
+ return false;
+ }
+#endif
+
QFileInfo fileinfo(fileName);
#ifndef QT_NO_DATESTRING
diff --git a/src/corelib/plugin/qplugin.h b/src/corelib/plugin/qplugin.h
index b798437..7f541f1 100644
--- a/src/corelib/plugin/qplugin.h
+++ b/src/corelib/plugin/qplugin.h
@@ -110,7 +110,7 @@ void Q_CORE_EXPORT qRegisterStaticPluginInstanceFunction(QtPluginInstanceFunctio
# define QPLUGIN_DEBUG_STR "true"
# endif
# define Q_PLUGIN_VERIFICATION_DATA \
- static const char *qt_plugin_verification_data = \
+ static const char qt_plugin_verification_data[] = \
"pattern=""QT_PLUGIN_VERIFICATION_DATA""\n" \
"version="QT_VERSION_STR"\n" \
"debug="QPLUGIN_DEBUG_STR"\n" \