[Development] HEADS UP: do not pass const objects to QObject::disconnect(const QMetaObject::Connection&)!
Thiago Macieira
thiago.macieira at intel.com
Wed Apr 8 22:49:56 CEST 2026
On Wednesday, 8 April 2026 01:27:25 Pacific Daylight Time Volker Hilsheimer via
Development wrote:
> Our code does not seem fundamentally different from this, which works (as it
> should) fine with gcc trunk, -O3, and -fsanitize=undefined
>
> https://godbolt.org/z/P4fPG414s
Absence of UBSan complaint is not absence of UB. This may simply be a case not
implemented, because the object model inside of the compiler does not carry
enough information. And that could change at any moment, in a future compiler.
> The main argument repeated in the discussion is that this fix requires a
> recompile as well as Qt upgrade. But given that the issue evidently only
> materializes with a hypothetical future compiler, a recompile would be
> needed for that to happen anyway. So that argument seems to bite its own
> tail.
Agreed.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Principal Engineer - Intel DCG - Platform & Sys. Eng.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5150 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20260408/9ab9f371/attachment.bin>
More information about the Development
mailing list