From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 100067] [OpenCL] const int in argument list crashes build
Date: Sun, 05 Mar 2017 18:53:03 +0000
Message-ID:
Bug ID
100067
Summary
[OpenCL] const int in argument list crashes build
Product
Mesa
Version
17.0
Hardware
x86-64 (AMD64)
OS
Linux (All)
Status
NEW
Severity
normal
Priority
medium
Component
Drivers/Gallium/radeonsi
Assignee
dri-devel@lists.freedesktop.org
Reporter
mastner@hotmail.com
QA Contact
dri-devel@lists.freedesktop.org
When running the program:
https://github.com/CNugteren/myGEMM/blob/master/extra/minimal.cpp
it crashes. valgrind output is:
valgrind ./minimal=20
=3D=3D3618=3D=3D Memcheck, a memory error detector
=3D=3D3618=3D=3D Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward e=
t al.
=3D=3D3618=3D=3D Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyri=
ght info
=3D=3D3618=3D=3D Command: ./minimal
=3D=3D3618=3D=3D=20
>>> Initializing OpenCL...
% Device: AMD TONGA (DRM 3.8.0 / 4.9.11-1-ARCH, LLVM 3.9.1), 7253.7 MiB mem=
ory,
max allocation 1813.4 MiB, driver 17.0.1
=3D=3D3618=3D=3D Invalid read of size 1
=3D=3D3618=3D=3D at 0xAACAB18:
llvm::SIInstrInfo::getInstSizeInBytes(llvm::MachineInstr const&) const =
(in
/usr/lib/libLLVM-3.9.so)
=3D=3D3618=3D=3D by 0xAA5F550:
llvm::AMDGPUAsmPrinter::getSIProgramInfo(llvm::AMDGPUAsmPrinter::SIProgramI=
nfo&,
llvm::MachineFunction const&) const (in /usr/lib/libLLVM-3.9.so)
=3D=3D3618=3D=3D by 0xAA625B9:
llvm::AMDGPUAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (in
/usr/lib/libLLVM-3.9.so)
=3D=3D3618=3D=3D by 0x9D591D0:
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (in
/usr/lib/libLLVM-3.9.so)
=3D=3D3618=3D=3D by 0x9BF17C1: llvm::FPPassManager::runOnFunction(llvm::=
Function&)
(in /usr/lib/libLLVM-3.9.so)
=3D=3D3618=3D=3D by 0x9BF1B4A: llvm::FPPassManager::runOnModule(llvm::Mo=
dule&) (in
/usr/lib/libLLVM-3.9.so)
=3D=3D3618=3D=3D by 0x9BF1E73: llvm::legacy::PassManagerImpl::run(llvm::=
Module&) (in
/usr/lib/libLLVM-3.9.so)
=3D=3D3618=3D=3D by 0x7CB9742: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
=3D=3D3618=3D=3D by 0x7CB9D5F: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
=3D=3D3618=3D=3D by 0x7CB611D: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
=3D=3D3618=3D=3D by 0x7CA7AF8: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
=3D=3D3618=3D=3D by 0x7C859CB: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
=3D=3D3618=3D=3D Address 0x400c07ab25 is not stack'd, malloc'd or (recentl=
y) free'd
=3D=3D3618=3D=3D=20
=3D=3D3618=3D=3D=20
=3D=3D3618=3D=3D Process terminating with default action of signal 11 (SIGS=
EGV):
dumping core
=3D=3D3618=3D=3D Access not within mapped region at address 0x400C07AB25
=3D=3D3618=3D=3D at 0xAACAB18:
llvm::SIInstrInfo::getInstSizeInBytes(llvm::MachineInstr const&) const =
(in
/usr/lib/libLLVM-3.9.so)
=3D=3D3618=3D=3D by 0xAA5F550:
llvm::AMDGPUAsmPrinter::getSIProgramInfo(llvm::AMDGPUAsmPrinter::SIProgramI=
nfo&,
llvm::MachineFunction const&) const (in /usr/lib/libLLVM-3.9.so)
=3D=3D3618=3D=3D by 0xAA625B9:
llvm::AMDGPUAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (in
/usr/lib/libLLVM-3.9.so)
=3D=3D3618=3D=3D by 0x9D591D0:
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (in
/usr/lib/libLLVM-3.9.so)
=3D=3D3618=3D=3D by 0x9BF17C1: llvm::FPPassManager::runOnFunction(llvm::=
Function&)
(in /usr/lib/libLLVM-3.9.so)
=3D=3D3618=3D=3D by 0x9BF1B4A: llvm::FPPassManager::runOnModule(llvm::Mo=
dule&) (in
/usr/lib/libLLVM-3.9.so)
=3D=3D3618=3D=3D by 0x9BF1E73: llvm::legacy::PassManagerImpl::run(llvm::=
Module&) (in
/usr/lib/libLLVM-3.9.so)
=3D=3D3618=3D=3D by 0x7CB9742: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
=3D=3D3618=3D=3D by 0x7CB9D5F: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
=3D=3D3618=3D=3D by 0x7CB611D: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
=3D=3D3618=3D=3D by 0x7CA7AF8: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
=3D=3D3618=3D=3D by 0x7C859CB: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
=3D=3D3618=3D=3D If you believe this happened as a result of a stack
=3D=3D3618=3D=3D overflow in your program's main thread (unlikely but
=3D=3D3618=3D=3D possible), you can try to increase the size of the
=3D=3D3618=3D=3D main thread stack using the --main-stacksize=3D flag.
=3D=3D3618=3D=3D The main thread stack size used in this run was 8388608.
=3D=3D3618=3D=3D=20
=3D=3D3618=3D=3D HEAP SUMMARY:
=3D=3D3618=3D=3D in use at exit: 27,389,789 bytes in 3,698 blocks
=3D=3D3618=3D=3D total heap usage: 82,326 allocs, 78,628 frees, 58,257,51=
0 bytes
allocated
=3D=3D3618=3D=3D=20
=3D=3D3618=3D=3D LEAK SUMMARY:
=3D=3D3618=3D=3D definitely lost: 16 bytes in 2 blocks
=3D=3D3618=3D=3D indirectly lost: 0 bytes in 0 blocks
=3D=3D3618=3D=3D possibly lost: 245,866 bytes in 375 blocks
=3D=3D3618=3D=3D still reachable: 27,143,907 bytes in 3,321 blocks
=3D=3D3618=3D=3D of which reachable via heuristic:
=3D=3D3618=3D=3D newarray : 340,712 bytes=
in 7 blocks
=3D=3D3618=3D=3D multipleinheritance: 632 bytes in =
2 blocks
=3D=3D3618=3D=3D suppressed: 0 bytes in 0 blocks
=3D=3D3618=3D=3D Rerun with --leak-check=3Dfull to see details of leaked me=
mory
=3D=3D3618=3D=3D=20
=3D=3D3618=3D=3D For counts of detected and suppressed errors, rerun with: =
-v
=3D=3D3618=3D=3D ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 fro=
m 0)
Speicherzugriffsfehler (Speicherabzug geschrieben)
It does not so when the int arguments in the OpenCL kernel are changed
to unsigned int.