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

ci: support workflow with sanitizers #47

Conversation

antonbaliasnikov
Copy link
Contributor

@antonbaliasnikov antonbaliasnikov commented Jun 12, 2024

What ❔

Add manual workflow to run compiler-tester with sanitizers enabled.

The workflow is working as follows:

  1. Build LLVM with sanitizer specified with llvm-sanitizer parameter
  2. Build FE compilers with sanitizer specified with rust-sanitizer parameter
  3. Build compiler-tester itself with sanitizer specified with rust-sanitizer parameter

More info about Rust sanitizers is available here.
Possible values are: address, cfi, hwaddress, kcfi, leak, memory, or thread

Only memory and thread were tested and supported for now, although CI allows us to try other variations.

For more information about the supported sanitizers in LLVM, see this page.

Possible values for LLVM sanitizer are Address, Memory, MemoryWithOrigins, Undefined, Thread, DataFlow, and Address;Undefined.

Only Address and Thread were tested and supported for now, although CI allows us to try other variations.

Why ❔

Fixes CPR-1052

Testing

Thread and Address sanitizers tested:

  • Address sanitizer workflow fails with memory leak reported here.

  • Thread sanitizer workflow. (Timeout disabled tests execution after ~10 hours, no issues found. I disabled the timeout.)

    • With the Thread Sanitizer tests are running approx. at 100k tests per 2 hours rate.
    • It is suggested to reduce the number of tests or modes using input parameters to get some acceptable execution time.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via cargo fmt and checked with cargo clippy.

@antonbaliasnikov antonbaliasnikov force-pushed the abalias-cpr-1052-run-compiler-tester-with-address-sanitizer branch 3 times, most recently from bae9a97 to f9233c2 Compare June 12, 2024 12:57
@antonbaliasnikov antonbaliasnikov changed the title [WIP] [DO NOT MERGE] cpr 1052 run compiler tester with address sanitizer ci: support workflow with sanitizers Jun 12, 2024
@antonbaliasnikov antonbaliasnikov force-pushed the abalias-cpr-1052-run-compiler-tester-with-address-sanitizer branch 3 times, most recently from f822fa5 to 7641599 Compare June 17, 2024 11:30
.github/workflows/sanitizers.yml Outdated Show resolved Hide resolved
@antonbaliasnikov antonbaliasnikov force-pushed the abalias-cpr-1052-run-compiler-tester-with-address-sanitizer branch from 7641599 to bf66180 Compare June 18, 2024 15:38
@antonbaliasnikov antonbaliasnikov force-pushed the abalias-cpr-1052-run-compiler-tester-with-address-sanitizer branch from bf66180 to e3c20a8 Compare June 18, 2024 15:38
@antonbaliasnikov antonbaliasnikov marked this pull request as ready for review June 18, 2024 16:06
@antonbaliasnikov antonbaliasnikov merged commit d67a6fb into main Jun 19, 2024
@antonbaliasnikov antonbaliasnikov deleted the abalias-cpr-1052-run-compiler-tester-with-address-sanitizer branch June 19, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants