Fwd: [Development] Are we free of code that checks this isn't null?

Kevin Funk kfunk at kde.org
Mon Mar 21 14:23:46 UTC 2016


On Friday, March 4, 2016 10:51:08 AM CET Kevin Funk wrote:
> Are *we* free of it?
> 
> Simply using this under Clang should tell us about all occurrences:
>   -Werror=undefined-bool-conversion
> 
> /me checks

Unfortunately I was wrong. Just raising the compiler warning level under Clang 
is not sufficient, not all issues are detectable at compile-time.

We have a few issues as this bug report indicates:
  https://bugs.kde.org/show_bug.cgi?id=360707

Anyone with a GCC6 toolchain set up: It would be great if you could compile/
run KDevelop with -fsanitize=undefined [1] and fix all the issues that pop 
up...

Cheers,
Kevin

[1] https://gcc.gnu.org/gcc-6/changes.html

> Cheers,
> Kevin
> 
> ----------  Forwarded Message  ----------
> 
> Subject: [Development] Are we free of code that checks this isn't null?
> Date: Thursday, March 03, 2016, 10:52:15 PM
> From: Thiago Macieira <thiago.macieira at intel.com>
> To: development at qt-project.org
> 
> Found in GCC 6's changelog (http://gcc.gnu.org/gcc-6/changes.html):
> > Value range propagation now assumes that the this pointer of C++ member
> > functions is non-null. This eliminates common null pointer checks but also
> > breaks some non-conforming code-bases (such as Qt-5, Chromium, KDevelop).
> > As a temporary work-around -fno-delete-null-pointer-checks can be used.
> > Wrong code can be identified by using -fsanitize=undefined.
> 
> Are we free of such mistakes? Or do we need to enable -fno-delete-null-
> pointer-checks?


-- 
Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160321/94d9b83b/attachment.sig>


More information about the KDevelop-devel mailing list