[Bug 85252] Segfault in compiler while processing ternary operator with void arguments

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jul 7 13:31:23 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=85252

--- Comment #1 from Renaud Gaubert <gauber_r at epita.fr> ---
(In reply to Ian Romanick from comment #0)
> Created attachment 108126 [details]
> 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 at entry=0x7ffff3963038, shader=shader at entry=0xa9d5e8, 
>     dump_ast=dump_ast at entry=false, dump_hir=dump_hir at 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

This should be fixed with the following proposed patch on mesa-dev:
http://lists.freedesktop.org/archives/mesa-dev/2015-July/088312.html

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20150707/764dd444/attachment.html>


More information about the intel-3d-bugs mailing list