<div dir="ltr">Disabled in r279318</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 19, 2016 at 1:45 PM Kostya Serebryany <<a href="mailto:kcc@google.com">kcc@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">this test fails on the windows bot, please fix. <div><a href="http://lab.llvm.org:8011/builders/sanitizer-windows/builds/27672/steps/run%20tests/logs/stdio" target="_blank">http://lab.llvm.org:8011/builders/sanitizer-windows/builds/27672/steps/run%20tests/logs/stdio</a><br></div><div><pre style="font-family:"courier new",courier,monotype,monospace;color:rgb(0,0,0);font-size:medium"><span class="m_-1574474579370581874gmail-stdout">Exit Code: 1
Command Output (stdout):
--
$ "C:/b/slave/sanitizer-windows/build/./bin/clang.exe" "-fsanitize=address" "-mno-omit-leaf-frame-pointer" "-fno-omit-frame-pointer" "-fno-optimize-sibling-calls" "-gline-tables-only" "-gcodeview" "-fms-compatibility-version=18.00.31101" "-shared-libasan" "-O0" "C:\b\slave\sanitizer-windows\llvm\projects\compiler-rt\test\asan\TestCases\set_shadow_test.c" "-o" "C:\b\slave\sanitizer-windows\build\projects\compiler-rt\test\asan\I386WindowsDynamicConfig\TestCases\Output\set_shadow_test.c.tmp"
# command output:
Creating library C:\b\slave\sanitizer-windows\build\projects\compiler-rt\test\asan\I386WindowsDynamicConfig\TestCases\Output\set_shadow_test.c.lib and object C:\b\slave\sanitizer-windows\build\projects\compiler-rt\test\asan\I386WindowsDynamicConfig\TestCases\Output\set_shadow_test.c.exp
$ "C:\b\slave\sanitizer-windows\build\projects\compiler-rt\test\asan\I386WindowsDynamicConfig\TestCases\Output\set_shadow_test.c.tmp" "0x00"
$ "FileCheck" "C:\b\slave\sanitizer-windows\llvm\projects\compiler-rt\test\asan\TestCases\set_shadow_test.c" "-check-prefix=X00"
$ "not" "C:\b\slave\sanitizer-windows\build\projects\compiler-rt\test\asan\I386WindowsDynamicConfig\TestCases\Output\set_shadow_test.c.tmp" "0xf1"
note: command had no output on stdout or stderr
error: command failed with exit status: 1
$ "FileCheck" "C:\b\slave\sanitizer-windows\llvm\projects\compiler-rt\test\asan\TestCases\set_shadow_test.c" "-check-prefix=XF1"
# command stderr:
C:\b\slave\sanitizer-windows\llvm\projects\compiler-rt\test\asan\TestCases\set_shadow_test.c:35:10: error: expected string not found in input
// XF1: AddressSanitizer: stack-buffer-underflow
^
<stdin>:1:1: note: scanning from here
PASS
^
<stdin>:1:2: note: possible intended match here
PASS
^
error: command failed with exit status: 1
</span></pre></div><div><span class="m_-1574474579370581874gmail-stdout"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 18, 2016 at 11:15 AM, Vitaly Buka via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: vitalybuka<br>
Date: Thu Aug 18 13:15:15 2016<br>
New Revision: 279108<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=279108&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=279108&view=rev</a><br>
Log:<br>
[asan] Add one more test for __asan_set_shadow_*<br>
<br>
Reviewers: eugenis, filcab<br>
<br>
Subscribers: llvm-commits, kubabrecka<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D23676" rel="noreferrer" target="_blank">https://reviews.llvm.org/D23676</a><br>
<br>
Added:<br>
compiler-rt/trunk/test/asan/TestCases/set_shadow_test.c<br>
<br>
Added: compiler-rt/trunk/test/asan/TestCases/set_shadow_test.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/set_shadow_test.c?rev=279108&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/set_shadow_test.c?rev=279108&view=auto</a><br>
==============================================================================<br>
--- compiler-rt/trunk/test/asan/TestCases/set_shadow_test.c (added)<br>
+++ compiler-rt/trunk/test/asan/TestCases/set_shadow_test.c Thu Aug 18 13:15:15 2016<br>
@@ -0,0 +1,67 @@<br>
+// RUN: %clang_asan -O0 %s -o %t<br>
+// RUN: %run %t 0x00 2>&1 | FileCheck %s -check-prefix=X00<br>
+// RUN: not %run %t 0xf1 2>&1 | FileCheck %s -check-prefix=XF1<br>
+// RUN: not %run %t 0xf2 2>&1 | FileCheck %s -check-prefix=XF2<br>
+// RUN: not %run %t 0xf3 2>&1 | FileCheck %s -check-prefix=XF3<br>
+// RUN: not %run %t 0xf5 2>&1 | FileCheck %s -check-prefix=XF5<br>
+// RUN: not %run %t 0xf8 2>&1 | FileCheck %s -check-prefix=XF8<br>
+<br>
+#include <assert.h><br>
+#include <sanitizer/asan_interface.h><br>
+#include <stddef.h><br>
+#include <stdio.h><br>
+#include <stdlib.h><br>
+<br>
+void __asan_set_shadow_00(size_t addr, size_t size);<br>
+void __asan_set_shadow_f1(size_t addr, size_t size);<br>
+void __asan_set_shadow_f2(size_t addr, size_t size);<br>
+void __asan_set_shadow_f3(size_t addr, size_t size);<br>
+void __asan_set_shadow_f5(size_t addr, size_t size);<br>
+void __asan_set_shadow_f8(size_t addr, size_t size);<br>
+<br>
+char a __attribute__((aligned(8)));<br>
+<br>
+void f(long arg) {<br>
+ size_t shadow_offset;<br>
+ size_t shadow_scale;<br>
+ __asan_get_shadow_mapping(&shadow_scale, &shadow_offset);<br>
+ size_t addr = (((size_t)&a) >> shadow_scale) + shadow_offset;<br>
+<br>
+ switch (arg) {<br>
+ // X00-NOT: AddressSanitizer<br>
+ // X00: PASS<br>
+ case 0x00:<br>
+ return __asan_set_shadow_00(addr, 1);<br>
+ // XF1: AddressSanitizer: stack-buffer-underflow<br>
+ // XF1: [f1]<br>
+ case 0xf1:<br>
+ return __asan_set_shadow_f1(addr, 1);<br>
+ // XF2: AddressSanitizer: stack-buffer-overflow<br>
+ // XF2: [f2]<br>
+ case 0xf2:<br>
+ return __asan_set_shadow_f2(addr, 1);<br>
+ // XF3: AddressSanitizer: stack-buffer-overflow<br>
+ // XF3: [f3]<br>
+ case 0xf3:<br>
+ return __asan_set_shadow_f3(addr, 1);<br>
+ // XF5: AddressSanitizer: stack-use-after-return<br>
+ // XF5: [f5]<br>
+ case 0xf5:<br>
+ return __asan_set_shadow_f5(addr, 1);<br>
+ // XF8: AddressSanitizer: stack-use-after-scope<br>
+ // XF8: [f8]<br>
+ case 0xf8:<br>
+ return __asan_set_shadow_f8(addr, 1);<br>
+ }<br>
+ assert(0);<br>
+}<br>
+<br>
+int main(int argc, char **argv) {<br>
+ assert(argc > 1);<br>
+<br>
+ long arg = strtol(argv[1], 0, 16);<br>
+ f(arg);<br>
+ a = 1;<br>
+ printf("PASS\n");<br>
+ return 0;<br>
+}<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
</blockquote></div>