[asan] Update asan config to work with gcc; fix a few issues#22746
Conversation
ferdymercury
left a comment
There was a problem hiding this comment.
Thanks a lot!
Could you edit https://github.com/root-project/root/blob/master/cmake/modules/RootBuildOptions.cmake#L194 to reflect that both GCC and Clang work ?
silverweed
left a comment
There was a problem hiding this comment.
Thanks! I second @ferdymercury's request to edit the message if you confirmed that clang works
Test Results 23 files 23 suites 3d 18h 19m 23s ⏱️ For more details on these failures, see this check. Results for commit c30fe7b. ♻️ This comment has been updated with latest results. |
e98fd05 to
c1897f9
Compare
|
@silverweed could I ask you to check again? |
|
Need to clean the modules for Ubuntu22 |
* [asan] Fix argv array for PyROOT applications pick these changes from #22746: - The argv array for PyROOT applications was one element too small This fixes 20 failing pyunittests on Windows. Thanks @hageboeck! * clang-format
Since the \0 character was missing in the dynamically allocated buffer, the strlen function can run past the end of the buffer. Therefore, the buffer was replaced with a TString directly constructed from char* and length.
- Add a new preprocessor define R__HAS_TMVASOFIE - Hide custom SOFIE gradients when SOFIE is off
- Convert the flags from a list into a string. - Append the string to CMAKE_CXX_FLAGS and CMAKE_C_FLAGS. - Activate use-after-scope sanitisation also in gcc. In this way, the flags are observable at configure time, they propagate into builtins and tools like clad which are initialised with ROOT's CMAKE_CXX_FLAGS. This also allowed for removing two special cases for gtest and clad.
Instead of sanitizing only a few hand-picked executables, recursively search all executables defined in the build system. Sanitize all that don't link to ROOTStaticSanitizerConfig. Since roottest is part of ROOT, several special cases could be removed.
For those externals that are not covered by the sanitizer (system libs or builtins), modern sanitiser implementations cover them through function interpositioning, so dynamic allocations are covered (while the stack is not). This seems a good compromise, because objects that are passed around between ROOT and builtins are covered.
ROOT_EXECUTABLE, ROOT's sanitiser configs were missing. Instead of keeping up-to-date a curated list of executables that break tests, there's now a CMake function to sanitise every executable declared in the ROOT build.In testing the asan builds,
foursix issues were uncovered and fixed:A use-after-free in CppInterOp (when passing argument to the interpreter by
char*) will be addressed by @aaronj0 in #22728Fix #7968