[llvm] r293552 - Reapply [AMDGPU][mc][tests][NFC] Add coverage/smoke tests for Gfx7 and Gfx8.

Alex L via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 07:17:15 PST 2017


On 31 January 2017 at 14:59, Tamazov, Artem <Artem.Tamazov at amd.com> wrote:

> Hello Alex,
>
>
>
> Oops, thanks for informing. This is my 2nd attempt to commit these tests,
> and it fails with sanitizers again(((
>
> I definitely need to run these tests with sanitizers prior committing.
>
>
>
> These sanitizers are new for me, so I would appreciate if you let me know
> how can set up these tools locally.
>
> I have both Ubuntu and Windows machines on hand.
>

Sure! I don't know about Windows, but I think Linux supports
AddressSanitizer so it should be possible to reproduce the issue on Ubuntu.
You can compile LLVM with AddressSanitizer enabled by passing
in '-DLLVM_USE_SANITIZER=Address;' to cmake. Then when you run the test it
should crash with a similar error reported by AddressSanitizer.

Alex


>
>
> For now, I am going to revert tests, because triaging & fixing the issue
> in AMDGPU backed would take time.
>
>
>
> Regards,
>
> artem//
>
>
>
> *From:* Alex L [mailto:arphaman at gmail.com]
> *Sent:* 31 January 2017 г. 17:07
> *To:* Tamazov, Artem
> *Cc:* Alex Lorenz via llvm-commits
> *Subject:* Re: [llvm] r293552 - Reapply [AMDGPU][mc][tests][NFC] Add
> coverage/smoke tests for Gfx7 and Gfx8.
>
>
>
> Hi Artem,
>
>
>
> The test "gfx7_asm_all.s" is failing because of a global-buffer-overflow
> AddressSanitizer error on our Asan+Ubsan bot at http://lab.llvm.org:8080/
> green/job/clang-stage2-cmake-RgSan/. The output of the failing test that
> I obtained from http://lab.llvm.org:8080/green/job/clang-stage2-cmake-
> RgSan_check/2915/consoleFull is shown below:
>
>
>
> Command Output (stderr):
>
> --
>
> =================================================================
>
> ==32235==ERROR: AddressSanitizer: global-buffer-overflow on address
> 0x00010e014f9b at pc 0x00010da57431 bp 0x7fff52d782b0 sp 0x7fff52d782a8
>
> READ of size 1 at 0x00010e014f9b thread T0
>
>     #0 0x10da57430 in llvm::AMDGPU::isSISrcOperand(llvm::MCInstrDesc
> const&, unsigned int) AMDGPUBaseInfo.cpp:339
>
>     #1 0x10d18e6bc in (anonymous namespace)::AMDGPUOperand::addImmOperands(llvm::MCInst&,
> unsigned int, bool) const AMDGPUAsmParser.cpp:1111
>
>     #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
>
>     #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
>
>     #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
>
>     #5 0x10d8799e5 in (anonymous namespace)::AsmParser::parseStatement((anonymous
> namespace)::ParseStatementInfo&, llvm::MCAsmParserSemaCallback*)
> AsmParser.cpp:2060
>
>     #6 0x10d8631c5 in (anonymous namespace)::AsmParser::Run(bool, bool)
> AsmParser.cpp:754
>
>     #7 0x10ce85ec2 in main llvm-mc.cpp:437
>
>     #8 0x7fff93aba5ac in start (libdyld.dylib:x86_64+0x35ac)
>
>
>
> 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
>
> 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
>
> SUMMARY: AddressSanitizer: global-buffer-overflow AMDGPUBaseInfo.cpp:339
> in llvm::AMDGPU::isSISrcOperand(llvm::MCInstrDesc const&, unsigned int)
>
> Shadow bytes around the buggy address:
>
>   0x100021c029a0: 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 f9
>
>   0x100021c029b0: f9 f9 f9 f9 00 00 00 00 f9 f9 f9 f9 00 00 00 00
>
>   0x100021c029c0: f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
>
>   0x100021c029d0: 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 00 00 00 00
>
>   0x100021c029e0: 00 00 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9
>
> =>0x100021c029f0: 00 00 00[f9]f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9
>
>   0x100021c02a00: f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
>
>   0x100021c02a10: 00 00 00 00 f9 f9 f9 f9 00 00 00 00 00 00 f9 f9
>
>   0x100021c02a20: f9 f9 f9 f9 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9
>
>   0x100021c02a30: 00 00 00 00 f9 f9 f9 f9 00 00 00 00 00 00 f9 f9
>
>   0x100021c02a40: f9 f9 f9 f9 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9
>
> 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
>
> ==32235==ABORTING
>
> Stack dump:
>
> 0.            Program arguments: /Users/buildslave/jenkins/
> sharedspace/clang-stage2-cmake-RgSan at 2/clang-build/./bin/llvm-mc
> -arch=amdgcn -mcpu=bonaire -show-encoding /Users/buildslave/jenkins/
> sharedspace/clang-stage2-cmake-RgSan at 2/llvm/test/MC/AMDGPU/gfx7_asm_all.s
>
> /Users/buildslave/jenkins/sharedspace/clang-stage2-
> cmake-RgSan at 2/llvm/test/MC/AMDGPU/gfx7_asm_all.s:1183:11: error: expected
> string not found in input
>
> // CHECK: [0xff,0xff,0xfe,0xd8,0xff,0x00,0x00,0x00]
>
>           ^
>
> <stdin>:1182:1: note: scanning from here
>
>
>
> ^
>
>
>
> --
>
>
>
> ********************
>
>
>
> Can you please fix this issue? Let me know if you need anything else.
>
>
>
> Thanks,
>
> Alex
>
>
>
> On 30 January 2017 at 21:59, Artem Tamazov via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
> Author: artem.tamazov
> Date: Mon Jan 30 15:59:21 2017
> New Revision: 293552
>
> URL: http://llvm.org/viewvc/llvm-project?rev=293552&view=rev
> Log:
> Reapply [AMDGPU][mc][tests][NFC] Add coverage/smoke tests for Gfx7 and
> Gfx8.
>
> Added:
>     llvm/trunk/test/MC/AMDGPU/gfx7_asm_all.s
>     llvm/trunk/test/MC/AMDGPU/gfx8_asm_all.s
>     llvm/trunk/test/MC/Disassembler/AMDGPU/gfx8_dasm_all.txt
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170131/3784e0de/attachment.html>


More information about the llvm-commits mailing list