「view this page in B3 βῆτα server」

Revisions №58942

branch: master 「№58942」
Commited by: Rocco Moretti
GitHub commit link: 「16b000136d88f1a9」 「№1633」
Difference from previous tested commit:  code diff
Commit date: 2016-09-20 12:04:54

Merge pull request #1633 from RosettaCommons/roccomoretti/sanitize Add compiler "sanitizer" error-checking builds to Rosetta Recent versions of Clang and GCC have "sanitizer" options which will compile with extra instrumentation to catch various dodgy dealings. I've added Scons modes (not extras) for three of the santizers. * mode=addsan The AddresSanitizer which detects memory errors, such as trying to access memory you're not supposed to. This includes the LeakSanitizer, which catches memory leaks. * mode=ubsan The UndefinedBehaviorSanitizer catches instances where you're doing certain things in the code which are "undefined behavior" according to the C++11 standard. * mode=memsan The MemorySanitizer attempts to detect uninitialized reads. (Like Valgrind.) -- This is not (yet?) supported under GCC, and is only of minimal use with Clang, as you also need to have a special compilation of the C++ standard library. I include it for the intrepid. Testing for addsan/memsan/ubsan errors is easy - simply run unit or integration tests with the build for the appropriate "mode" (using a recent compiler which supports them). If an error is encountered, a message will be printed to stdout, and the test will "crash" in a way that's recognizable to the testing system. (The leak detection of addsan, which prints but does not cause an error-code exit.) Debugging of ubsan errors is easier if you first set the UBSAN_OPTIONS=print_stacktrace=1 environment variable prior to running the tests. This pull request also contains some "low hanging fruit" fixes for errors in addsan and ubsan builds. continuous_sewing_hasher and discontinuous_sewing_hasher integration test changes expected, as they were over-writing log files

...