<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Segfault in compiler while processing ternary operator with void arguments"
href="https://bugs.freedesktop.org/show_bug.cgi?id=85252#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Segfault in compiler while processing ternary operator with void arguments"
href="https://bugs.freedesktop.org/show_bug.cgi?id=85252">bug 85252</a>
from <span class="vcard"><a class="email" href="mailto:gauber_r@epita.fr" title="Renaud Gaubert <gauber_r@epita.fr>"> <span class="fn">Renaud Gaubert</span></a>
</span></b>
<pre>(In reply to Ian Romanick from <a href="show_bug.cgi?id=85252#c0">comment #0</a>)
<span class="quote">> Created <span class=""><a href="attachment.cgi?id=108126" name="attach_108126" title="Test case">attachment 108126</a> <a href="attachment.cgi?id=108126&action=edit" title="Test case">[details]</a></span>
> Test case
>
> The attached test (also sent to the piglit list) segfaults in ast_to_hir.
> gdb output below.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff3c429b3 in ast_expression::do_hir (this=0xae4738,
> instructions=0xa4dc80, state=0xab6ef8, needs_rvalue=<optimized out>)
> at ../../src/glsl/ast_to_hir.cpp:1574
> 1574 if ((!apply_implicit_conversion(op[1]->type, op[2], state)
> Missing separate debuginfos, use: debuginfo-install
> expat-2.1.0-4.fc18.x86_64 glibc-2.16-34.fc18.x86_64
> libgcc-4.7.2-8.fc18.x86_64 libstdc++-4.7.2-8.fc18.x86_64
> mesa-libGLU-9.0.0-1.fc18.x86_64 systemd-libs-201-2.fc18.9.x86_64
> (gdb) bt
> #0 0x00007ffff3c429b3 in ast_expression::do_hir (this=0xae4738,
> instructions=0xa4dc80, state=0xab6ef8, needs_rvalue=<optimized out>)
> at ../../src/glsl/ast_to_hir.cpp:1574
> #1 0x00007ffff3c44663 in ast_expression_statement::hir (this=<optimized
> out>,
> instructions=<optimized out>, state=<optimized out>)
> at ../../src/glsl/ast_to_hir.cpp:1829
> #2 0x00007ffff3c446af in ast_compound_statement::hir (this=0xae4858,
> instructions=0xa4dc80, state=0xab6ef8)
> at ../../src/glsl/ast_to_hir.cpp:1845
> #3 0x00007ffff3c46a61 in ast_function_definition::hir (this=0xae48d8,
> instructions=<optimized out>, state=0xab6ef8)
> at ../../src/glsl/ast_to_hir.cpp:4239
> #4 0x00007ffff3c414c0 in _mesa_ast_to_hir (instructions=0xa9cd78,
> state=0xab6ef8) at ../../src/glsl/ast_to_hir.cpp:100
> #5 0x00007ffff3c97ffb in _mesa_glsl_compile_shader (
> ctx=ctx@entry=0x7ffff3963038, shader=shader@entry=0xa9d5e8,
> dump_ast=dump_ast@entry=false, dump_hir=dump_hir@entry=false)
> at ../../src/glsl/glsl_parser_extras.cpp:1465
> #6 0x00007ffff3af7fcc in compile_shader (ctx=0x7ffff3963038,
> shaderObj=<optimized out>) at ../../src/mesa/main/shaderapi.c:852
> #7 0x00007ffff7cfc75f in stub_glCompileShader (shader=1)
> at tests/util/piglit-dispatch-gen.c:6375
> #8 0x0000000000405598 in compile_glsl (target=35633)
> at tests/shaders/shader_runner.c:326
> #9 0x00000000004061b7 in leave_state (state=vertex_shader,
> line=0xaa4840 "[fragment shader]\n\nvarying vec4 c;\nuniform bool
> b;\n\nvoid good(void)\n{\n gl_FragColor = c;\n}\n\nvoid bad(void)\n{\n
> gl_FragColor = c + vec4(0, 0, 1, 0);\n}\n\nvoid main()\n{\n b ? good() :
> bad();\n}\n\n[te"...) at tests/shaders/shader_runner.c:706
> #10 0x00000000004067f9 in process_test_script (
> script_name=0x7fffffffe25c
> "tests/spec/glsl-1.10/execution/void-ternary.shader_test") at
> tests/shaders/shader_runner.c:900
> #11 0x000000000040b2a9 in piglit_init (argc=2, argv=0x7fffffffded8)
> at tests/shaders/shader_runner.c:2685
> #12 0x00007ffff7d87224 in run_test (gl_fw=0x612010, argc=2,
> argv=0x7fffffffded8)
> at tests/util/piglit-framework-gl/piglit_winsys_framework.c:72
> #13 0x00007ffff7d6c86b in piglit_gl_test_run (argc=2, argv=0x7fffffffded8,
> config=0x7fffffffdda0) at tests/util/piglit-framework-gl.c:151
> #14 0x0000000000404ef2 in main (argc=2, argv=0x7fffffffded8)
> at tests/shaders/shader_runner.c:60</span >
This should be fixed with the following proposed patch on mesa-dev:
<a href="http://lists.freedesktop.org/archives/mesa-dev/2015-July/088312.html">http://lists.freedesktop.org/archives/mesa-dev/2015-July/088312.html</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>