feat(gotter)!: add DT_HASH fallback, relocation type guard, and hook_symbol #15658
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Fuzz test | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - mq-working-branch-* | |
| schedule: | |
| - cron: '0 6 * * *' | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| fuzz-dirs: ${{ steps.set-dirs.outputs.fuzz-dirs }} | |
| fuzz-dirs-count: ${{ steps.set-dirs.outputs.fuzz-dirs-count }} | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get crates report | |
| id: changed-crates | |
| uses: ./.github/actions/crates-reporter | |
| - name: Set fuzz directories | |
| id: set-dirs | |
| env: | |
| CHANGED_CRATES_STATUS: ${{ steps.changed-crates.outputs.status }} | |
| AFFECTED_CRATES: ${{ steps.changed-crates.outputs.affected_crates }} | |
| run: | | |
| ALL_FUZZ='["libdd-alloc", "libdd-profiling", "libdd-common-ffi", "libdd-trace-utils"]' | |
| if [[ "$CHANGED_CRATES_STATUS" == "success" ]]; then | |
| FILTERED=$(echo "$AFFECTED_CRATES" | jq -c --argjson affected "$ALL_FUZZ" '[.[] | select(IN($affected[]))]') | |
| COUNT=$(echo "$FILTERED" | jq 'length') | |
| else | |
| FILTERED="$ALL_FUZZ" | |
| COUNT=$(echo "$ALL_FUZZ" | jq 'length') | |
| fi | |
| echo "fuzz-dirs=$FILTERED" >> $GITHUB_OUTPUT | |
| echo "fuzz-dirs-count=$COUNT" >> $GITHUB_OUTPUT | |
| run-fuzz: | |
| needs: setup | |
| if: needs.setup.outputs.fuzz-dirs-count != '0' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| directory: ${{ fromJson(needs.setup.outputs.fuzz-dirs) }} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 | |
| - name: Read nightly version from nightly-toolchain.toml | |
| id: nightly-version | |
| run: echo "version=$(grep -Po '^channel = "\K[^"]+' nightly-toolchain.toml)" >> $GITHUB_OUTPUT | |
| - name: Set up Rust | |
| run: | | |
| set -e | |
| rustup set profile minimal | |
| rustup toolchain install ${{ steps.nightly-version.outputs.version }} | |
| - uses: taiki-e/install-action@2c41309d51ede152b6f2ee6bf3b71e6dc9a8b7df # 2.49.27 | |
| with: | |
| tool: cargo-bolero | |
| - name: Cache [rust] | |
| uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # 2.8.1 | |
| with: | |
| cache-targets: true # cache build artifacts | |
| cache-bin: true # cache the ~/.cargo/bin directory | |
| - env: | |
| # Override rust-toolchain.toml so cargo-bolero runs on the dated nightly. | |
| RUSTUP_TOOLCHAIN: ${{ steps.nightly-version.outputs.version }} | |
| run: | | |
| set -e | |
| # cargo bolero list outputs {"package":"package-name","test":"test-name"} | |
| pushd ${{ matrix.directory }} | |
| cargo bolero list | \ | |
| # And the following command will parse package-name's and test-name's one in each line | |
| grep -oP '"(package|test)"\s*:\s*"\K[^"]+' | \ | |
| # awk will stitch package and test names back separated by a tab | |
| awk 'NR%2{printf "%s\t", $0; next}1' | \ | |
| while read -r package test; | |
| do | |
| echo "****** Starting bolero test for $package $test ******" 1>&2 | |
| cargo bolero test -T 30s --package $package $test | |
| done | |
| popd |