KPluginLoader UBSAN warnings (object has invalid vptr)

2020-10-15 Thread Milian Wolff
Hey all,

I'm finally taking a bit of time to look after KDevelop again. I would most 
notably like to make it ASAN/UBSAN clean. One thing I'm stumbling over are the 
following reports:

```
/usr/include/KF5/KCoreAddons/kpluginfactory.h:545:24: runtime error: member 
call on address 0x603f2d40 which does not point to an object of type 
'KPluginFactory'
0x603f2d40: note: object has invalid vptr
 33 00 80 0f  e0 31 d4 c3 5d 7f 00 00  a0 41 04 00 80 60 00 00  70 2d 0f 00 30 
60 00 00  00 00 00 00
  ^~~
  invalid vptr
#0 0x7f5dede47d8c in KDevelop::IPlugin* 
KPluginFactory::create(QObject*, QList const&) /
usr/include/KF5/KCoreAddons/kpluginfactory.h:545
#1 0x7f5dede47d8c in 
KDevelop::PluginController::loadPluginInternal(QString const&) /home/milian/
projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/shell/
plugincontroller.cpp:615
```

Or this one:

```
/usr/include/qt/QtCore/qobject.h:524:12: runtime error: downcast of address 
0x6060002922e0 which does not point to an object of type 'IPlugin'
0x6060002922e0: note: object has invalid vptr
 36 00 80 24  b0 2f d4 c3 5d 7f 00 00  a0 42 04 00 80 60 00 00  b0 30 d4 c3 5d 
7f 00 00  80 fe 06 00
  ^~~
  invalid vptr
#0 0x7f5dede47f20 in KDevelop::IPlugin* 
qobject_cast(QObject*) /usr/include/qt/QtCore/qobject.h:
524
#1 0x7f5dede47f20 in KDevelop::IPlugin* 
KPluginFactory::create(QObject*, QList const&) /
usr/include/KF5/KCoreAddons/kpluginfactory.h:547
```

I have the feeling that this might be a limitation of UBSAN? Or is this an 
actual problem - does anyone know?

Most notably, the kplugin* tests in kcoreaddons are UBSAN clean for me, which 
is quite odd. I would expect them to raise similar warnings, but apparently 
they don't. Or potentially it's simply that KDevelop plugins are way more 
complex - we apparently are using multiple inheritance there for example:

```
class IPlugin : public QObject, public KXMLGUIClient
class AStylePlugin : public KDevelop::IPlugin, public 
KDevelop::ISourceFormatter
```

Maybe that's the problem? Does anyone know?

-- 
Milian Wolff
m...@milianw.de
http://milianw.de

signature.asc
Description: This is a digitally signed message part.


Re: CI Breakage in Solid on FreeBSD

2020-10-15 Thread Adriaan de Groot
On Thursday, 15 October 2020 11:22:02 CEST Ben Cooksley wrote:
> Yesterday changes were landed to Solid, allowing it to make use of new
> libimobiledevice API. Unfortunately these changes failed to handle the
> situation where an older version of libimobiledevice is in use, causing a
> build failure on FreeBSD.

We -- Ahmed, Kai Uwe, me -- are on it. It won't be an instant-fix because 
IDEVICE_DEVICE_PAIRED isn't a #define, it's an enum value, but we'll get to 
it.

[ade]

signature.asc
Description: This is a digitally signed message part.


CI Breakage in Solid on FreeBSD

2020-10-15 Thread Ben Cooksley
Hi all,

Yesterday changes were landed to Solid, allowing it to make use of new
libimobiledevice API. Unfortunately these changes failed to handle the
situation where an older version of libimobiledevice is in use, causing a
build failure on FreeBSD.

This change to Solid is therefore considered to be an unnotified dependency
bump and will need to either be urgently corrected, or the change will need
to be reverted.

This is preventing the Dependency Build jobs from being executed on
FreeBSD, which has in turn made all CI builds for the platform
unmaintainable.

More pressingly, it is now an issue because recent changes landed in
kcmutils require that the Dependency Build jobs be triggered to eliminate
CMake related source incompatible changes.

This breakage prevents this from taking place and means the Plasma FreeBSD
jobs are broken until further notice.

Regards,
Ben Cooksley
KDE Sysadmin