Guard against division by zero in test_int128 module.
Dean Rasheed <dean.a.rasheed@gmail.com>
Author:
Dean Rasheed <dean.a.rasheed@gmail.com>
Date: 2025-10-25T10:08:46Z
Releases:
19 (unreleased)
Guard against division by zero in test_int128 module. When testing 128/32-bit division in the test_int128 test module, make sure that we don't attempt to divide by zero. While at it, use pg_prng_int64() and pg_prng_int32() to generate the random numbers required for the tests, rather than pg_prng_uint64(). This eliminates the need for any implicit or explicit type casts. Author: Dean Rasheed <dean.a.rasheed@gmail.com> Reported-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/da4wqngd6gwz5s4yf5y5f75xj7gpja62l4dbp6w4j3vs7fcjue@upvolcu4e6o2
Files
| Path | Change | +/− |
|---|---|---|
| src/test/modules/test_int128/test_int128.c | modified | +9 −5 |
Discussion
- Improving and extending int128.h to more of numeric.c 20 messages · 2025-06-23 → 2025-10-25