Skip to content

Disable all compiler optimization in sanitizer builds, too. - #5409

Merged
Michael Friesen (mtfriesen) merged 1 commit into
mainfrom
mtfriesen/sanitizer_o0
Sep 4, 2025
Merged

Disable all compiler optimization in sanitizer builds, too.#5409
Michael Friesen (mtfriesen) merged 1 commit into
mainfrom
mtfriesen/sanitizer_o0

Conversation

@mtfriesen

@mtfriesen Michael Friesen (mtfriesen) commented Aug 29, 2025

Copy link
Copy Markdown
Contributor

Description

Describe the purpose of and changes within this Pull Request.

We already turned off compiler optimizations in debug builds, but we left behind -Og (roughly equal to -O1) in sanitizer builds, partly because the compiler optimizations were masking bugs. Try to get a CI to pass with -O0, which disables all optimizations, to make it easier to debug.

Testing

Do any existing tests cover this change? Are new tests needed?

CI.

Documentation

Is there any documentation impact for this change?

No.

@mtfriesen
Michael Friesen (mtfriesen) requested a review from a team as a code owner August 29, 2025 17:32
@codecov

codecov Bot commented Aug 29, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.30%. Comparing base (da06e4d) to head (411a16e).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5409      +/-   ##
==========================================
+ Coverage   86.08%   86.30%   +0.22%     
==========================================
  Files          59       59              
  Lines       18328    18328              
==========================================
+ Hits        15777    15818      +41     
+ Misses       2551     2510      -41     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ProjectsByJackHe

Copy link
Copy Markdown
Contributor

Can you add in the PR description the implications of the compiler parameters?

i.e. what does -Og do vs -O0

@mtfriesen

Copy link
Copy Markdown
Contributor Author

Can you add in the PR description the implications of the compiler parameters?

i.e. what does -Og do vs -O0

Sure, I added a link to clang docs and summarized these two.

@guhetier

Copy link
Copy Markdown
Collaborator

Test failure similar to #5355

@mtfriesen
Michael Friesen (mtfriesen) merged commit c563b6f into main Sep 4, 2025
462 of 464 checks passed
@mtfriesen
Michael Friesen (mtfriesen) deleted the mtfriesen/sanitizer_o0 branch September 4, 2025 20:31
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.

3 participants