-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[BUG] With NDEBUG, early-returning without SkipWithError leads to indefinite retries #1754
Comments
(root cause of non-public https://issuetracker.google.com/issues/302845046) |
if run in DEBUG i assume the CHECK fires, so you know this is invalid behaviour from the POV of the library, right? |
Yes, well understood. However, Android's benchmarks all run with NDEBUG in CI, and not having any indication that something is wrong with the benchmark makes it rather hard to diagnose the issue. I expected a benchmarking library to report an error when the benchmark violates this invariant, even with NDEBUG. |
originally, we were very careful to minimise overhead of BM_CHECK in NDEBUG in case it was used in the critical path; we don't want to be timing our CHECKs. i agree that perhaps this one can be bumped up to something that also checks in NDEBUG, but we don't currently have that outside of i'd be comfortable with a |
I agree with @dmah42. Though perhaps |
Describe the bug
With NDEBUG, early-returning without SkipWithError leads to indefinite retries
System
Which OS, compiler, and compiler version are you using:
6.5.13-1rodete2-amd64 (building for Android cuttlefish)
Android (11368308, +pgo, +bolt, +lto, +mlgo, based on r510928) clang version 18.0.0 (https://android.googlesource.com/toolchain/llvm-project 477610d4d0d988e69dbc3fae4fe86bff3f07f2b5)
To reproduce
Steps to reproduce the behavior:
Note how the benchmark functions early return before reaching the measure loop. Also note that Android compiles with NDEBUG set.
Minimal repro case (compile with
-DNDEBUG=1
)Expected behavior
Prints an error & skips / aborts, instead of retrying indefinitely.
Root cause
benchmark/src/benchmark_runner.cc
Line 133 in b04cec1
Verbose logs:
The text was updated successfully, but these errors were encountered: