external/aws/aws-cpp-sdk-core/source/utils/HashingUtils.cpp:240:31: runtime error: signed integer overflow: 31 * 94752355 cannot be represented in type 'int'
#0 0x534115c in Aws::Utils::HashingUtils::HashString(char const*) /proc/self/cwd/external/aws/aws-cpp-sdk-core/source/utils/HashingUtils.cpp:240:31
#1 0x5c4025 in __cxx_global_var_init /proc/self/cwd/external/aws/aws-cpp-sdk-s3/source/S3Endpoint.cpp:29:37
#2 0x5c40e0 in _GLOBAL__sub_I_S3Endpoint.cpp /proc/self/cwd/external/aws/aws-cpp-sdk-s3/source/S3Endpoint.cpp
#3 0x5d22e6c in __libc_csu_init (/out/parse_tensor_op_fuzz+0x5d22e6c)
#4 0x7f8dec90a7be in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x207be)
#5 0x5cf288 in _start (/out/parse_tensor_op_fuzz+0x5cf288)
Did you compile the SDK with sanitizer? That piece of code is to compute hash, overflow is intended.
Yes, I am fuzzing tensorflow on OSSFuzz and it detected an overflow on the dependency.
Signed integer overflow is undefined behavior, we should make it explicit if we rely on it.
The ideal would be making it unsigned so it's not undefined behavior
@Matheus28 Thank you for your suggestion, and we've changed it to unsigned: https://github.com/aws/aws-sdk-cpp/commit/f750d60ca1b950301cd16bb6e8a39a8af615f872
Most helpful comment
The ideal would be making it unsigned so it's not undefined behavior