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

initial support for integrated fuzzing #20725

Merged
merged 13 commits into from
Jul 23, 2024
Merged

initial support for integrated fuzzing #20725

merged 13 commits into from
Jul 23, 2024

Commits on Jul 22, 2024

  1. initial support for integrated fuzzing

    * Add the `-ffuzz` and `-fno-fuzz` CLI arguments.
    * Detect fuzz testing flags from zig cc.
    * Set the correct clang flags when fuzz testing is requested. It can be
      combined with TSAN and UBSAN.
    * Compilation: build fuzzer library when needed which is currently an
      empty zig file.
    * Add optforfuzzing to every function in the llvm backend for modules
      that have requested fuzzing.
    * In ZigLLVMTargetMachineEmitToFile, add the optimization passes for
      sanitizer coverage.
    * std.mem.eql uses a naive implementation optimized for fuzzing when
      builtin.fuzz is true.
    
    Tracked by #20702
    andrewrk committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    54b7e14 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1741b82 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7802cf9 View commit details
    Browse the repository at this point in the history
  4. add libfuzzer to linking

    andrewrk committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    b9225ae View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7930efc View commit details
    Browse the repository at this point in the history
  6. add new builtin: @disableInstrumentation

    This is needed to ensure that start code does not try to access thread
    local storage before it has set up thread local storage.
    andrewrk committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    2519881 View commit details
    Browse the repository at this point in the history
  7. update start code to use @disableInstrumentation

    This prevents it from trying to access thread local storage before it
    has set up thread local storage, particularly when code coverage
    instrumentation is enabled.
    andrewrk committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    bde8c4a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    105b91d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    dbbe2f1 View commit details
    Browse the repository at this point in the history
  10. update zig1.wasm

    andrewrk committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    af7b671 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    ae09f9b View commit details
    Browse the repository at this point in the history
  12. Compilation: fix regression in addCCArgs

    `-fno-sanitize=function` must come after `-fsanitize=undefined` or it
    has no effect.
    andrewrk committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    1cb9948 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    61ad1be View commit details
    Browse the repository at this point in the history