diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-07-08 19:34:36 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-07-08 19:34:36 -0600 |
commit | 8ab5b63e6954929d49a61173dee8d2dcbf6d73bf (patch) | |
tree | 5537200e3709cb5c15ccf19fd25fb57826f5b4d0 /libcr | |
parent | 72b9036dc961d9fe7e0e9deb12e87f121a4d0ccf (diff) | |
parent | f6e6d7ccdc63a48988b1ada14718be2a033902b7 (diff) |
Diffstat (limited to 'libcr')
-rw-r--r-- | libcr/coroutine.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libcr/coroutine.c b/libcr/coroutine.c index d776e90..a81ffbd 100644 --- a/libcr/coroutine.c +++ b/libcr/coroutine.c @@ -865,12 +865,15 @@ void cr_cid_info(cid_t cid, struct cr_cid_info *ret) { #if CONFIG_COROUTINE_VALGRIND VALGRIND_DISABLE_ERROR_REPORTING; #endif - uint8_t v = stack[i]; + if (stack[i] != stack_pattern[i%sizeof(stack_pattern)]) { #if CONFIG_COROUTINE_VALGRIND - VALGRIND_ENABLE_ERROR_REPORTING; + VALGRIND_ENABLE_ERROR_REPORTING; #endif - if (v != stack_pattern[i%sizeof(stack_pattern)]) break; + } +#if CONFIG_COROUTINE_VALGRIND + VALGRIND_ENABLE_ERROR_REPORTING; +#endif ret->stack_max--; } |