Review Request 129708: C project also need Clang Sanitizer

Albert Astals Cid aacid at kde.org
Wed Dec 28 11:01:56 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129708/#review101625
-----------------------------------------------------------



I've reverted the change since it was causing compilation problems for anything that uses pthreads
https://build.kde.org/job/kcoreaddons%20master%20kf5-qt5/PLATFORM=Linux,compiler=gcc/126/console
https://build.kde.org/job/kjs%20master%20kf5-qt5/PLATFORM=Linux,compiler=gcc/151/console
https://build.kde.org/job/kstars%20master%20kf5-qt5/PLATFORM=Linux,compiler=gcc/477/console

I did a 20 minute investigation and the problem is that cmake gets confused because somehow -fsanitize defines pthread_create so it thinks it doesn't need to add pthread library, but we do. Possible solutions are maybe make cmake check a different pthread function, forcing pthread always on if using sanitize address, or something smarter i didn't think of.

This would have happened with the C++ variant but it seems cmake checks for the need for pthread using the C compiler so that's why we had evaded it for now.

- Albert Astals Cid


On Dec. 28, 2016, 1:56 a.m., Leslie Zhai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129708/
> -----------------------------------------------------------
> 
> (Updated Dec. 28, 2016, 1:56 a.m.)
> 
> 
> Review request for Extra Cmake Modules and Alex Merry.
> 
> 
> Bugs: 374195
>     http://bugs.kde.org/show_bug.cgi?id=374195
> 
> 
> Repository: extra-cmake-modules
> 
> 
> Description
> -------
> 
> So I just added
> 
> ```
> set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${XSAN_COMPILE_FLAGS}" )
> ```
> 
> for C project to use Clang Sanitizer.
> 
> 
> Diffs
> -----
> 
>   modules/ECMEnableSanitizers.cmake 9c8a4de 
> 
> Diff: https://git.reviewboard.kde.org/r/129708/diff/
> 
> 
> Testing
> -------
> 
> testcase for Clang Static Analyzer, and also for Clang Sanitizer https://github.com/LLVM-China/clang-analyzer.github.io/tree/master/tests
> 
> 
> Thanks,
> 
> Leslie Zhai
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20161228/c81082fc/attachment.html>


More information about the Kde-buildsystem mailing list