<div dir="ltr">Similar for msan <a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/6784">http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/6784</a><div>and ubsan <a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-ubsan/builds/5631/steps/check-llvm%20ubsan/logs/stdio">http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-ubsan/builds/5631/steps/check-llvm%20ubsan/logs/stdio</a></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 20, 2018 at 11:22 AM Vitaly Buka <<a href="mailto:vitalybuka@google.com">vitalybuka@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 looks caused by the patch<div><a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/6883/steps/check-llvm%20asan/logs/stdio" target="_blank">http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/6883/steps/check-llvm%20asan/logs/stdio</a><br></div><div><br></div><div><pre style="font-family:"Courier New",courier,monotype,monospace;color:rgb(0,0,0);font-size:medium"><span class="m_1932822252676510392gmail-stdout">FAIL: LLVM :: CodeGen/AMDGPU/amdgpu-alias-analysis.ll (5325 of 27229)
******************** TEST 'LLVM :: CodeGen/AMDGPU/amdgpu-alias-analysis.ll' FAILED ********************
Script:
--
: 'RUN: at line 1'; /b/sanitizer-x86_64-linux-bootstrap/build/llvm_build_asan/bin/opt -mtriple=amdgcn-- -O3 -aa-eval -print-all-alias-modref-info -disable-output < /b/sanitizer-x86_64-linux-bootstrap/build/llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll 2>&1 | /b/sanitizer-x86_64-linux-bootstrap/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-bootstrap/build/llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll
: 'RUN: at line 2'; /b/sanitizer-x86_64-linux-bootstrap/build/llvm_build_asan/bin/opt -mtriple=r600-- -O3 -aa-eval -print-all-alias-modref-info -disable-output < /b/sanitizer-x86_64-linux-bootstrap/build/llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll 2>&1 | /b/sanitizer-x86_64-linux-bootstrap/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-bootstrap/build/llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll
--
Exit Code: 1
Command Output (stderr):
--
/b/sanitizer-x86_64-linux-bootstrap/build/llvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll:10:10: error: CHECK: expected string not found in input
; CHECK: NoAlias: i8 addrspace(1)* %p1, i8 addrspace(6)* %p
^
<stdin>:3:1: note: scanning from here
Function: test_32bit_addr_space: 2 pointers, 0 call sites
^
<stdin>:3:5: note: possible intended match here
Function: test_32bit_addr_space: 2 pointers, 0 call sites
^
--
********************
Testing: 0 .. 10.. 20
FAIL: LLVM :: CodeGen/AMDGPU/widen-smrd-loads.ll (6391 of 27229)
******************** TEST 'LLVM :: CodeGen/AMDGPU/widen-smrd-loads.ll' FAILED ********************
Script:
--
: 'RUN: at line 1'; /b/sanitizer-x86_64-linux-bootstrap/build/llvm_build_asan/bin/llc -amdgpu-codegenprepare-widen-constant-loads=0 -march=amdgcn -mcpu=tahiti -verify-machineinstrs < /b/sanitizer-x86_64-linux-bootstrap/build/llvm/test/CodeGen/AMDGPU/widen-smrd-loads.ll | /b/sanitizer-x86_64-linux-bootstrap/build/llvm_build_asan/bin/FileCheck -enable-var-scope -check-prefixes=GCN,SI /b/sanitizer-x86_64-linux-bootstrap/build/llvm/test/CodeGen/AMDGPU/widen-smrd-loads.ll
: 'RUN: at line 2'; /b/sanitizer-x86_64-linux-bootstrap/build/llvm_build_asan/bin/llc -amdgpu-codegenprepare-widen-constant-loads=0 -march=amdgcn -mcpu=tonga -verify-machineinstrs < /b/sanitizer-x86_64-linux-bootstrap/build/llvm/test/CodeGen/AMDGPU/widen-smrd-loads.ll | /b/sanitizer-x86_64-linux-bootstrap/build/llvm_build_asan/bin/FileCheck -enable-var-scope -check-prefixes=GCN,VI /b/sanitizer-x86_64-linux-bootstrap/build/llvm/test/CodeGen/AMDGPU/widen-smrd-loads.ll
--
Exit Code: 1
Command Output (stderr):
--
=================================================================
==22327==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000007134b68 at pc 0x0000012c05c8 bp 0x7fff2e2b6b40 sp 0x7fff2e2b6b38
READ of size 1 at 0x000007134b68 thread T0
#0 0x12c05c7 in getAliasResult /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp:99:10
#1 0x12c05c7 in llvm::AMDGPUAAResult::alias(llvm::MemoryLocation const&, llvm::MemoryLocation const&) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp:107
#2 0x3367dc1 in llvm::AAResults::alias(llvm::MemoryLocation const&, llvm::MemoryLocation const&) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Analysis/AliasAnalysis.cpp:105:23
#3 0x3396a90 in alias /b/sanitizer-x86_64-linux-bootstrap/build/llvm/include/llvm/Analysis/AliasAnalysis.h:896:25
#4 0x3396a90 in llvm::BasicAAResult::aliasCheck(llvm::Value const*, unsigned long, llvm::AAMDNodes, llvm::Value const*, unsigned long, llvm::AAMDNodes, llvm::Value const*, llvm::Value const*) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Analysis/BasicAliasAnalysis.cpp:1779
#5 0x33951de in llvm::BasicAAResult::alias(llvm::MemoryLocation const&, llvm::MemoryLocation const&) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Analysis/BasicAliasAnalysis.cpp:780:23
#6 0x3367dc1 in llvm::AAResults::alias(llvm::MemoryLocation const&, llvm::MemoryLocation const&) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Analysis/AliasAnalysis.cpp:105:23
#7 0x35d070c in llvm::MemoryDependenceResults::getSimplePointerDependencyFrom(llvm::MemoryLocation const&, bool, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>, false, false>, llvm::BasicBlock*, llvm::Instruction*, unsigned int*) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp:577:26
#8 0x35cfb45 in llvm::MemoryDependenceResults::getSimplePointerDependencyFrom(llvm::MemoryLocation const&, bool, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>, false, false>, llvm::BasicBlock*, llvm::Instruction*, unsigned int*) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp:448:12
#9 0x35ce759 in llvm::MemoryDependenceResults::getPointerDependencyFrom(llvm::MemoryLocation const&, bool, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>, false, false>, llvm::BasicBlock*, llvm::Instruction*, unsigned int*) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp:341:28
#10 0x12c95d4 in isClobberedInFunction /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp:112:19
#11 0x12c95d4 in visitLoadInst /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp:142
#12 0x12c95d4 in visitLoad /b/sanitizer-x86_64-linux-bootstrap/build/llvm/include/llvm/IR/Instruction.def:153
#13 0x12c95d4 in visit /b/sanitizer-x86_64-linux-bootstrap/build/llvm/include/llvm/IR/Instruction.def:153
#14 0x12c95d4 in visit<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>, false, false> > /b/sanitizer-x86_64-linux-bootstrap/build/llvm/include/llvm/IR/InstVisitor.h:92
#</span><span class="m_1932822252676510392gmail-stdout">15 0x12c95d4 in visit /b/sanitizer-x86_64-linux-bootstrap/build/llvm/include/llvm/IR/InstVisitor.h:107
</span><span class="m_1932822252676510392gmail-stdout"> #16 0x12c95d4 in visit<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::BasicBlock, true, false, void>, false, false> > /b/sanitizer-x86_64-linux-bootstrap/build/llvm/include/llvm/IR/InstVisitor.h:92
#17 0x12c95d4 in visit /b/sanitizer-x86_64-linux-bootstrap/build/llvm/include/llvm/IR/InstVisitor.h:103
#18 0x12c95d4 in (anonymous namespace)::AMDGPUAnnotateUniformValues::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp:184
#19 0x47fea6d in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1586:27
#20 0x3464f8c in RunPassOnSCC /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Analysis/CallGraphSCCPass.cpp:166:25
#21 0x3464f8c in RunAllPassesOnSCC /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Analysis/CallGraphSCCPass.cpp:430
#22 0x3464f8c in (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Analysis/CallGraphSCCPass.cpp:486
#23 0x47ffe7e in runOnModule /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1669:27
#24 0x47ffe7e in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1774
#25 0xa074af in compileModule(char**, llvm::LLVMContext&) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/tools/llc/llc.cpp:597:8
#26 0xa00ae0 in main /b/sanitizer-x86_64-linux-bootstrap/build/llvm/tools/llc/llc.cpp:351:22
#27 0x7f33f66c22e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
#28 0x8f4b99 in _start (/b/sanitizer-x86_64-linux-bootstrap/build/llvm_build_asan/bin/llc+0x8f4b99)
0x000007134b68 is located 56 bytes to the left of global variable '<string literal>' defined in '/b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp:74:5' (0x7134ba0) of size 129
'<string literal>' is ascii string 'AS.GLOBAL_ADDRESS == 1 && AS.REGION_ADDRESS == 2 && AS.LOCAL_ADDRESS == 3 && AS.CONSTANT_ADDRESS == 4 && AS.PRIVATE_ADDRESS == 5'
0x000007134b68 is located 4 bytes to the right of global variable 'ASAliasRulesGenIsZero' defined in '/b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp:63:28' (0x7134b40) of size 36
SUMMARY: AddressSanitizer: global-buffer-overflow /b/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp:99:10 in getAliasResult
Shadow bytes around the buggy address:
0x000080e1e910: 00 00 00 00 00 00 00 00 00 07 f9 f9 f9 f9 f9 f9
0x000080e1e920: 00 00 00 00 00 00 00 01 f9 f9 f9 f9 00 00 00 00
0x000080e1e930: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x000080e1e940: f9 f9 f9 f9 00 00 00 00 00 03 f9 f9 f9 f9 f9 f9
0x000080e1e950: 00 00 00 00 00 00 04 f9 f9 f9 f9 f9 00 00 00 00
=>0x000080e1e960: 00 00 00 00 00 00 00 00 00 00 00 00 04[f9]f9 f9
0x000080e1e970: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
0x000080e1e980: 00 00 00 00 01 f9 f9 f9 f9 f9 f9 f9 00 00 00 00
0x000080e1e990: 00 00 00 00 00 00 00 01 f9 f9 f9 f9 00 00 00 00
0x000080e1e9a0: 00 00 00 00 00 00 01 f9 f9 f9 f9 f9 00 00 00 00
0x000080e1e9b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==22327==ABORTING
/b/sanitizer-x86_64-linux-bootstrap/build/llvm/test/CodeGen/AMDGPU/widen-smrd-loads.ll:143:14: error: GCN-LABEL: expected string not found in input
; GCN-LABEL: {{^}}widen_i16_constant32_load:
^
<stdin>:518:37: note: scanning from here
widen_i1_zext_to_i64_constant_load: ; @widen_i1_zext_to_i64_constant_load
^
<stdin>:518:48: note: possible intended match here
widen_i1_zext_to_i64_constant_load: ; @widen_i1_zext_to_i64_constant_load
^
--
********************
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 384.24s
********************
Failing Tests (2):
LLVM :: CodeGen/AMDGPU/amdgpu-alias-analysis.ll
LLVM :: CodeGen/AMDGPU/widen-smrd-loads.ll
Expected Passes : 26393
Expected Failures : 148
Unsupported Tests : 686
Unexpected Failures: 2
FAILED: test/CMakeFiles/check-llvm
cd /b/sanitizer-x86_64-linux-bootstrap/build/llvm_build_asan/test && /usr/bin/python2.7 /b/sanitizer-x86_64-linux-bootstrap/build/llvm_build_asan/./bin/llvm-lit -sv /b/sanitizer-x86_64-linux-bootstrap/build/llvm_build_asan/test
ninja: build stopped: subcommand failed.
+ echo @@@STEP_FAILURE@@@
+ echo @@@BUILD_STEP check-clang asan@@@
@@@STEP_FAILURE@@@
--------------------------------------------------------------------------------
started: Mon Aug 20 06:50:07 2018
ended: Mon Aug 20 07:15:07 2018
duration: 24 mins, 59 secs</span></pre></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 20, 2018 at 6:19 AM Samuel Pitoiset via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: hakzsam<br>
Date: Mon Aug 20 06:18:59 2018<br>
New Revision: 340171<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=340171&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=340171&view=rev</a><br>
Log:<br>
AMDGPU: bump AS.MAX_COMMON_ADDRESS to 6 since 32-bit addr space<br>
<br>
32-bit constant address space is declared as 6, so the<br>
maximum number of address spaces is 6, not 5.<br>
<br>
Fixes "LLVM ERROR: Pointer address space out of range".<br>
<br>
v3: use static_assert()<br>
v2: add a very simple test for 32-bit addr space<br>
<br>
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=106630" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=106630</a><br>
Signed-off-by: Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com" target="_blank">samuel.pitoiset@gmail.com</a>><br>
<br>
Modified:<br>
llvm/trunk/lib/Target/AMDGPU/AMDGPU.h<br>
llvm/trunk/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp<br>
llvm/trunk/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll<br>
<br>
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPU.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPU.h?rev=340171&r1=340170&r2=340171&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPU.h?rev=340171&r1=340170&r2=340171&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/AMDGPU/AMDGPU.h (original)<br>
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPU.h Mon Aug 20 06:18:59 2018<br>
@@ -229,7 +229,7 @@ struct AMDGPUAS {<br>
<br>
enum : unsigned {<br>
// The maximum value for flat, generic, local, private, constant and region.<br>
- MAX_COMMON_ADDRESS = 5,<br>
+ MAX_COMMON_ADDRESS = 6,<br>
<br>
GLOBAL_ADDRESS = 1, ///< Address space for global memory (RAT0, VTX0).<br>
CONSTANT_ADDRESS = 4, ///< Address space for constant memory (VTX2)<br>
<br>
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp?rev=340171&r1=340170&r2=340171&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp?rev=340171&r1=340170&r2=340171&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp (original)<br>
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp Mon Aug 20 06:18:59 2018<br>
@@ -69,7 +69,7 @@ AMDGPUAAResult::ASAliasRulesTy::ASAliasR<br>
/* Region */ {MayAlias, NoAlias , NoAlias , NoAlias, MayAlias, NoAlias},<br>
/* Private */ {MayAlias, NoAlias , NoAlias , NoAlias , NoAlias , MayAlias}<br>
};<br>
- assert(AS.MAX_COMMON_ADDRESS <= 5);<br>
+ static_assert(AS.MAX_COMMON_ADDRESS <= 6, "Addr space out of range");<br>
if (AS.FLAT_ADDRESS == 0) {<br>
assert(AS.GLOBAL_ADDRESS == 1 &&<br>
AS.REGION_ADDRESS == 2 &&<br>
<br>
Modified: llvm/trunk/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll?rev=340171&r1=340170&r2=340171&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll?rev=340171&r1=340170&r2=340171&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll (original)<br>
+++ llvm/trunk/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll Mon Aug 20 06:18:59 2018<br>
@@ -7,3 +7,9 @@ define void @test(i8 addrspace(5)* %p, i<br>
ret void<br>
}<br>
<br>
+; CHECK: NoAlias: i8 addrspace(1)* %p1, i8 addrspace(6)* %p<br>
+<br>
+define void @test_32bit_addr_space(i8 addrspace(6)* %p, i8 addrspace(1)* %p1) {<br>
+ ret void<br>
+}<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>
</blockquote></div>