-
Notifications
You must be signed in to change notification settings - Fork 23
Add sanitizer support via score_cpp_policies #200
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
base: main
Are you sure you want to change the base?
Changes from all commits
a06a471
2feb0b8
b3d06a8
38739cc
253a46c
fafa305
9f26999
d25d533
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
| name: Sanitizers | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, synchronize] | ||
| merge_group: | ||
| types: [checks_requested] | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| sanitizers: | ||
| runs-on: ubuntu-24.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| config: [asan_ubsan_lsan, tsan] | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4.2.2 | ||
|
|
||
| - name: Setup Bazel | ||
| uses: bazel-contrib/setup-bazel@0.18.0 | ||
| with: | ||
| bazelisk-cache: true | ||
| disk-cache: ${{ github.workflow }}-${{ matrix.config }} | ||
| repository-cache: true | ||
| cache-save: ${{ github.event_name == 'push' }} | ||
|
|
||
| - name: Configure kernel for TSan (ASLR breaks TSan shadow memory layout) | ||
| if: matrix.config == 'tsan' | ||
| run: sudo sysctl -w kernel.randomize_va_space=0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the problem that shows up with ASLR? There is also this ticket llvm/llvm-project#164989 which suggests
I am asking because I wonder if there is a security concern with disabling ASLR here. |
||
|
|
||
| - name: Run tests with sanitizers | ||
| run: | | ||
| bazel test --lockfile_mode=error --config=${{ matrix.config }} --config=x86_64-linux //score/... //tests/... --verbose_failures | ||
|
|
||
| - name: Upload test logs on failure | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: bazel-testlogs-${{ matrix.config }}-${{ github.run_id }} | ||
| path: bazel-testlogs/ | ||
| retention-days: 7 | ||
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.