<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 - vulkaninfo fails with "trap divide error""
   href="https://bugs.freedesktop.org/show_bug.cgi?id=102571">102571</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>vulkaninfo fails with "trap divide error"
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>git
          </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/Vulkan/radeon
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>danielrf12@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=134033" name="attach_134033" title="backtrace of vulkaninfo crash">attachment 134033</a> <a href="attachment.cgi?id=134033&action=edit" title="backtrace of vulkaninfo crash">[details]</a></span>
backtrace of vulkaninfo crash

While testing vulkan support for my 390x on git master, I ran across the
following issue.

Running vulkaninfo crashes and this line shows up in the journal:
traps: vulkaninfo[30227] trap divide error ip:7f9777251563 sp:7fff7aa100e8
error:0 in libvulkan_radeon.so[7f97771ed000+1a5000]

I also ran git-bisect, which indicates that this issue was caused by the commit
180c1b924e1ed3a2918fad9c5cbb653524de8233

Attached is a backtrace of when it crashes, which is in
radv_pipeline_scratch_init of src/vulkan/radv_pipeline.c. The only divide by
zero error that looks possible in that function is on line 763 if
pipeline->shaders[i]->config.num_vgprs is zero.

Additional information:
Running 4.13.0 kernel on NixOS</pre>
        </div>
      </p>


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

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