### Install asdf Plugins Source: https://github.com/google/clusterfuzz/blob/master/local/README.md Installs the necessary asdf plugins for Python and Google Cloud. ```bash asdf plugin add python asdf plugin add gcloud https://github.com/jthegedus/asdf-gcloud ``` -------------------------------- ### Run Local Server Source: https://github.com/google/clusterfuzz/blob/master/docs/getting-started/local_instance.md Start a local ClusterFuzz server after initial setup. Ensure no '--bootstrap' flag is used for subsequent runs. ```bash # In all the other cases, do not use "--bootstrap" flag. python butler.py run_server ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/google/clusterfuzz/blob/master/AGENTS.md Install all project dependencies using the provided bash script. Execute this from the root of the repository. ```bash ./local/install_deps.bash ``` -------------------------------- ### Install asdf Plugins and Tools Source: https://github.com/google/clusterfuzz/blob/master/AGENTS.md Install necessary asdf plugins (Python, gcloud) and project tools defined in .tool-versions. Run from the project root. ```bash asdf plugin add python asdf plugin add gcloud https://github.com/jthegedus/asdf-gcloud asdf install ``` -------------------------------- ### Run Server with Skip Install Deps Source: https://github.com/google/clusterfuzz/blob/master/docs/getting-started/local_instance.md Use this flag when running the server in a devcontainer to speed up startup as dependencies are already installed. ```bash python butler.py run_server --skip-install-deps ``` -------------------------------- ### Example zlib.json for Coverage Report Source: https://github.com/google/clusterfuzz/blob/master/docs/using-clusterfuzz/advanced-features/code_coverage.md A concrete example of a zlib.json file, illustrating the structure and typical values for reporting code coverage on OSS-Fuzz. ```json { "report_date": "20190112", "fuzzer_stats_dir": "gs://oss-fuzz-coverage/zlib/fuzzer_stats/20190112", "report_summary_path": "gs://oss-fuzz-coverage/zlib/reports/20190112/linux/summary.json", "html_report_url": "https://storage.googleapis.com/oss-fuzz-coverage/zlib/reports/20190112/linux/index.html", } ``` -------------------------------- ### Install Dependencies Script Source: https://github.com/google/clusterfuzz/blob/master/docs/getting-started/prerequisites.md Run the provided script to install all other development dependencies on Linux and macOS. This script handles various system packages. ```bash local/install_deps.bash ``` -------------------------------- ### Serve ClusterFuzz Locally Source: https://github.com/google/clusterfuzz/blob/master/docs/README.md Starts the local development server for ClusterFuzz. This command is used after installing dependencies. ```bash bundle exec jekyll serve ``` -------------------------------- ### Example Srcmap.json for libpng build Source: https://github.com/google/clusterfuzz/blob/master/docs/production-setup/build_pipeline.md An illustrative example of a .srcmap.json file for a libpng build, demonstrating how to specify version control system, repository URL, and revision identifier for multiple libraries like libpng, zlib, and libfuzzer. ```json { "/src/libpng": { "type": "git", "url": "https://github.com/glennrp/libpng.git", "rev": "eddf9023206dc40974c26f589ee2ad63a4227a1e" }, "/src/zlib": { "type": "git", "url": "https://github.com/madler/zlib.git", "rev": "cacf7f1d4e3d44d871b605da3b647f07d718623f" }, "/src/libfuzzer": { "type": "svn", "url": "https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/fuzzer", "rev": "350185" } } ``` -------------------------------- ### OSS-Fuzz Example Coverage Info Path Source: https://github.com/google/clusterfuzz/blob/master/docs/using-clusterfuzz/advanced-features/code_coverage.md An example of a GCS path for a specific project's coverage information file on OSS-Fuzz. ```bash gs://oss-fuzz-coverage/latest_report_info/zlib.json ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/google/clusterfuzz/blob/master/local/README.md Installs Python tools and project dependencies using pipenv after setting up asdf. ```bash asdf install python3.11 -m pip install pipenv ``` -------------------------------- ### Install Ruby and Bundler Source: https://github.com/google/clusterfuzz/blob/master/docs/README.md Installs necessary Ruby and Bundler packages on Debian/Ubuntu systems. Run this before installing project dependencies. ```bash sudo apt install ruby bundler bundle install --path vendor/bundle ``` -------------------------------- ### Run ClusterFuzz Production Setup Script Source: https://github.com/google/clusterfuzz/blob/master/docs/production-setup/clusterfuzz.md Execute the ClusterFuzz setup script to automate the creation of a production instance. This script requires OAuth client secrets, Firebase API key, and project ID. ```bash python butler.py create_config --oauth-client-secrets-path=$CLIENT_SECRETS_PATH \ --firebase-api-key=$FIREBASE_API_KEY --project-id=$CLOUD_PROJECT_ID $CONFIG_DIR ``` -------------------------------- ### Run Local Metadata Server Source: https://github.com/google/clusterfuzz/blob/master/local/README.md Starts a local GCE metadata server emulating credentials. Requires project ID, number, and optionally a deployment bucket. ```bash $ ./run_metadata.bash \ -project-id= \ -project-num= \ -deployment-bucket= ``` -------------------------------- ### Run CI Environment Locally Source: https://github.com/google/clusterfuzz/blob/master/local/README.md Starts the ClusterFuzz CI environment locally within a container. Requires a subsequent setup command inside the container. ```bash $ ./run_ci.bash # (inside container) $ setup ``` -------------------------------- ### Run Local Server with Bootstrap Source: https://github.com/google/clusterfuzz/blob/master/docs/getting-started/local_instance.md Start a local ClusterFuzz server for the first time or to reset all data. The server will be accessible at http://localhost:9000. ```bash # If you run the server for the first time or want to reset all data. python butler.py run_server --bootstrap ``` -------------------------------- ### Run Local Bot Instance Source: https://github.com/google/clusterfuzz/blob/master/docs/getting-started/local_instance.md Start a ClusterFuzz bot on your local instance. This command creates a copy of the source code for the bot and sets up its artifacts. ```bash python butler.py run_bot --name my-bot /path/to/my-bot # rename my-bot to anything ``` -------------------------------- ### Export Configuration Directory Path Source: https://github.com/google/clusterfuzz/blob/master/docs/production-setup/clusterfuzz.md Export the path to the configuration directory to an environment variable. This is used by the setup script. ```bash export CONFIG_DIR=/path/to/myconfig ``` -------------------------------- ### macOS Bot Setup Script Source: https://github.com/google/clusterfuzz/blob/master/docs/production-setup/setting_up_bots.md Use this bash script to set up a macOS bot for ClusterFuzz. Ensure you have a service account key and set the necessary environment variables. ```bash export CLOUD_PROJECT_ID= export CONFIG_DIR=/path/to/myconfig export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json export INSTALL_DIRECTORY=/path/where/to/install/clusterfuzz-and-dependencies/to $CONFIG_DIR/bot/setup/mac.bash ``` -------------------------------- ### Import New Command into Casp CLI Main Source: https://github.com/google/clusterfuzz/blob/master/cli/casp/README.md Example of importing and registering a new command (`my_command.cli`) in the main CLI entry point (`src/casp/main.py`). ```python # src/casp/main.py import click from casp.commands import hi from casp.commands import version from casp.commands import my_command # Add this line @click.group() def cli(): """A new, modern Command-Line Interface (CLI) for ClusterFuzz.""" cli.add_command(hi.cli) cli.add_command(version.cli) cli.add_command(my_command.cli) # Add this line ``` -------------------------------- ### Paginated List Component Setup and Teardown Source: https://github.com/google/clusterfuzz/blob/master/src/appengine/private/components/common/paginated-list/test/paginated-list.html Sets up and tears down the necessary mocks and spies for testing the paginated list component. This includes clearing storage, spying on history.pushState, stubbing window.query.get, and spying on the panel's fire method. ```javascript suite2('', ($) => { setup(() => { window.storage.clear(); sinon.spy(window.history, 'pushState'); sinon.stub(window.query, 'get'); sinon.spy($.panel, 'fire'); $.panel.keys = ['page', 'test']; }); teardown(() => { window.history.pushState.restore(); window.query.get.restore(); $.panel.fire.restore(); }); ``` -------------------------------- ### Install pipenv Source: https://github.com/google/clusterfuzz/blob/master/AGENTS.md Install pipenv using the python interpreter managed by asdf. This is required for managing project dependencies. ```bash python -m pip install pipenv ``` -------------------------------- ### Download Win32 Order Files Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/chromium_deps.txt Downloads order files for the Windows/Clang build. Uses `--directory` and `--recursive` flags. ```python [ 'python', 'src/third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--platform=win32', '--no_auth', '--bucket', 'chromium-browser-clang/orderfiles', '-d', 'src/chrome/build', ] ``` -------------------------------- ### Install DevTools Node.js Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/chromium_deps.txt Installs Node.js for the DevTools toolchain by running a Python script. This snippet is used to manage the Node.js version for development tools. ```python 'action': [ 'python', 'src/third_party/WebKit/Source/devtools/scripts/local_node/node.py', '--running-as-hook', '--version', ], ``` -------------------------------- ### Download Luci-Go Binaries for Windows Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/deps_default_1d783bc2a3629b94c963debfa3feaee27092dd92.txt Downloads Luci-Go binaries for Windows from Google Cloud Storage. This ensures the correct version of tools like isolate and swarming are available. ```python [ 'download_from_google_storage', '--no_resume', '--platform=win32', '--no_auth', '--bucket', 'chromium-luci', '-d', 'src/tools/luci-go/win64', ] ``` -------------------------------- ### Download Clang-Format Binaries for Windows Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/deps_default_2eca06e8a84ae4db820e2dcb6bd91fe8b7b71b83.txt Downloads pre-compiled Clang-Format binaries for Windows 32-bit from Google Cloud Storage. Uses a SHA1 hash for verification. ```bash { 'name': 'clang_format_win', 'pattern': '.', 'action': [ 'download_from_google_storage', '--no_resume', '--platform=win32', '--no_auth', '--bucket', 'chromium-clang-format', '-s', 'src/buildtools/win/clang-format.exe.sha1', ], }, ``` -------------------------------- ### Android SDK Extras Download Hook Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/deps_default_2eca06e8a84ae4db820e2dcb6bd91fe8b7b71b83.txt Downloads and installs Android SDK extras on build bots. Developers must manually install these packages and accept the terms of service. ```python { 'name': 'sdkextras', 'pattern': '.', 'action': ['python', 'src/build/download_sdk_extras.py'], }, ``` -------------------------------- ### Download GN Binaries for Windows Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/deps_default_2eca06e8a84ae4db820e2dcb6bd91fe8b7b71b83.txt Downloads pre-compiled GN binaries for Windows 32-bit from Google Cloud Storage. Uses a SHA1 hash for verification. ```bash { 'name': 'gn_win', 'pattern': '.', 'action': [ 'download_from_google_storage', '--no_resume', '--platform=win32', '--no_auth', '--bucket', 'chromium-gn', '-s', 'src/buildtools/win/gn.exe.sha1', ], }, ``` -------------------------------- ### Install Dependencies with Specific Python Version Source: https://github.com/google/clusterfuzz/blob/master/docs/getting-started/prerequisites.md If facing Python versioning issues, specify the Python version when running the dependency installation script. This ensures the correct Python interpreter is used. ```bash $ PYTHON=python3.11 ./local/install_deps.bash ``` -------------------------------- ### Release Build Stacktrace with Command Line Arguments Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/fuzzing/leak_blacklist_data/multi_direct_leak_expected.txt This snippet shows the command line arguments used to run a release build of Chrome with ASan enabled. It includes various flags for GPU, media, and sandbox behavior, as well as specific JS flags for garbage collection and heap verification. ```bash /mnt/scratch0/clusterfuzz/bot/builds/chromium-browser-asan_linux-release_4392242b7f59878a2775b4607420a2b37e17ff13/revisions/asan-linux-release-338631/chrome --ignore-gpu-blacklist --allow-file-access-from-files --disable-click-to-play --disable-hang-monitor --dns-prefetch-disable --disable-default-apps --disable-component-update --safebrowsing-disable-auto-update --metrics-recording-only --disable-gpu-watchdog --disable-metrics --disable-popup-blocking --disable-prompt-on-repost --enable-experimental-extension-apis --enable-extension-apps --js-flags="--expose-gc --verify-heap" --new-window --no-default-browser-check --no-first-run --no-process-singleton-dialog --enable-shadow-dom --enable-media-stream --use-gl=osmesa --use-fake-device-for-media-stream --use-fake-ui-for-media-stream --disable-gl-drawing-for-tests --ppapi-flash-path=/mnt/scratch0/clusterfuzz/bot/builds/chromium-browser-asan_linux-release_4392242b7f59878a2775b4607420a2b37e17ff13/revisions/asan-linux-release-338631/flash/libpepflashplayer.so --no-sandbox --user-data-dir=/mnt/scratch0/tmp/user_profile_0 --log-net-log=/mnt/scratch0/tmp/net_log_0 /mnt/scratch0/clusterfuzz/bot/inputs/fuzzer-common-data-bundles/LayoutTests/fast/images/fuzz-twister-embed-does-not-propagate-dimensions-to-object-ancestor1436891642.47.html ``` -------------------------------- ### Check if Job is Android Source: https://github.com/google/clusterfuzz/blob/master/src/appengine/private/components/upload-testcase/upload-form.html A simple utility function to check if a job name starts with 'android_'. ```javascript isAndroid(job) { return job && job.startsWith('android_'); } ``` -------------------------------- ### Clone ClusterFuzz Repository Source: https://github.com/google/clusterfuzz/blob/master/docs/getting-started/prerequisites.md Clone the ClusterFuzz repository to your local machine. This is the first step to get the code. ```bash git clone https://github.com/google/clusterfuzz cd clusterfuzz git pull ``` -------------------------------- ### Build and Push All Images Source: https://github.com/google/clusterfuzz/blob/master/docker/README.md Build all Docker images for a specified Ubuntu version (e.g., `ubuntu-20.04`) and push them to the container registry. This is the standard build for production use. ```bash ./build.sh ubuntu-20.04 ``` -------------------------------- ### Describe Google Cloud Project Source: https://github.com/google/clusterfuzz/blob/master/docs/production-setup/clusterfuzz.md Verify that your Google Cloud project is successfully created. Replace `` with your actual project ID. ```bash gcloud projects describe ``` -------------------------------- ### AFL ASan Job Definition Source: https://github.com/google/clusterfuzz/blob/master/docs/reference/job_definition.md Example environment string for an AFL ASan job using a release build from GCS. ```yaml RELEASE_BUILD_BUCKET_PATH = gs://clusterfuzz-builds-afl/zlib/zlib-address-([0-9]+).zip CUSTOM_BINARY = False ``` -------------------------------- ### LibFuzzer UBSan Job Definition Source: https://github.com/google/clusterfuzz/blob/master/docs/reference/job_definition.md Example environment string for a LibFuzzer UBSan job using a release build from GCS. ```yaml RELEASE_BUILD_BUCKET_PATH = gs://clusterfuzz-builds/zlib/zlib-undefined-([0-9]+).zip CUSTOM_BINARY = False ``` -------------------------------- ### Clone asdf Version Manager Source: https://github.com/google/clusterfuzz/blob/master/AGENTS.md Clone the asdf repository to manage tool versions. Ensure git and curl are installed beforehand. ```bash git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0 ``` -------------------------------- ### Download Luci-Go Binaries for Linux Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/deps_default_1d783bc2a3629b94c963debfa3feaee27092dd92.txt Downloads Luci-Go binaries for Linux from Google Cloud Storage. This ensures the correct version of tools like isolate and swarming are available. ```python [ 'download_from_google_storage', '--no_resume', '--platform=linux*', '--no_auth', '--bucket', 'chromium-luci', '-d', 'src/tools/luci-go/linux64', ] ``` -------------------------------- ### Firebase Initialization and UI Configuration Source: https://github.com/google/clusterfuzz/blob/master/src/appengine/private/templates/login.html Initializes Firebase with configuration and sets up FirebaseUI for authentication, specifying allowed sign-in providers and custom parameters. ```javascript var config = { apiKey: '{{apiKey}}', authDomain: '{{authDomain}}', }; firebase.initializeApp(config); var uiConfig = { signInOptions: [ { provider: firebase.auth.GoogleAuthProvider.PROVIDER_ID, customParameters: { // Forces account selection even when one account // is available. prompt: 'select_account', }, }, { provider: firebase.auth.GithubAuthProvider.PROVIDER_ID, scopes: [ 'user:email', ], }, ], callbacks: { signInSuccessWithAuthResult: function(authResult, redirectUrl) { authResult.user.getIdToken().then(function(idToken) { var xhr = new XMLHttpRequest(); xhr.open('POST', '/session-login'); xhr.setRequestHeader('content-type', 'application/json'); xhr.onreadystatechange = function() { if (this.readyState == XMLHttpRequest.DONE && this.status == 200) { window.location.assign(JSON.parse(atob('{{dest|json}}'))); } } xhr.send(JSON.stringify({ idToken: idToken, })); }); return false; }, }, }; var ui = new firebaseui.auth.AuthUI(firebase.auth()); ui.start('#login-container', uiConfig); ``` -------------------------------- ### Set Compiler Environment Variables Source: https://github.com/google/clusterfuzz/blob/master/docs/setting-up-fuzzing/libfuzzer_and_afl.md Set the CC and CXX environment variables to point to your Clang installation. This is a prerequisite for building with libFuzzer and AFL++. ```bash export CC=/path/to/clang export CXX=/path/to/clang++ ``` -------------------------------- ### Download from Google Storage using download_from_google_storage.py Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/chromium_deps.txt These snippets demonstrate downloading specific files, typically .sha1 checksums for binaries, from Google Cloud Storage using the download_from_google_storage.py script. Options like --no_resume and --platform are used to control the download process. ```python ['python', 'src/third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--platform=linux*', '--no_auth', '--bucket', 'chromium-gvr-static-shim', '-s', 'src/third_party/gvr-android-sdk/libgvr_shim_static_arm.a.sha1', ] ``` ```python ['python', 'src/third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--platform=linux*', '--no_auth', '--bucket', 'chromium-gvr-static-shim', '-s', 'src/third_party/gvr-android-sdk/libgvr_shim_static_arm64.a.sha1', ] ``` ```python ['python', 'src/third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--platform=linux*', '--no_auth', '--bucket', 'chromium-gvr-static-shim/controller_test_api', '-s', 'src/third_party/gvr-android-sdk/test-libraries/controller_test_api.aar.sha1', ] ``` -------------------------------- ### Authenticate Google Cloud Account Source: https://github.com/google/clusterfuzz/blob/master/docs/getting-started/prerequisites.md Log in to your Google Cloud account using the gcloud tool. This is necessary for production setups but not for local development. ```bash gcloud auth application-default login gcloud auth login ``` -------------------------------- ### Download GN Binaries for Linux x64 Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/deps_default_2eca06e8a84ae4db820e2dcb6bd91fe8b7b71b83.txt Downloads pre-compiled GN binaries for Linux 64-bit from Google Cloud Storage. Uses a SHA1 hash for verification. ```bash { 'name': 'gn_linux64', 'pattern': '.', 'action': [ 'download_from_google_storage', '--no_resume', '--platform=linux*', '--no_auth', '--bucket', 'chromium-gn', '-s', 'src/buildtools/linux64/gn.sha1', ], }, ``` -------------------------------- ### Get Kasko Binaries Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/deps_default_1d783bc2a3629b94c963debfa3feaee27092dd92.txt Uses a Python script to download Kasko binaries and associated symbol files. Allows overwriting existing files. ```python ['python', 'src/build/get_syzygy_binaries.py', '--output-dir=src/third_party/kasko', '--revision=283aeaceeb22e2ba40a1753e3cb32454b59cc017', '--resource=kasko.zip', '--resource=kasko_symbols.zip', '--overwrite', ] ``` -------------------------------- ### Get Syzygy Binaries Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/deps_default_1d783bc2a3629b94c963debfa3feaee27092dd92.txt Uses a Python script to download Syzygy binaries, which are used for optimization and instrumentation. Allows overwriting existing files. ```python ['python', 'src/build/get_syzygy_binaries.py', '--output-dir=src/third_party/syzygy/binaries', '--revision=e50a9822fc8aeb5e7902da5e2940ea135d732e57', '--overwrite', ] ``` -------------------------------- ### Download Node.js for Windows Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/chromium_deps.txt Downloads Node.js binaries for Windows. This is conditional on the host OS being Windows and uses depot_tools to fetch from Google Cloud Storage. ```python 'action': [ 'python', 'src/third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--platform=win32', '--no_auth', '--bucket', 'chromium-nodejs/6.9.4', '-s', 'src/third_party/node/win/node.exe.sha1', ], ``` -------------------------------- ### Download Luci-Go Binaries for Linux Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/deps_default_2eca06e8a84ae4db820e2dcb6bd91fe8b7b71b83.txt Downloads Luci-Go binaries for Linux from Google Cloud Storage. This ensures the correct platform-specific tools are available. ```python [ 'download_from_google_storage', '--no_resume', '--platform=linux*', '--no_auth', '--bucket', 'chromium-luci', '-d', 'src/tools/luci-go/linux64', ], ``` -------------------------------- ### Blackbox Fuzzing Job Definition (Chrome) Source: https://github.com/google/clusterfuzz/blob/master/docs/reference/job_definition.md Example environment string for blackbox fuzzing of Chrome on Linux, including custom arguments and AddressSanitizer options. ```yaml RELEASE_BUILD_BUCKET_PATH = gs://chromium-browser-asan/linux-release/asan-linux-release-([0-9]+).zip MIN_REVISION = 441045 CUSTOM_BINARY = False APP_NAME = chrome APP_ARGS = --enable-experimental-extension-apis --enable-extension-apps --js-flags="--expose-gc --verify-heap" --no-first-run --use-gl=swiftshader --disable-in-process-stack-traces REQUIRED_APP_ARGS = --no-first-run --use-gl=swiftshader --disable-in-process-stack-traces TEST_TIMEOUT = 15 ADDITIONAL_ASAN_OPTIONS = allocator_may_return_null=0 ``` -------------------------------- ### Download Win32 Luci-Go Binaries Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/chromium_deps.txt Downloads luci-go binaries (isolate, swarming) for Windows. Uses `--directory` for download destination. ```python [ 'python', 'src/third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--platform=win32', '--no_auth', '--bucket', 'chromium-luci', '-d', 'src/tools/luci-go/win64', ] ``` -------------------------------- ### LibFuzzer ASan Job Definition Source: https://github.com/google/clusterfuzz/blob/master/docs/reference/job_definition.md Example environment string for a LibFuzzer ASan job using a release build from GCS and enabling corpus pruning. ```yaml RELEASE_BUILD_BUCKET_PATH = gs://clusterfuzz-builds/zlib/zlib-address-([0-9]+).zip CUSTOM_BINARY = False CORPUS_PRUNE = True ``` -------------------------------- ### Download Linux Luci-Go Binaries Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/chromium_deps.txt Downloads luci-go binaries for Linux. Uses `--directory` to specify the target path. ```python [ 'python', 'src/third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--platform=linux*', '--no_auth', '--bucket', 'chromium-luci', '-d', 'src/tools/luci-go/linux64', ] ``` -------------------------------- ### Export OAuth Client Secrets Path Source: https://github.com/google/clusterfuzz/blob/master/docs/production-setup/clusterfuzz.md Export the file path to your downloaded OAuth client secrets JSON file. This is required for the setup script. ```bash export CLIENT_SECRETS_PATH=/path/to/your/client_secrets.json ``` -------------------------------- ### Golang Stack Trace: repro.Run Call Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/crash_analysis/stack_parsing/stack_analyzer_data/golang_panic_runtime_error_invalid_memory_address.txt This stack trace segment shows the call to the `Run` function from the `pkg/repro` package. This function is involved in executing reproduction steps and is part of the call chain leading to the panic. ```go github.com/google/syzkaller/pkg/repro.Run(0xc4279a8000, 0x3bcd09, 0x6f0000, 0xc420418000, 0xc420434420, 0xc42071dfc8, 0x1, 0x1, 0x2, 0x2, ...) /home/user/gopath/src/github.com/google/syzkaller/pkg/repro/repro.go:130 +0x518 ``` -------------------------------- ### Download Clang-Format Binaries for Linux Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/build_management/revisions_data/deps_default_2eca06e8a84ae4db820e2dcb6bd91fe8b7b71b83.txt Downloads pre-compiled Clang-Format binaries for Linux from Google Cloud Storage. Uses a SHA1 hash for verification. ```bash { 'name': 'clang_format_linux', 'pattern': '.', 'action': [ 'download_from_google_storage', '--no_resume', '--platform=linux*', '--no_auth', ``` -------------------------------- ### V8 JavaScript Assertion: __isPropertyOfType Source: https://github.com/google/clusterfuzz/blob/master/src/clusterfuzz/_internal/tests/core/crash_analysis/stack_parsing/stack_analyzer_data/v8_javascript_assertion_should_pass.txt This example shows a V8 JavaScript assertion failure for the '__isPropertyOfType' helper function, including its code and the expected boolean outcome. ```javascript function __isPropertyOfType(obj,name,type){let desc;try{desc=Object.getOwnPropertyDescriptor(obj,name);}catch(e){return false;} if(!desc) return false;return typeof type==='undefined'||typeof desc.value===type;} ```