test/constant_time_test.c:139: error: INTEGER_OVERFLOW_L1
  (0 - 1):unsigned32 by call to `constant_time_is_zero_32`.
Showing all 6 steps of the trace


test/constant_time_test.c:51:1: Array declaration
49.   };
50.   
51. > static uint32_t test_values_32[] = {
52.       0, 1, 1024, 12345, 32000, UINT32_MAX / 2, UINT32_MAX / 2 + 1,
53.       UINT32_MAX - 1, UINT32_MAX

test/constant_time_test.c:137:5: Assignment
135.   static int test_is_zero_32(int i)
136.   {
137.       uint32_t a = test_values_32[i];
           ^
138.   
139.       if (a == 0 && !TEST_true(constant_time_is_zero_32(a) == CONSTTIME_TRUE_32))

test/constant_time_test.c:139:20: Call
137.       uint32_t a = test_values_32[i];
138.   
139.       if (a == 0 && !TEST_true(constant_time_is_zero_32(a) == CONSTTIME_TRUE_32))
                          ^
140.           return 0;
141.       if (a != 0 && !TEST_true(constant_time_is_zero_32(a) == CONSTTIME_FALSE_32))

include/internal/constant_time_locl.h:183:1: <LHS trace>
181.   }
182.   
183. > static ossl_inline uint32_t constant_time_is_zero_32(uint32_t a)
184.   {
185.       return constant_time_msb_32(~a & (a - 1));

include/internal/constant_time_locl.h:183:1: Parameter `a`
  181.   }
  182.   
  183. > static ossl_inline uint32_t constant_time_is_zero_32(uint32_t a)
  184.   {
  185.       return constant_time_msb_32(~a & (a - 1));

include/internal/constant_time_locl.h:185:12: Binary operation: (0 - 1):unsigned32 by call to `constant_time_is_zero_32` 
  183.   static ossl_inline uint32_t constant_time_is_zero_32(uint32_t a)
  184.   {
  185.       return constant_time_msb_32(~a & (a - 1));
                    ^
  186.   }
  187.   

static ossl_inline uint32_t constant_time_is_zero_32(uint32_t a)
{
    return constant_time_msb_32(~a & (a - 1));
}
['static int test_is_zero_32(int i)\n{\n    uint32_t a = test_values_32[i];\n    if (a == 0 && !TEST_true(constant_time_is_zero_32(a) == CONSTTIME_TRUE_32))\n        return 0;\n    if (a != 0 && !TEST_true(constant_time_is_zero_32(a) == CONSTTIME_FALSE_32))\n        return 0;\n    return 1;\n}', 'static ossl_inline uint32_t constant_time_is_zero_32(uint32_t a)\n{\n    return constant_time_msb_32(~a & (a - 1));\n}']