<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 5, 2015 at 11:56 AM, Renato Golin <span dir="ltr"><<a href="mailto:renato.golin@linaro.org" target="_blank">renato.golin@linaro.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Alexey,<br>
<br>
Not sure you saw this, but this commit actually breaks AArch64 bots:<br>
<br>
<a href="http://lab.llvm.org:8011/builders/clang-native-aarch64-full/builds/485/steps/ninja%20check%201/logs/UBSan-Standalone-aarch64%3A%3Ashift.cpp" target="_blank">http://lab.llvm.org:8011/builders/clang-native-aarch64-full/builds/485/steps/ninja%20check%201/logs/UBSan-Standalone-aarch64%3A%3Ashift.cpp</a></blockquote><div><br></div><div>No, I've missed that. Sorry =/</div><div>It's not at all clear why this failure happens.</div><div>First of all, which of the RUN lines is failing? Judging from the output, it's this one:</div><div><br></div><div><div>/home/debianbot/work/buildbot/slave/clang-native-aarch64-full/stage1/./bin/clang --driver-mode=g++  -DTOO_LOW -DOP='<<' -fsanitize=shift-base -fno-sanitize-recover=shift /home/debianbot/work/buildbot/slave/clang-native-aarch64-full/llvm/projects/compiler-rt/test/ubsan/TestCases/Integer/shift.cpp -o /home/debianbot/work/buildbot/slave/clang-native-aarch64-full/stage1/projects/compiler-rt/test/ubsan/Standalone-aarch64/TestCases/Integer/Output/shift.cpp.tmp &&  /home/debianbot/work/buildbot/slave/clang-native-aarch64-full/stage1/projects/compiler-rt/test/ubsan/Standalone-aarch64/TestCases/Integer/Output/shift.cpp.tmp</div></div><div><br></div><div>Can you verify that the resulting executable indeed fails with UBSan error? If yes, what is the objdump of main() function in this case?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
<br>
cheers,<br>
--renato<br>
<div class=""><div class="h5"><br>
On 3 March 2015 at 22:15, Alexey Samsonov <<a href="mailto:vonosmas@gmail.com">vonosmas@gmail.com</a>> wrote:<br>
> Author: samsonov<br>
> Date: Tue Mar  3 16:15:44 2015<br>
> New Revision: 231151<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=231151&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=231151&view=rev</a><br>
> Log:<br>
> [UBSan] Add testcases for -fsanitize=shift-base and -fsanitize=shift-exponent.<br>
><br>
> Modified:<br>
>     compiler-rt/trunk/test/ubsan/TestCases/Integer/shift.cpp<br>
>     compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc<br>
><br>
> Modified: compiler-rt/trunk/test/ubsan/TestCases/Integer/shift.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/Integer/shift.cpp?rev=231151&r1=231150&r2=231151&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/Integer/shift.cpp?rev=231151&r1=231150&r2=231151&view=diff</a><br>
> ==============================================================================<br>
> --- compiler-rt/trunk/test/ubsan/TestCases/Integer/shift.cpp (original)<br>
> +++ compiler-rt/trunk/test/ubsan/TestCases/Integer/shift.cpp Tue Mar  3 16:15:44 2015<br>
> @@ -1,13 +1,20 @@<br>
> -// RUN: %clangxx -DLSH_OVERFLOW -DOP='<<' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-LSH_OVERFLOW<br>
> -// RUN: %clangxx -DLSH_OVERFLOW -DOP='<<=' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-LSH_OVERFLOW<br>
> -// RUN: %clangxx -DTOO_LOW -DOP='<<' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW<br>
> -// RUN: %clangxx -DTOO_LOW -DOP='>>' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW<br>
> -// RUN: %clangxx -DTOO_LOW -DOP='<<=' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW<br>
> -// RUN: %clangxx -DTOO_LOW -DOP='>>=' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW<br>
> -// RUN: %clangxx -DTOO_HIGH -DOP='<<' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH<br>
> -// RUN: %clangxx -DTOO_HIGH -DOP='>>' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH<br>
> -// RUN: %clangxx -DTOO_HIGH -DOP='<<=' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH<br>
> -// RUN: %clangxx -DTOO_HIGH -DOP='>>=' -fsanitize=shift %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH<br>
> +// RUN: %clangxx -DLSH_OVERFLOW -DOP='<<' -fsanitize=shift-base -fno-sanitize-recover=shift %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-LSH_OVERFLOW<br>
> +// RUN: %clangxx -DLSH_OVERFLOW -DOP='<<=' -fsanitize=shift -fno-sanitize-recover=shift %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-LSH_OVERFLOW<br>
> +// RUN: %clangxx -DTOO_LOW -DOP='<<' -fsanitize=shift-exponent -fno-sanitize-recover=shift %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW<br>
> +// RUN: %clangxx -DTOO_LOW -DOP='>>' -fsanitize=shift -fno-sanitize-recover=shift %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW<br>
> +// RUN: %clangxx -DTOO_LOW -DOP='<<=' -fsanitize=shift -fno-sanitize-recover=shift %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW<br>
> +// RUN: %clangxx -DTOO_LOW -DOP='>>=' -fsanitize=shift -fno-sanitize-recover=shift %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_LOW<br>
> +// RUN: %clangxx -DTOO_HIGH -DOP='<<' -fsanitize=shift-exponent -fno-sanitize-recover=shift %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH<br>
> +// RUN: %clangxx -DTOO_HIGH -DOP='>>' -fsanitize=shift -fno-sanitize-recover=shift %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH<br>
> +// RUN: %clangxx -DTOO_HIGH -DOP='<<=' -fsanitize=shift -fno-sanitize-recover=shift %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH<br>
> +// RUN: %clangxx -DTOO_HIGH -DOP='>>=' -fsanitize=shift -fno-sanitize-recover=shift %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TOO_HIGH<br>
> +<br>
> +// RUN: %clangxx -DLSH_OVERFLOW -DOP='<<' -fsanitize=shift-exponent -fno-sanitize-recover=shift %s -o %t && %run %t<br>
> +// RUN: %clangxx -DLSH_OVERFLOW -DOP='>>' -fsanitize=shift-exponent -fno-sanitize-recover=shift %s -o %t && %run %t<br>
> +// RUN: %clangxx -DTOO_LOW -DOP='<<' -fsanitize=shift-base -fno-sanitize-recover=shift %s -o %t && %run %t<br>
> +// RUN: %clangxx -DTOO_LOW -DOP='>>' -fsanitize=shift-base -fno-sanitize-recover=shift %s -o %t && %run %t<br>
> +// RUN: %clangxx -DTOO_HIGH -DOP='<<' -fsanitize=shift-base -fno-sanitize-recover=shift %s -o %t && %run %t<br>
> +// RUN: %clangxx -DTOO_HIGH -DOP='>>' -fsanitize=shift-base -fno-sanitize-recover=shift %s -o %t && %run %t<br>
><br>
>  #include <stdint.h><br>
><br>
> @@ -20,18 +27,19 @@ int main() {<br>
>    b <<= 1; // still ok, unsigned<br>
><br>
>  #ifdef LSH_OVERFLOW<br>
> -  // CHECK-LSH_OVERFLOW: shift.cpp:24:5: runtime error: left shift of negative value -2147483648<br>
> +  // CHECK-LSH_OVERFLOW: shift.cpp:[[@LINE+1]]:5: runtime error: left shift of negative value -2147483648<br>
>    a OP 1;<br>
>  #endif<br>
><br>
>  #ifdef TOO_LOW<br>
> -  // CHECK-TOO_LOW: shift.cpp:29:5: runtime error: shift exponent -3 is negative<br>
> +  a = 0;<br>
> +  // CHECK-TOO_LOW: shift.cpp:[[@LINE+1]]:5: runtime error: shift exponent -3 is negative<br>
>    a OP (-3);<br>
>  #endif<br>
><br>
>  #ifdef TOO_HIGH<br>
>    a = 0;<br>
> -  // CHECK-TOO_HIGH: shift.cpp:35:5: runtime error: shift exponent 32 is too large for 32-bit type 'int'<br>
> +  // CHECK-TOO_HIGH: shift.cpp:[[@LINE+1]]:5: runtime error: shift exponent 32 is too large for 32-bit type 'int'<br>
>    a OP 32;<br>
>  #endif<br>
>  }<br>
><br>
> Modified: compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc?rev=231151&r1=231150&r2=231151&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc?rev=231151&r1=231150&r2=231151&view=diff</a><br>
> ==============================================================================<br>
> --- compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc (original)<br>
> +++ compiler-rt/trunk/test/ubsan/TestCases/Misc/coverage-levels.cc Tue Mar  3 16:15:44 2015<br>
> @@ -35,4 +35,4 @@ int main(int argc, char **argv) {<br>
>  // to dump coverage.<br>
>  // CHECK1:  1 PCs written<br>
>  // CHECK2:  3 PCs written<br>
> -// CHECK3:  4 PCs written<br>
> +// CHECK3:  3 PCs written<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div></div>