Commit Graph

17 Commits

Author SHA1 Message Date
Eric Noulard
3c2c439ef8 Fix a couple of spelling typos 2017-07-05 15:01:05 +02:00
Alexander Haase
8fe13da3a5 Added asan-wrapper.
In some special cases static linking the sanitizers won't work, and you have to
preload libasan. To find the right libasan depending on the application to be
executed, a wrapper script was added. The location of the wrapper script can be
accessed via ASan_WRAPPER variable.
2016-05-13 14:59:30 +02:00
Alexander Haase
8d8c0f7a4e Bugfixes. 2016-05-13 14:59:11 +02:00
Alexander Haase
179e77d612 Added option for static linking gcc sanitizers.
If you like to preload a sanitized library in front of an application, it will
fail, because it is not the first in the library list anymore. This behaviour
is gcc specific - clang will static link the sanitizers instead. To get the
same for gcc, the new SANITIZE_LINK_STATIC flag will link the sanitizers
static in gcc environments.

Note: The preloaded executable must be sanitized, too! Otherwise ASan will
      print an error message!
2016-05-12 19:59:28 +02:00
Alexander Haase
6d56fe50e7 Removed optimization flags.
Due optimizing the code is optional for using the sanitizers, the user should
set an optimisation level by his choice on his own.
2016-04-19 18:37:43 +02:00
Alexander Haase
f566e2b9ec Added checks to avoid bad sanitizer combinations.
Some sanitizers are not compatible with other sanitizers. Added some checks to
avoid these combinations at configuration time.
2016-04-12 21:04:21 +02:00
Alexander Haase
b492553f61 New central module FindSanitizers.cmake.
* Added a new module FindSanitizers with new function add_sanitizers to combine
  all sanitizers in one function instead of adding each one by one.
* Code of FindASan.cmake was outdourced into helper functions, so that the code
  may be used by other sanitizer modules, too.
* AddressSanitizer will be used with -O1 now to get a better performance.
2016-04-06 18:48:16 +02:00
Alexander Haase
925961bb5e Bugfix in CMake cache docs. 2016-03-08 04:42:43 +01:00
Alexander Haase
88e75c6b03 Enabled debug symbols for ASan. 2016-03-08 04:18:39 +01:00
Alexander Haase
584f137e70 Reworked FindASan.cmake.
* removed build type ASAN. Targets should define ASan usage by sanitize_address
  function
* compiler flags will be searched by compiler instead of per language
* FindASan warns, if a target can't be sanitized because of incompatible
  compilers
* added some helper functions
2016-03-08 03:52:36 +01:00
Alexander Haase
c96a15b46c Bugfix in FindASan.cmake 2016-02-15 05:13:36 +01:00
Alexander Haase
d81be39678 Bugfix in FindASan.cmake. 2016-01-28 19:17:07 +01:00
Alexander Haase
f62b5858ac Compile flags will now be set per-source file.
Thus C can be mixed with Fortran and the objects can be build with different
compilers, not both may support AddressSanitizer.
2016-01-28 17:41:24 +01:00
Alexander Haase
c29aa33f11 Check ASan support for all enabled compilers.
Instead of fix checking for C and CXX compilers, all enabled languages will be
tested now.
2016-01-28 17:31:31 +01:00
Alexander Haase
e39082050c Removed continue statement in FindASan.cmake
Older CMake versions are not capable of continue in foreach functions.
2015-11-19 16:38:53 +01:00
Alexander Haase
41e635c9ca Restructured code of FindASan.cmake 2015-11-19 14:14:13 +01:00
Alexander Haase
4fd453301a Moved CMake files and added a simple testcase 2015-07-07 00:31:35 +02:00