Status Swift 5/Xcode Fuzzing support?


(Thomas Van Lenten) #1

Should the -sanitize=fuzzer work with Xcode 10.2 Beta 2?

$ swift build -c release -Xswiftc -sanitize=fuzzer -Xswiftc -parse-as-library
<unknown>:0: error: unsupported option '-sanitize=fuzzer' for target 'x86_64-apple-macosx10.10'
$ xcodebuild -version
Xcode 10.2
Build version 10P91b
$ swiftc --version
Apple Swift version 5.0 (swiftlang-1001.0.60.3 clang-1001.0.37.8)
Target: x86_64-apple-darwin18.2.0
ABI version: 0.7

(Devin Coughlin) #2

No, -sanitize=fuzzer is not supported and is only available in toolchains from swift.org


(Thomas Van Lenten) #3

Is there a reason for that?

As a library maintainer, it would be nice to be able to rely on it being part of the Xcode distros since that's what most developers on Apple platforms will have.


(Thomas Van Lenten) #4

We opened rdar://47920434 also to try and get it included.


(Rich Fox) #5

which specific toolchain? Tried several dev snapshots & swifting toolchain in Xcode, but all are showing unknown argument as Thomas said.


(Thomas Van Lenten) #6

@tkremenek any chance we can get some clarity on why there are differences in the two Swift distributions (Xcode vs. swift.org) and what the reasoning is for those differences?

The subtly of two things called a given Swift version number is going to continue to confuse things; and I must admit I'm sorta struggling to see any benefits from developers consuming Swift, so the difference seem like they must be some advantages internally to Apple only?


(Rich Fox) #7

btw @thomasvl were you been able to get this working even using dev distributions on swift.org?

I have tried several versions but I always get this same issue:

<unknown>:0: error: unsupported option '-sanitize=fuzzer' for target 'x86_64-apple-macosx10.10'

It seems like some people have gotten this working using dev snapshots, that would be alright for my current usecase... but can't seem to figure out what dev snapshots works, have tried a lot both latest and older -_-... wonder if this is still working for some people?


(Thomas Van Lenten) #8

@Nadohs, sorry, since it isn't in the stock Xcode distros, I sorta punted as I knew it wouldn't get run for my project often and would thus likely rot.

With the whole Swift Server push, I'd really like to see someone from Apple explain why they see value in having different distros. Making sure Xcode installs have all the same support as the linux ones seem like a required step in helping make the server support easy to also work on.