diff options
author | 2017-04-13 07:59:08 -0700 | |
---|---|---|
committer | 2017-04-13 07:59:08 -0700 | |
commit | 0362d6b374e4b10e324e09e750b88d6c6bc834d1 (patch) | |
tree | 20ece7f50bebc5b3d8ad43f06f7a161fca063b1f /test/core/support/spinlock_test.c | |
parent | 4d0ee2a56b71b3eae4865c6440362daebba0b5f7 (diff) |
ubsan fixes
Diffstat (limited to 'test/core/support/spinlock_test.c')
-rw-r--r-- | test/core/support/spinlock_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/core/support/spinlock_test.c b/test/core/support/spinlock_test.c index c70e76c7ea..96055e9bd7 100644 --- a/test/core/support/spinlock_test.c +++ b/test/core/support/spinlock_test.c @@ -109,7 +109,7 @@ static void test(const char *name, void (*body)(void *m), int timeout_s, start, gpr_time_from_micros((int64_t)timeout_s * 1000000, GPR_TIMESPAN)); fprintf(stderr, "%s:", name); while (gpr_time_cmp(gpr_now(GPR_CLOCK_REALTIME), deadline) < 0) { - iterations <<= 1; + if (iterations < INT64_MAX / 2) iterations <<= 1; fprintf(stderr, " %ld", (long)iterations); m = test_new(10, iterations, incr_step); test_create_threads(m, body); |