<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [OpenCL] const int in argument list crashes build"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=100067">100067</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[OpenCL] const int in argument list crashes build
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>17.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/Gallium/radeonsi
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mastner@hotmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When running the program:

<a href="https://github.com/CNugteren/myGEMM/blob/master/extra/minimal.cpp">https://github.com/CNugteren/myGEMM/blob/master/extra/minimal.cpp</a>

it crashes. valgrind output is:

valgrind ./minimal 
==3618== Memcheck, a memory error detector
==3618== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==3618== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==3618== Command: ./minimal
==3618== 
<span class="quote">>>> Initializing OpenCL...</span >
% Device: AMD TONGA (DRM 3.8.0 / 4.9.11-1-ARCH, LLVM 3.9.1), 7253.7 MiB memory,
max allocation 1813.4 MiB, driver  17.0.1
==3618== Invalid read of size 1
==3618==    at 0xAACAB18:
llvm::SIInstrInfo::getInstSizeInBytes(llvm::MachineInstr const&) const (in
/usr/lib/libLLVM-3.9.so)
==3618==    by 0xAA5F550:
llvm::AMDGPUAsmPrinter::getSIProgramInfo(llvm::AMDGPUAsmPrinter::SIProgramInfo&,
llvm::MachineFunction const&) const (in /usr/lib/libLLVM-3.9.so)
==3618==    by 0xAA625B9:
llvm::AMDGPUAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (in
/usr/lib/libLLVM-3.9.so)
==3618==    by 0x9D591D0:
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (in
/usr/lib/libLLVM-3.9.so)
==3618==    by 0x9BF17C1: llvm::FPPassManager::runOnFunction(llvm::Function&)
(in /usr/lib/libLLVM-3.9.so)
==3618==    by 0x9BF1B4A: llvm::FPPassManager::runOnModule(llvm::Module&) (in
/usr/lib/libLLVM-3.9.so)
==3618==    by 0x9BF1E73: llvm::legacy::PassManagerImpl::run(llvm::Module&) (in
/usr/lib/libLLVM-3.9.so)
==3618==    by 0x7CB9742: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
==3618==    by 0x7CB9D5F: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
==3618==    by 0x7CB611D: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
==3618==    by 0x7CA7AF8: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
==3618==    by 0x7C859CB: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
==3618==  Address 0x400c07ab25 is not stack'd, malloc'd or (recently) free'd
==3618== 
==3618== 
==3618== Process terminating with default action of signal 11 (SIGSEGV):
dumping core
==3618==  Access not within mapped region at address 0x400C07AB25
==3618==    at 0xAACAB18:
llvm::SIInstrInfo::getInstSizeInBytes(llvm::MachineInstr const&) const (in
/usr/lib/libLLVM-3.9.so)
==3618==    by 0xAA5F550:
llvm::AMDGPUAsmPrinter::getSIProgramInfo(llvm::AMDGPUAsmPrinter::SIProgramInfo&,
llvm::MachineFunction const&) const (in /usr/lib/libLLVM-3.9.so)
==3618==    by 0xAA625B9:
llvm::AMDGPUAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (in
/usr/lib/libLLVM-3.9.so)
==3618==    by 0x9D591D0:
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (in
/usr/lib/libLLVM-3.9.so)
==3618==    by 0x9BF17C1: llvm::FPPassManager::runOnFunction(llvm::Function&)
(in /usr/lib/libLLVM-3.9.so)
==3618==    by 0x9BF1B4A: llvm::FPPassManager::runOnModule(llvm::Module&) (in
/usr/lib/libLLVM-3.9.so)
==3618==    by 0x9BF1E73: llvm::legacy::PassManagerImpl::run(llvm::Module&) (in
/usr/lib/libLLVM-3.9.so)
==3618==    by 0x7CB9742: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
==3618==    by 0x7CB9D5F: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
==3618==    by 0x7CB611D: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
==3618==    by 0x7CA7AF8: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
==3618==    by 0x7C859CB: ??? (in /usr/lib/libMesaOpenCL.so.1.0.0)
==3618==  If you believe this happened as a result of a stack
==3618==  overflow in your program's main thread (unlikely but
==3618==  possible), you can try to increase the size of the
==3618==  main thread stack using the --main-stacksize= flag.
==3618==  The main thread stack size used in this run was 8388608.
==3618== 
==3618== HEAP SUMMARY:
==3618==     in use at exit: 27,389,789 bytes in 3,698 blocks
==3618==   total heap usage: 82,326 allocs, 78,628 frees, 58,257,510 bytes
allocated
==3618== 
==3618== LEAK SUMMARY:
==3618==    definitely lost: 16 bytes in 2 blocks
==3618==    indirectly lost: 0 bytes in 0 blocks
==3618==      possibly lost: 245,866 bytes in 375 blocks
==3618==    still reachable: 27,143,907 bytes in 3,321 blocks
==3618==                       of which reachable via heuristic:
==3618==                         newarray           : 340,712 bytes in 7 blocks
==3618==                         multipleinheritance: 632 bytes in 2 blocks
==3618==         suppressed: 0 bytes in 0 blocks
==3618== Rerun with --leak-check=full to see details of leaked memory
==3618== 
==3618== For counts of detected and suppressed errors, rerun with: -v
==3618== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Speicherzugriffsfehler (Speicherabzug geschrieben)

It does not so when the int arguments in the OpenCL kernel are changed
to unsigned int.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>