You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was vaguely hoping that this would work out in zig:
jamie@machine:~/imp$ zig build-exe --main-pkg-path ./ -mllvm -fsanitize=fuzzer test/fuzz.zig
zig (LLVM option parsing): Unknown command line argument '-fsanitize=fuzzer'. Try: 'zig (LLVM option parsing) --help'
zig (LLVM option parsing): Did you mean '--filetype=fuzzer'?
Am I just mangling the option syntax or is this something that would need specific support? I don't really understand at what level libfuzzer is plumbed into the clang pipeline.
The text was updated successfully, but these errors were encountered:
This requires support on Zig's end. You can link against the ASan runtime libraries and expose an extern "C"-style LLVMFuzzerTestOneInput BUT there will be no instrumentation of the LLVM bitcode. The asan pass needs to be enabled to emit all the appropriate __sanitizer_* symbols which allow libFuzzer to understand code coverage of the fuzzed test cases.
I am interested in this, and have started work on it. First, we need to get all the sanitizers into Zig, then I will begin implementing fuzzer instrumentation and coverage. Afterwards, we can make fuzzing a first-class citizen by adding, e.g. a fuzzing-specific entrypoint, like in libFuzzer. This means that users will be able to:
Make stand-alone fuzzed programs
Write fuzzing test cases for their Zig programs in an idiomatic way
To use libfuzzer in C is as simple as:
I was vaguely hoping that this would work out in zig:
Am I just mangling the option syntax or is this something that would need specific support? I don't really understand at what level libfuzzer is plumbed into the clang pipeline.
The text was updated successfully, but these errors were encountered: