<div dir="ltr">Hi Artem,<div><br></div><div>The test "<span style="font-size:12.800000190734863px">gfx7_asm_all.s" is failing because of a global-buffer-overflow AddressSanitizer error on our Asan+Ubsan bot at </span><a href="http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan/">http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan/</a><span style="font-size:12.800000190734863px">. The output of the failing test that I obtained from </span><a href="http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_check/2915/consoleFull">http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_check/2915/consoleFull</a><span style="font-size:12.800000190734863px"> is shown below:</span></div><div><span style="font-size:12.800000190734863px"><br></span></div><div><div><span style="font-size:12.800000190734863px">Command Output (stderr):</span></div><div><span style="font-size:12.800000190734863px">--</span></div><div><span style="font-size:12.800000190734863px">=================================================================</span></div><div><span style="font-size:12.800000190734863px">==32235==ERROR: AddressSanitizer: global-buffer-overflow on address 0x00010e014f9b at pc 0x00010da57431 bp 0x7fff52d782b0 sp 0x7fff52d782a8</span></div><div><span style="font-size:12.800000190734863px">READ of size 1 at 0x00010e014f9b thread T0</span></div><div><span style="font-size:12.800000190734863px"> #0 0x10da57430 in llvm::AMDGPU::isSISrcOperand(llvm::MCInstrDesc const&, unsigned int) AMDGPUBaseInfo.cpp:339</span></div><div><span style="font-size:12.800000190734863px"> #1 0x10d18e6bc in (anonymous namespace)::AMDGPUOperand::addImmOperands(llvm::MCInst&, unsigned int, bool) const AMDGPUAsmParser.cpp:1111</span></div><div><span style="font-size:12.800000190734863px"> #2 0x10d191c8a in addOptionalImmOperand(llvm::MCInst&, llvm::SmallVectorImpl<std::__1::unique_ptr<llvm::MCParsedAsmOperand, std::__1::default_delete<llvm::MCParsedAsmOperand> > > const&, std::__1::map<(anonymous namespace)::AMDGPUOperand::ImmTy, unsigned int, std::__1::less<(anonymous namespace)::AMDGPUOperand::ImmTy>, std::__1::allocator<std::__1::pair<(anonymous namespace)::AMDGPUOperand::ImmTy const, unsigned int> > >&, (anonymous namespace)::AMDGPUOperand::ImmTy, long long) AMDGPUAsmParser.cpp:2295</span></div><div><span style="font-size:12.800000190734863px"> #3 0x10d185f84 in (anonymous namespace)::AMDGPUAsmParser::convertToMCInst(unsigned int, llvm::MCInst&, unsigned int, llvm::SmallVectorImpl<std::__1::unique_ptr<llvm::MCParsedAsmOperand, std::__1::default_delete<llvm::MCParsedAsmOperand> > > const&, llvm::SmallBitVector const&) AMDGPUAsmParser.cpp:2377</span></div><div><span style="font-size:12.800000190734863px"> #4 0x10d133d4b in (anonymous namespace)::AMDGPUAsmParser::MatchAndEmitInstruction(llvm::SMLoc, unsigned int&, llvm::SmallVectorImpl<std::__1::unique_ptr<llvm::MCParsedAsmOperand, std::__1::default_delete<llvm::MCParsedAsmOperand> > >&, llvm::MCStreamer&, unsigned long long&, bool) AMDGPUGenAsmMatcher.inc:18466</span></div><div><span style="font-size:12.800000190734863px"> #5 0x10d8799e5 in (anonymous namespace)::AsmParser::parseStatement((anonymous namespace)::ParseStatementInfo&, llvm::MCAsmParserSemaCallback*) AsmParser.cpp:2060</span></div><div><span style="font-size:12.800000190734863px"> #6 0x10d8631c5 in (anonymous namespace)::AsmParser::Run(bool, bool) AsmParser.cpp:754</span></div><div><span style="font-size:12.800000190734863px"> #7 0x10ce85ec2 in main llvm-mc.cpp:437</span></div><div><span style="font-size:12.800000190734863px"> #8 0x7fff93aba5ac in start (libdyld.dylib:x86_64+0x35ac)</span></div><div><span style="font-size:12.800000190734863px"><br></span></div><div><span style="font-size:12.800000190734863px">0x00010e014f9b is located 37 bytes to the left of global variable 'llvm::OperandInfo72' defined in 'lib/Target/AMDGPU/AMDGPUGenInstrInfo.inc:7522:28' (0x10e014fc0) of size 40</span></div><div><span style="font-size:12.800000190734863px">0x00010e014f9b is located 3 bytes to the right of global variable 'llvm::OperandInfo71' defined in 'lib/Target/AMDGPU/AMDGPUGenInstrInfo.inc:7521:28' (0x10e014f80) of size 24</span></div><div><span style="font-size:12.800000190734863px">SUMMARY: AddressSanitizer: global-buffer-overflow AMDGPUBaseInfo.cpp:339 in llvm::AMDGPU::isSISrcOperand(llvm::MCInstrDesc const&, unsigned int)</span></div><div><span style="font-size:12.800000190734863px">Shadow bytes around the buggy address:</span></div><div><span style="font-size:12.800000190734863px"> 0x100021c029a0: 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 f9</span></div><div><span style="font-size:12.800000190734863px"> 0x100021c029b0: f9 f9 f9 f9 00 00 00 00 f9 f9 f9 f9 00 00 00 00</span></div><div><span style="font-size:12.800000190734863px"> 0x100021c029c0: f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9</span></div><div><span style="font-size:12.800000190734863px"> 0x100021c029d0: 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 00 00 00 00</span></div><div><span style="font-size:12.800000190734863px"> 0x100021c029e0: 00 00 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9</span></div><div><span style="font-size:12.800000190734863px">=>0x100021c029f0: 00 00 00[f9]f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9</span></div><div><span style="font-size:12.800000190734863px"> 0x100021c02a00: f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9</span></div><div><span style="font-size:12.800000190734863px"> 0x100021c02a10: 00 00 00 00 f9 f9 f9 f9 00 00 00 00 00 00 f9 f9</span></div><div><span style="font-size:12.800000190734863px"> 0x100021c02a20: f9 f9 f9 f9 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9</span></div><div><span style="font-size:12.800000190734863px"> 0x100021c02a30: 00 00 00 00 f9 f9 f9 f9 00 00 00 00 00 00 f9 f9</span></div><div><span style="font-size:12.800000190734863px"> 0x100021c02a40: f9 f9 f9 f9 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9</span></div><div><span style="font-size:12.800000190734863px">Shadow byte legend (one shadow byte represents 8 application bytes):</span></div><div><span style="font-size:12.800000190734863px"> Addressable: 00</span></div><div><span style="font-size:12.800000190734863px"> Partially addressable: 01 02 03 04 05 06 07 </span></div><div><span style="font-size:12.800000190734863px"> Heap left redzone: fa</span></div><div><span style="font-size:12.800000190734863px"> Freed heap region: fd</span></div><div><span style="font-size:12.800000190734863px"> Stack left redzone: f1</span></div><div><span style="font-size:12.800000190734863px"> Stack mid redzone: f2</span></div><div><span style="font-size:12.800000190734863px"> Stack right redzone: f3</span></div><div><span style="font-size:12.800000190734863px"> Stack after return: f5</span></div><div><span style="font-size:12.800000190734863px"> Stack use after scope: f8</span></div><div><span style="font-size:12.800000190734863px"> Global redzone: f9</span></div><div><span style="font-size:12.800000190734863px"> Global init order: f6</span></div><div><span style="font-size:12.800000190734863px"> Poisoned by user: f7</span></div><div><span style="font-size:12.800000190734863px"> Container overflow: fc</span></div><div><span style="font-size:12.800000190734863px"> Array cookie: ac</span></div><div><span style="font-size:12.800000190734863px"> Intra object redzone: bb</span></div><div><span style="font-size:12.800000190734863px"> ASan internal: fe</span></div><div><span style="font-size:12.800000190734863px"> Left alloca redzone: ca</span></div><div><span style="font-size:12.800000190734863px"> Right alloca redzone: cb</span></div><div><span style="font-size:12.800000190734863px">==32235==ABORTING</span></div><div><span style="font-size:12.800000190734863px">Stack dump:</span></div><div><span style="font-size:12.800000190734863px">0.<span class="gmail-Apple-tab-span" style="white-space:pre"> </span>Program arguments: /Users/buildslave/jenkins/sharedspace/clang-stage2-cmake-RgSan@2/clang-build/./bin/llvm-mc -arch=amdgcn -mcpu=bonaire -show-encoding /Users/buildslave/jenkins/sharedspace/clang-stage2-cmake-RgSan@2/llvm/test/MC/AMDGPU/gfx7_asm_all.s </span></div><div><span style="font-size:12.800000190734863px">/Users/buildslave/jenkins/sharedspace/clang-stage2-cmake-RgSan@2/llvm/test/MC/AMDGPU/gfx7_asm_all.s:1183:11: error: expected string not found in input</span></div><div><span style="font-size:12.800000190734863px">// CHECK: [0xff,0xff,0xfe,0xd8,0xff,0x00,0x00,0x00]</span></div><div><span style="font-size:12.800000190734863px"> ^</span></div><div><span style="font-size:12.800000190734863px"><stdin>:1182:1: note: scanning from here</span></div><div><span style="font-size:12.800000190734863px"><br></span></div><div><span style="font-size:12.800000190734863px">^</span></div><div><span style="font-size:12.800000190734863px"><br></span></div><div><span style="font-size:12.800000190734863px">--</span></div><div><span style="font-size:12.800000190734863px"><br></span></div><div><span style="font-size:12.800000190734863px">********************</span></div></div><div><div><br></div><div>Can you please fix this issue? Let me know if you need anything else.</div><div><br></div><div><div>Thanks,</div></div></div><div>Alex</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 30 January 2017 at 21:59, Artem Tamazov 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: artem.tamazov<br>
Date: Mon Jan 30 15:59:21 2017<br>
New Revision: 293552<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=293552&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=293552&view=rev</a><br>
Log:<br>
Reapply [AMDGPU][mc][tests][NFC] Add coverage/smoke tests for Gfx7 and Gfx8.<br>
<br>
Added:<br>
llvm/trunk/test/MC/AMDGPU/<wbr>gfx7_asm_all.s<br>
llvm/trunk/test/MC/AMDGPU/<wbr>gfx8_asm_all.s<br>
llvm/trunk/test/MC/<wbr>Disassembler/AMDGPU/gfx8_dasm_<wbr>all.txt<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">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/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>