Skip to content

Conversation

pschuh
Copy link
Contributor

@pschuh pschuh commented Jul 16, 2019

Some of the sanitizer tests were crashing due to "-fsanitize-coverage=trace-pc-guard" which comes from setting "TracePCGuard" on Opts.SanitizeCoverage. I pulled the current options from clang.

@pschuh pschuh requested a review from cheshire July 16, 2019 01:31
@cheshire
Copy link

While we are there, could we also set OptForFuzzing?

@cheshire
Copy link

Otherwise LG

@pschuh
Copy link
Contributor Author

pschuh commented Jul 16, 2019

Sorry, I don't see that here: https://llvm.org/doxygen/structllvm_1_1SanitizerCoverageOptions.html. I believe that needs to be set on each function.

@pschuh pschuh requested a review from jrose-apple July 16, 2019 16:53
@cheshire
Copy link

It's an LLVM codegen option. OK, adding it might be non-trivial, let's merge this as-is.

@cheshire
Copy link

@swift-ci please test

@cheshire
Copy link

@pschuh Why not merge this into master instead of master-next?

@pschuh
Copy link
Contributor Author

pschuh commented Jul 16, 2019

Hmm, good question. Let me rebase.

@cheshire
Copy link

I'm not sure what LLVM version master and master-next are rev-locked into. Though if tests pass on master we should be good to go.

@pschuh
Copy link
Contributor Author

pschuh commented Jul 16, 2019

I believe since it is based on master-next it'll run the master-next tests.

@pschuh pschuh changed the base branch from master-next to master July 16, 2019 23:56
@pschuh
Copy link
Contributor Author

pschuh commented Jul 16, 2019

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 9e3be82a55ad713f52d89fa717d6e00187081fa8

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 9e3be82a55ad713f52d89fa717d6e00187081fa8

@pschuh
Copy link
Contributor Author

pschuh commented Jul 16, 2019

@swift-ci please test

@pschuh
Copy link
Contributor Author

pschuh commented Jul 17, 2019

@swift-ci please test macos

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 8ac72f6b0c45ea45e62a93e2da40d8f84173ee4f

@cheshire
Copy link

The error is:

20:08:27 Undefined symbols for architecture x86_64:
20:08:27   "___sancov_lowest_stack", referenced from:
20:08:27       _LLVMFuzzerTestOneInput in fuzzer_test_simpler-a995e3.o
20:08:27       _$s4main12fuzzOneInput4Data4Sizes5Int32VSPys4Int8VG_SitF in fuzzer_test_simpler-a995e3.o
20:08:27       _$sSPys4Int8VGMa in fuzzer_test_simpler-a995e3.o
20:08:27       _$sSPys4Int8VGSPyxGs8_PointersWl in fuzzer_test_simpler-a995e3.o
20:08:27 ld: symbol(s) not found for architecture x86_64

It seems you have forgotten to guard one of the options on "is linux" condition.

@pschuh
Copy link
Contributor Author

pschuh commented Jul 17, 2019

@swift-ci please test macos

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 8ac72f6b0c45ea45e62a93e2da40d8f84173ee4f

@pschuh
Copy link
Contributor Author

pschuh commented Jul 17, 2019

@swift-ci please test linux

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 8ac72f6b0c45ea45e62a93e2da40d8f84173ee4f

@cheshire
Copy link

Also please change the commit title to "Update coverage options for fuzzing to match clang"

@pschuh pschuh changed the title Update sanitizer options to match clang. Update coverage options for fuzzing to match clang. Jul 17, 2019
@cheshire cheshire merged commit c54b30a into swiftlang:master Jul 17, 2019
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