[cfe-dev] [release_34] [compiler_rt] UBSAN test failures on i586

Will Dietz wdietz2 at illinois.edu
Fri Dec 6 14:14:03 PST 2013


Indeed, sorry about that.  Surprised this hasn't cropped up earlier!

I've committed a fix as r196612, confirmed to fix the issue by testing
with -m32.

* @Ismail: If you're able, confirmation that this fixes the issue for
you would be appreciated to ensure this is indeed fixed.
* @Richard: Should this be forwarded to the release branch?
* When testing with -m32 I'm seeing TypeCheck/vptr.cpp fail with what
seems to be whitespace specific to 64bit.  Is this an issue on i586 as
well?

~Will

On Thu, Dec 5, 2013 at 8:34 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> Will, is unsigned-integer-overflow one of yours?
>
>
> On Thu, Dec 5, 2013 at 3:34 AM, İsmail Dönmez <ismail at donmez.ws> wrote:
>>
>> Hi,
>>
>> I have multiple UBSAN tests failing the same way:
>>
>>  ******************** TEST 'UndefinedBehaviorSanitizer-AddressSanitizer ::
>> Integer/uadd-overflow.cpp' FAILED ********************
>>  Script:
>>  --
>>  /home/abuild/rpmbuild/BUILD/llvm/stage2/bin/clang -fsanitize=address
>> --driver-mode=g++ -DADD_I32 -fsanitize=unsigned-integer-overflow
>> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/Integer/uadd-overflow.cpp
>> -o
>> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/AsanConfig/Integer/Output/uadd-overflow.cpp.tmp
>> &&
>> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/AsanConfig/Integer/Output/uadd-overflow.cpp.tmp
>> 2>&1 | FileCheck
>> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/Integer/uadd-overflow.cpp
>> --check-prefix=CHECK-ADD_I32
>>  /home/abuild/rpmbuild/BUILD/llvm/stage2/bin/clang -fsanitize=address
>> --driver-mode=g++ -DADD_I64 -fsanitize=unsigned-integer-overflow
>> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/Integer/uadd-overflow.cpp
>> -o
>> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/AsanConfig/Integer/Output/uadd-overflow.cpp.tmp
>> &&
>> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/AsanConfig/Integer/Output/uadd-overflow.cpp.tmp
>> 2>&1 | FileCheck
>> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/Integer/uadd-overflow.cpp
>> --check-prefix=CHECK-ADD_I64
>>  /home/abuild/rpmbuild/BUILD/llvm/stage2/bin/clang -fsanitize=address
>> --driver-mode=g++ -DADD_I128 -fsanitize=unsigned-integer-overflow
>> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/Integer/uadd-overflow.cpp
>> -o
>> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/AsanConfig/Integer/Output/uadd-overflow.cpp.tmp
>> &&
>> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/AsanConfig/Integer/Output/uadd-overflow.cpp.tmp
>> 2>&1 | FileCheck
>> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/Integer/uadd-overflow.cpp
>> --check-prefix=CHECK-ADD_I128
>>  --
>>  Exit Code: 1
>>
>>  Command Output (stderr):
>>  --
>>
>> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/Integer/uadd-overflow.cpp:21:20:
>> error: expected string not found in input
>>   // CHECK-ADD_I64: 10000000000000000000 + 9000000000000000000 cannot be
>> represented in type 'unsigned long'
>>                     ^
>>  <stdin>:1:1: note: scanning from here
>>
>> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/Integer/uadd-overflow.cpp:20:44:
>> runtime error: unsigned integer overflow: 10000000000000000000 +
>> 9000000000000000000 cannot be represented in type 'unsigned long long'
>>  ^
>>  <stdin>:1:160: note: possible intended match here
>>
>> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/Integer/uadd-overflow.cpp:20:44:
>> runtime error: unsigned integer overflow: 10000000000000000000 +
>> 9000000000000000000 cannot be represented in type 'unsigned long long'
>>
>> So the test expect to see "unsigned long" but output has "unsigned long
>> long".
>>
>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>




More information about the cfe-dev mailing list