Skip to content

Conversation

@cheshire
Copy link

With this patch different sanitizers (tsan/asan) will be enabled or
disabled on the driver level on a particular OS depending on whether
the required library is present.

The current patch only supports Darwin architectures, but Linux support
should not be hard to add.

@cheshire cheshire requested a review from AnnaZaks June 14, 2017 00:42
@cheshire
Copy link
Author

@swift-ci Please smoke test

@cheshire
Copy link
Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - f1486f1557ab9139f0d051c54a729c5fe2f2b2cf
Test requested by - @cheshire

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - f1486f1557ab9139f0d051c54a729c5fe2f2b2cf
Test requested by - @cheshire

@cheshire
Copy link
Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - f1486f1557ab9139f0d051c54a729c5fe2f2b2cf
Test requested by - @cheshire

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - f1486f1557ab9139f0d051c54a729c5fe2f2b2cf
Test requested by - @cheshire

Copy link
Contributor

@jrose-apple jrose-apple left a comment

Choose a reason for hiding this comment

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

Nice improvement for those who might not have compiler-rt checked out. A lot of small comments and some testing concerns.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: funny indentation here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: Please use llvm::function_ref for callbacks that are not persisted.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: No need for const.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please drop this comment. You can say something like "Assume no sanitizers are supported on a particular platform by default" if you want.

Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: "existence". Also, should this be a default argument to parseSanitizerArgValues then?

Copy link
Author

Choose a reason for hiding this comment

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

I believe so, it's the confusing two-stage check. If the library wasn't there, we would have errorred out by now.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: funny indentation here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: This isn't your fault, but if you can't align parameters then the preference is to double-indent them and leave it, not right-align the longest parameter and then match the others.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please put input files in an Inputs/ folder rather than giving them a dummy RUN line.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why split this file up, though?

Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't drop these tests. We still need to make sure we get these right for all the other Apple platforms.

@cheshire
Copy link
Author

@swift-ci please test

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this comment no longer relevant?

Copy link
Contributor

Choose a reason for hiding this comment

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

No need for this here since nothing's actually getting run and everything has an explicit target.

Copy link
Contributor

Choose a reason for hiding this comment

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

Missed a function_ref.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: no const and no need to capture anything.

Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: "an"

Copy link
Contributor

Choose a reason for hiding this comment

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

StringRef, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: headers are out of order. (They should be alphabetical within the project.)

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 4592131c39e57230a42026e7d605b8a2d1620938
Test requested by - @cheshire

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 4592131c39e57230a42026e7d605b8a2d1620938
Test requested by - @cheshire

@cheshire
Copy link
Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 4e2914ec8cf6e23902c156cead6c3c2e344fcf47
Test requested by - @cheshire

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 4e2914ec8cf6e23902c156cead6c3c2e344fcf47
Test requested by - @cheshire

Copy link
Contributor

@jrose-apple jrose-apple left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for sticking with all my comments!

@cheshire cheshire changed the title Change driver logic for sanitizers support. [NFC] Change driver logic for sanitizers support. Jun 16, 2017
@cheshire cheshire changed the title [NFC] Change driver logic for sanitizers support. Change driver logic for sanitizers support. Jun 16, 2017
@cheshire
Copy link
Author

@swift-ci please smoke test

George Karpenkov added 7 commits June 16, 2017 13:26
With this patch different sanitizers (tsan/asan) will be enabled or
disabled on the driver level on a particular OS depending on whether
the required library is present.

The current patch only supports Darwin architectures, but Linux support
should not be hard to add.
in order not to make them depend on the platform they are running on.
@cheshire
Copy link
Author

@swift-ci please smoke test

@cheshire cheshire force-pushed the sanitizer_driver_detection branch from 69e4f0e to 5956aa9 Compare June 16, 2017 20:42
@cheshire
Copy link
Author

@swift-ci please smoke test linux

@cheshire cheshire merged commit cf9b272 into swiftlang:master Jun 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants