Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cmake clang build for sanitizers #2325

Closed
wants to merge 2 commits into from
Closed

Fix cmake clang build for sanitizers #2325

wants to merge 2 commits into from

Conversation

mellery451
Copy link
Contributor

This fixes the cmake clang sanitizer build. I've tried both sanitizers on mac and linux and all of them fail for me in some way, so I'm not adding either build to jenkins until I can resolve that.

@seelabs
Copy link
Collaborator

seelabs commented Jan 9, 2018

We should keep the SConstruct in sync too. Adding a conditional to line 448 should work.

@ripplelabs-jenkins
Copy link
Collaborator

ripplelabs-jenkins commented Jan 9, 2018

Jenkins Build Summary

Built from this commit

Built at 20180109 - 17:22:34

Test Results

Build Type Result Status
clang.debug.unity 970 cases, 0 failed, t: 386s PASS ✅
coverage 970 cases, 0 failed, t: 609s PASS ✅
gcc.debug.unity 970 cases, 0 failed, t: 432s PASS ✅
clang.debug.nounity 968 cases, 0 failed, t: 754s PASS ✅
gcc.debug.nounity 968 cases, 0 failed, t: 303s PASS ✅
clang.release.unity 969 cases, 0 failed, t: 465s PASS ✅
gcc.release.unity 969 cases, 0 failed, t: 505s PASS ✅

@MarkusTeufelberger
Copy link
Collaborator

See also #2082 for ASAN/TSAN related problems

Copy link
Collaborator

@seelabs seelabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@scottschurr
Copy link
Collaborator

What's the correct way to enable one of the sanitizers? I tried

cmake -Dtarget=${BUILD_TYPE} -DSANITIZE_ADDRESS=On -Dassert=true ../../..

as suggested here: https://github.com/arsenm/sanitizers-cmake. Cmake responded:

CMake Warning:
  Manually-specified variables were not used by the project:

    SANITIZE_ADDRESS

so apparently that's not it.

I have the same question for scons as well...

@mellery451
Copy link
Contributor Author

@scottschurr ... for cmake, add this during generation -Dsan=thread or -Dsan=address. For scons, I'm guessing it's --sanitize=thread or --sanitize=address, although I haven't tried it.

Copy link
Collaborator

@scottschurr scottschurr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Successfully built using cmake for TSAN and with scons for ASAN. Ran both resulting executables against the Flow unit test.

@mellery451 mellery451 added the Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. label Jan 24, 2018
@seelabs
Copy link
Collaborator

seelabs commented Jan 30, 2018

In 0.90.0-b5

@seelabs seelabs closed this Jan 30, 2018
@mellery451 mellery451 deleted the san-cmake branch February 1, 2018 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants