Skip to content

Commit

Permalink
#Centipede Report stack-limit-exceeded error only when running tests.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 706907067
  • Loading branch information
xinhaoyuan authored and copybara-github committed Dec 17, 2024
1 parent 53b7909 commit 7dab3ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions centipede/runner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ __attribute__((noinline)) void CheckStackLimit(uintptr_t sp) {
// Check for the stack limit only if sp is inside the stack region.
if (stack_limit > 0 && tls.stack_region_low &&
tls.top_frame_sp - sp > stack_limit) {
const bool test_not_running = state.input_start_time == 0;
if (test_not_running) return;
if (stack_limit_exceeded.test_and_set()) return;
fprintf(stderr,
"========= Stack limit exceeded: %" PRIuPTR
Expand Down

0 comments on commit 7dab3ed

Please sign in to comment.