<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 - Segmentation fault when running shader on Intel Mesa"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=111009">111009</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Segmentation fault when running shader on Intel Mesa
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>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/DRI/i965
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jiradet.jd@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=144650" name="attach_144650" title="The shader containing code that produces an error and the stack trace by catchsegv.">attachment 144650</a> <a href="attachment.cgi?id=144650&action=edit" title="The shader containing code that produces an error and the stack trace by catchsegv.">[details]</a></span>
The shader containing code that produces an error and the stack trace by
catchsegv.

I ran a piglit shader test with the following fragment shader which should
render the red solid color image. However, I got an error: Segmentation fault
(core dumped). The attachment are the shader and the log obtained when running
shader runner with catchsegv tool (by using command “catchsegv
./bin/shader_runner_gles3 shaders/sample.shader_test”).

void main()
{
 for(
     int _injected_loop_counter = 0;
     1 != int((injectionSwitch.y));
     1
 )
  {
   if(gl_FragCoord.y < 0.0)
    {
     return;
    }
  }
 do
  {
   _GLF_color = vec4(1.0, 0.0, 0.0, 1.0);
   if(gl_FragCoord.x < 0.0)
    {
     discard;
    }
  }
 while(0.0 > injectionSwitch.y);
}

[test]
uniform vec2 injectionSwitch 0.0 1.0
draw rect -1 -1 2 2


Steps to reproduce:
-------------------------------------------------------------------------------
1. Obtain and build piglit, the Mesa OpenGL test suite runner:
<a href="https://gitlab.freedesktop.org/mesa/piglit">https://gitlab.freedesktop.org/mesa/piglit</a>
2. Download the attached archive.
3. From a terminal, execute the supplied tests with the piglit GLES3 shader
runner: 
$ bin/shader_runner_gles3 result.shader_test


Build & PC specs:
-------------------------------------------------------------------------------
CPU: Intel Core i7-2860QM
GPU: Intel Sandybridge Mobile

OS: Ubuntu 18.04.2 LTS
libdrm: git-46cb2aa1ede16380df2d965ca125d855c4278823 (most recent as of this
writing)
Mesa: git-d19fe5e67a3945582448748c72b10fd5029d2ed5 (most recent as of this
writing)
Linux kernel version: 4.18.0-20-generic

This bug was found with GraphicsFuzz: <a href="https://github.com/google/graphicsfuzz">https://github.com/google/graphicsfuzz</a></pre>
        </div>
      </p>


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

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