Add bounds checking before converting int to uint32 to prevent potential integer overflow in benchmark and concurrent test functions