[PATCH] D97726: [sanitizers] [windows] Use InternalMmapVector instead of silencing -Wframe-larger-than
Russell Gallop via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 9 06:00:56 PST 2021
russell.gallop added a comment.
In D97726#2612212 <https://reviews.llvm.org/D97726#2612212>, @mstorsjo wrote:
> Can someone with a working windows sanitizers try this one out?
I applied this to cf806d91d562736192f91478eb47daa29c2230bf <https://reviews.llvm.org/rGcf806d91d562736192f91478eb47daa29c2230bf>, built with VS2019 and ran some tests.
ninja check-sanitizer was okay
ninja check-ubsan had a few failures
These weren't present with the patch.
FAIL: UBSan-Standalone-x86_64 :: TestCases/Integer/suppressions.cpp (31 of 82)
******************** TEST 'UBSan-Standalone-x86_64 :: TestCases/Integer/suppressions.cpp' FAILED ********************
Script:
--
: 'RUN: at line 1'; F:/git/llvm-project/stage1/./bin/clang.exe -fsanitize=integer -g0 F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Integer\suppressions.cpp -o F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp
: 'RUN: at line 11'; env UBSAN_OPTIONS=halt_on_error=1 not F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp 2>&1 | FileCheck F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Integer\suppressions.cpp
: 'RUN: at line 13'; echo "signed-integer-overflow:F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp" > F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp.wrong-supp
: 'RUN: at line 14'; env UBSAN_OPTIONS=halt_on_error=1:suppressions='"F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp.wrong-supp"' not F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp 2>&1 | FileCheck F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Integer\suppressions.cpp
: 'RUN: at line 16'; echo "unsigned-integer-overflow:do_overflow" > F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp.func-supp
: 'RUN: at line 17'; env UBSAN_OPTIONS=halt_on_error=1:suppressions='"F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp.func-supp"' F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp
: 'RUN: at line 21'; echo "unsigned-integer-overflow:suppressions.cpp.tmp" > F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp.module-supp
: 'RUN: at line 22'; env UBSAN_OPTIONS=halt_on_error=1:suppressions='"F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp.module-supp"' F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp
: 'RUN: at line 25'; echo "unsigned-integer-overflow:F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Integer\suppressions.cpp" > F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp.file-supp
: 'RUN: at line 26'; env UBSAN_OPTIONS=halt_on_error=1:suppressions='"F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp.file-supp"' F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp
: 'RUN: at line 29'; F:/git/llvm-project/stage1/./bin/clang.exe -fsanitize=integer -fno-sanitize-recover=integer F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Integer\suppressions.cpp -o F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp-norecover
: 'RUN: at line 30'; env UBSAN_OPTIONS=halt_on_error=1:suppressions='"F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp.module-supp"' not F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp-norecover 2>&1 | FileCheck F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Integer\suppressions.cpp
--
Exit Code: 1
Command Output (stdout):
--
$ ":" "RUN: at line 1"
$ "F:/git/llvm-project/stage1/./bin/clang.exe" "-fsanitize=integer" "-g0" "F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Integer\suppressions.cpp" "-o" "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp"
# command output:
Creating library F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.lib and object F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.exp
$ ":" "RUN: at line 11"
$ "env" "UBSAN_OPTIONS=halt_on_error=1" "not" "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp"
$ "FileCheck" "F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Integer\suppressions.cpp"
$ ":" "RUN: at line 13"
$ "echo" "signed-integer-overflow:F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp"
$ ":" "RUN: at line 14"
$ "env" "UBSAN_OPTIONS=halt_on_error=1:suppressions="F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp.wrong-supp"" "not" "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp"
$ "FileCheck" "F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Integer\suppressions.cpp"
$ ":" "RUN: at line 16"
$ "echo" "unsigned-integer-overflow:do_overflow"
$ ":" "RUN: at line 17"
$ "env" "UBSAN_OPTIONS=halt_on_error=1:suppressions="F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp.func-supp"" "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Integer\Output\suppressions.cpp.tmp"
# command stderr:
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Integer\suppressions.cpp:35:44: runtime error: unsigned integer overflow: 10000000000000000000 + 9000000000000000000 cannot be represented in type 'unsigned long long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Integer\suppressions.cpp:35:44 in
error: command failed with exit status: 1
--
********************
Testing: 0.. 10.. 20.. 30.. 40.. 50..
FAIL: UBSan-Standalone-x86_64 :: TestCases/Misc/missing_return.cpp (50 of 82)
******************** TEST 'UBSan-Standalone-x86_64 :: TestCases/Misc/missing_return.cpp' FAILED ********************
Script:
--
: 'RUN: at line 1'; F:/git/llvm-project/stage1/./bin/clang.exe -fsanitize=return -gline-tables-only -gcodeview -gcolumn-info F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Misc\missing_return.cpp -O3 -o F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\missing_return.cpp.tmp
: 'RUN: at line 2'; not F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\missing_return.cpp.tmp 2>&1 | FileCheck F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Misc\missing_return.cpp
: 'RUN: at line 3'; env UBSAN_OPTIONS=print_stacktrace=1 not F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\missing_return.cpp.tmp 2>&1 | FileCheck F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Misc\missing_return.cpp --check-prefix=CHECK-STACKTRACE
--
Exit Code: 1
Command Output (stdout):
--
$ ":" "RUN: at line 1"
$ "F:/git/llvm-project/stage1/./bin/clang.exe" "-fsanitize=return" "-gline-tables-only" "-gcodeview" "-gcolumn-info" "F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Misc\missing_return.cpp" "-O3" "-o" "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\missing_return.cpp.tmp"
# command output:
Creating library F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\missing_return.cpp.lib and object F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\missing_return.cpp.exp
# command stderr:
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Misc\missing_return.cpp:8:24: warning: GCC does not allow 'noinline' attribute in this position on a function definition [-Wgcc-compat]
int f() __attribute__((noinline)) {
^
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Misc\missing_return.cpp:10:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
2 warnings generated.
$ ":" "RUN: at line 2"
$ "not" "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\missing_return.cpp.tmp"
$ "FileCheck" "F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Misc\missing_return.cpp"
$ ":" "RUN: at line 3"
$ "env" "UBSAN_OPTIONS=print_stacktrace=1" "not" "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\missing_return.cpp.tmp"
$ "FileCheck" "F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Misc\missing_return.cpp" "--check-prefix=CHECK-STACKTRACE"
# command stderr:
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Misc\missing_return.cpp:9:22: error: CHECK-STACKTRACE: expected string not found in input
// CHECK-STACKTRACE: #0 {{.*}}f{{.*}}missing_return.cpp:[[@LINE-1]]
^
<stdin>:1:1: note: scanning from here
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Misc\missing_return.cpp:8:5: runtime error: execution reached the end of a value-returning function without returning a value
^
<stdin>:1:1: note: with "@LINE-1" equal to "8"
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Misc\missing_return.cpp:8:5: runtime error: execution reached the end of a value-returning function without returning a value
^
<stdin>:1:46: note: possible intended match here
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Misc\missing_return.cpp:8:5: runtime error: execution reached the end of a value-returning function without returning a value
^
Input file: <stdin>
Check file: F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Misc\missing_return.cpp
-dump-input=help explains the following input dump.
Input was:
<<<<<<
1: F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\Misc\missing_return.cpp:8:5: runtime error: execution reached the end of a value-returning function without returning a value
check:9'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
check:9'1 with "@LINE-1" equal to "8"
check:9'2 ? possible intended match
2: #0 0x7ff7d55c80cf (F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\missing_return.cpp.tmp+0x80cf)
check:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3: #1 0x7ff7d55c80e8 (F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\missing_return.cpp.tmp+0x80e8)
check:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4: #2 0x7ff7d55cb02b (F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\Misc\Output\missing_return.cpp.tmp+0xb02b)
check:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5: #3 0x7ffc0a8b7033 (C:\WINDOWS\System32\KERNEL32.DLL+0x17033)
check:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6: #4 0x7ffc0c69d240 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x4d240)
check:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.
.
.
>>>>>>
error: command failed with exit status: 1
--
********************
Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.
FAIL: UBSan-Standalone-x86_64 :: TestCases/TypeCheck/misaligned.cpp (81 of 82)
******************** TEST 'UBSan-Standalone-x86_64 :: TestCases/TypeCheck/misaligned.cpp' FAILED ********************
Script:
--
: 'RUN: at line 1'; F:/git/llvm-project/stage1/./bin/clang.exe -gline-tables-only -gcodeview -gcolumn-info -fsanitize=alignment F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp -O3 -o F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp
: 'RUN: at line 2'; F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp l0 && F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp s0 && F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp r0 && F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp m0 && F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp f0 && F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp n0 && F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp u0
: 'RUN: at line 3'; F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp l1 2>&1 | FileCheck F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp --check-prefix=CHECK-LOAD --strict-whitespace
: 'RUN: at line 4'; F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp r1 2>&1 | FileCheck F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp --check-prefix=CHECK-REFERENCE
: 'RUN: at line 5'; F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp m1 2>&1 | FileCheck F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp --check-prefix=CHECK-MEMBER
: 'RUN: at line 6'; F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp f1 2>&1 | FileCheck F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp --check-prefix=CHECK-MEMFUN
: 'RUN: at line 7'; F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp n1 2>&1 | FileCheck F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp --check-prefix=CHECK-NEW
: 'RUN: at line 8'; F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp u1 2>&1 | FileCheck F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp --check-prefix=CHECK-UPCAST
: 'RUN: at line 9'; env UBSAN_OPTIONS=print_stacktrace=1 F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp l1 2>&1 | FileCheck F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp --check-prefix=CHECK-LOAD --check-prefix=CHECK-STACK-LOAD
: 'RUN: at line 11'; F:/git/llvm-project/stage1/./bin/clang.exe -fsanitize=alignment -fno-sanitize-recover=alignment F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp -O3 -o F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp
: 'RUN: at line 12'; not F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp s1 2>&1 | FileCheck F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp --check-prefix=CHECK-STORE
: 'RUN: at line 13'; not F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp w1 2>&1 | FileCheck F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp --check-prefix=CHECK-WILD
--
Exit Code: 1
Command Output (stdout):
--
$ ":" "RUN: at line 1"
$ "F:/git/llvm-project/stage1/./bin/clang.exe" "-gline-tables-only" "-gcodeview" "-gcolumn-info" "-fsanitize=alignment" "F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp" "-O3" "-o" "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp"
# command output:
Creating library F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.lib and object F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.exp
# command stderr:
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:47:15: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
return *p && 0;
^ ~
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:47:15: note: use '&' for a bitwise operation
return *p && 0;
^~
&
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:47:15: note: remove constant to silence this warning
return *p && 0;
~^~~~
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:71:17: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
return s->k && 0;
^ ~
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:71:17: note: use '&' for a bitwise operation
return s->k && 0;
^~
&
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:71:17: note: remove constant to silence this warning
return s->k && 0;
~^~~~
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:78:19: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
return s->f() && 0;
^ ~
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:78:19: note: use '&' for a bitwise operation
return s->f() && 0;
^~
&
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:78:19: note: remove constant to silence this warning
return s->f() && 0;
~^~~~
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:85:27: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
return (new (s) S)->k && 0;
^ ~
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:85:27: note: use '&' for a bitwise operation
return (new (s) S)->k && 0;
^~
&
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:85:27: note: remove constant to silence this warning
return (new (s) S)->k && 0;
~^~~~
4 warnings generated.
$ ":" "RUN: at line 2"
$ "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp" "l0"
$ "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp" "s0"
$ "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp" "r0"
$ "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp" "m0"
$ "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp" "f0"
$ "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp" "n0"
$ "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp" "u0"
$ ":" "RUN: at line 3"
$ "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp" "l1"
$ "FileCheck" "F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp" "--check-prefix=CHECK-LOAD" "--strict-whitespace"
$ ":" "RUN: at line 4"
$ "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp" "r1"
$ "FileCheck" "F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp" "--check-prefix=CHECK-REFERENCE"
$ ":" "RUN: at line 5"
$ "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp" "m1"
$ "FileCheck" "F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp" "--check-prefix=CHECK-MEMBER"
$ ":" "RUN: at line 6"
$ "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp" "f1"
$ "FileCheck" "F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp" "--check-prefix=CHECK-MEMFUN"
$ ":" "RUN: at line 7"
$ "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp" "n1"
$ "FileCheck" "F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp" "--check-prefix=CHECK-NEW"
$ ":" "RUN: at line 8"
$ "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp" "u1"
$ "FileCheck" "F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp" "--check-prefix=CHECK-UPCAST"
$ ":" "RUN: at line 9"
$ "env" "UBSAN_OPTIONS=print_stacktrace=1" "F:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\Standalone-x86_64\TestCases\TypeCheck\Output\misaligned.cpp.tmp" "l1"
$ "FileCheck" "F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp" "--check-prefix=CHECK-LOAD" "--check-prefix=CHECK-STACK-LOAD"
# command stderr:
F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:48:23: error: CHECK-STACK-LOAD: expected string not found in input
// CHECK-STACK-LOAD: #0 {{.*}}main{{.*}}misaligned.cpp
^
<stdin>:4:3: note: scanning from here
^
^
<stdin>:5:109: note: possible intended match here
#0 0x7ff6a5118273 (f:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\standalone-x86_64\testcases\typecheck\output\misaligned.cpp.tmp+0x8273)
^
Input file: <stdin>
Check file: F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp
-dump-input=help explains the following input dump.
Input was:
<<<<<<
1: F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:47:12: runtime error: load of misaligned address 0x00bbbe32f9c5 for type 'int', which requires 4 byte alignment
2: 0x00bbbe32f9c5: note: pointer points here
3: 00 00 00 01 02 03 04 05 00 00 00 00 00 00 00 20 aa 71 d2 79 02 00 00 f0 e4 72 d2 79 02 00 00 00
4: ^
check:48'0 X~ error: no match found
5: #0 0x7ff6a5118273 (f:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\standalone-x86_64\testcases\typecheck\output\misaligned.cpp.tmp+0x8273)
check:48'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:48'1 ? possible intended match
6: #1 0x7ff6a511b27b (f:\git\llvm-project\stage1\projects\compiler-rt\test\ubsan\standalone-x86_64\testcases\typecheck\output\misaligned.cpp.tmp+0xb27b)
check:48'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7: #2 0x7ffc0a8b7033 (C:\WINDOWS\System32\KERNEL32.DLL+0x17033)
check:48'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8: #3 0x7ffc0c69d240 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x4d240)
check:48'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9:
check:48'0 ~
10: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior F:\git\llvm-project\compiler-rt\test\ubsan\TestCases\TypeCheck\misaligned.cpp:47:12 in
check:48'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>>
error: command failed with exit status: 1
--
********************
Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
********************
Failed Tests (3):
UBSan-Standalone-x86_64 :: TestCases/Integer/suppressions.cpp
UBSan-Standalone-x86_64 :: TestCases/Misc/missing_return.cpp
UBSan-Standalone-x86_64 :: TestCases/TypeCheck/misaligned.cpp
Testing Time: 46.90s
Unsupported : 22
Passed : 55
Expectedly Failed: 2
Failed : 3
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97726/new/
https://reviews.llvm.org/D97726
More information about the llvm-commits
mailing list