[cfe-dev] [release_34] [compiler-rt] UBSAN vptr.cpp test failure

Will Dietz willdtz at gmail.com
Mon Dec 9 11:03:58 PST 2013


Looks like a typo in the pattern used to accomodate 32bit.  I'll fix
this shortly, once laptop chugs through building trunk :).

That said, it seems compiler-rt doesn't get much attention on 32bit.
Would it be possible to add compiler-rt to one of the existing 32bit builders?

Ideally we'd catch this sort of thing long before release testing... :)

~Will

On Mon, Dec 9, 2013 at 6:22 AM, İsmail Dönmez <ismail at donmez.ws> wrote:
> Hi,
>
> In release_34 branch I got the following test failure on i586 Linux. Can
> someone shed some light into this? This is the last regression compared to
> 3.3 release.
>
>
> ******************** TEST 'UndefinedBehaviorSanitizer-Standalone ::
> TypeCheck/vptr.cpp' FAILED ********************
>  Script:
>  --
>  /home/abuild/rpmbuild/BUILD/llvm/stage2/bin/clang --driver-mode=g++
> -fsanitize=vptr
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp
> -O3 -o
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
>
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> rT &&
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> mT &&
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> fT &&
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> cT
>
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> rU &&
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> mU &&
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> fU &&
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> cU
>
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> rS &&
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> rV &&
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> oV
>
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> mS 2>&1 | FileCheck
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp
> --check-prefix=CHECK-MEMBER --strict-whitespace
>
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> fS 2>&1 | FileCheck
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp
> --check-prefix=CHECK-MEMFUN --strict-whitespace
>
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> cS 2>&1 | FileCheck
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp
> --check-prefix=CHECK-DOWNCAST --strict-whitespace
>
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> mV 2>&1 | FileCheck
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp
> --check-prefix=CHECK-MEMBER --strict-whitespace
>
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> fV 2>&1 | FileCheck
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp
> --check-prefix=CHECK-MEMFUN --strict-whitespace
>
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> cV 2>&1 | FileCheck
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp
> --check-prefix=CHECK-DOWNCAST --strict-whitespace
>
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> oU 2>&1 | FileCheck
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp
> --check-prefix=CHECK-OFFSET --strict-whitespace
>
> /home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/ubsan/lit_tests/UbsanConfig/TypeCheck/Output/vptr.cpp.tmp
> m0 2>&1 | FileCheck
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp
> --check-prefix=CHECK-NULL-MEMBER --strict-whitespace
>  --
>  Exit Code: 1
>
>  Command Output (stderr):
>  --
>
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp:68:9:
> warning: 'reinterpret_cast' from class 'U *' to its base at non-zero offset
> 'T *' behaves differently from 'static_cast' [-Wreinterpret-base-class]
>      p = reinterpret_cast<T*>(new U);
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp:68:9:
> note: use 'static_cast' to adjust the pointer correctly while upcasting
>      p = reinterpret_cast<T*>(new U);
>          ^~~~~~~~~~~~~~~~
>          static_cast
>
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp:106:12:
> warning: 'reinterpret_cast' to class 'U *' from its base at non-zero offset
> 'T *' behaves differently from 'static_cast' [-Wreinterpret-base-class]
>      return reinterpret_cast<U*>(p)->v() - 2;
>             ^~~~~~~~~~~~~~~~~~~~~~~
>
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp:106:12:
> note: use 'static_cast' to adjust the pointer correctly while downcasting
>      return reinterpret_cast<U*>(p)->v() - 2;
>             ^~~~~~~~~~~~~~~~
>             static_cast
>
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp:114:5:
> warning: expression result unused [-Wunused-value]
>      static_cast<T*>(reinterpret_cast<S*>(p));
>      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  3 warnings generated.
>
> /home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/ubsan/lit_tests/TestCases/TypeCheck/vptr.cpp:104:27:
> error: expected string not found in input
>      // CHECK-OFFSET-NEXT: {{^              \^                        (
> ~~~~~~~~~~~~)~~~~~~~~~~~ *$}}
>                            ^
>  <stdin>:3:90: note: scanning from here
>   19 00 00 00  b8 e9 05 08 00 00 00 00  c4 e9 05 08 00 00 00 00  00 00 00 00
> 11 00 00 00  55 00 00 00
>
> ^
>
>  --
>
>
> _______________________________________________
> 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