SIGSEGV src/compiler/glsl/ast_function.cpp:53
This shader triggers a crash in the GLSL compiler.
void f(int i) {}
void main()
{
f(1 += 2 % 3);
}
Program received signal SIGSEGV, Segmentation fault.
0x0000555555690460 in process_parameters (instructions=0x555555cd64f0, actual_parameters=0x7fffffffde80, parameters=0x555555cca6a8, state=0x555555cc57f0)
at src/compiler/glsl/ast_function.cpp:53
53 result->constant_expression_value(mem_ctx);
(gdb) bt
#0 0x0000555555690460 in process_parameters (instructions=0x555555cd64f0, actual_parameters=0x7fffffffde80, parameters=0x555555cca6a8, state=0x555555cc57f0)
at src/compiler/glsl/ast_function.cpp:53
#1 0x000055555569762b in ast_function_expression::hir (this=0x555555cca648, instructions=0x555555cd64f0, state=0x555555cc57f0) at src/compiler/glsl/ast_function.cpp:2352
#2 0x000055555569a199 in ast_function_expression::hir_no_rvalue (this=0x555555cca648, instructions=0x555555cd64f0, state=0x555555cc57f0)
at src/compiler/glsl/ast_to_hir.cpp:1092
#3 0x000055555569df88 in ast_expression_statement::hir (this=0x555555cca9d8, instructions=0x555555cd64f0, state=0x555555cc57f0) at src/compiler/glsl/ast_to_hir.cpp:2239
#4 0x000055555569e003 in ast_compound_statement::hir (this=0x555555ccaa20, instructions=0x555555cd64f0, state=0x555555cc57f0) at src/compiler/glsl/ast_to_hir.cpp:2255
#5 0x00005555556a6cd6 in ast_function_definition::hir (this=0x555555ccaa88, instructions=0x555555cca040, state=0x555555cc57f0) at src/compiler/glsl/ast_to_hir.cpp:6321
#6 0x00005555556982f8 in _mesa_ast_to_hir (instructions=0x555555cca040, state=0x555555cc57f0) at src/compiler/glsl/ast_to_hir.cpp:159
#7 0x00005555555e44cc in _mesa_glsl_compile_shader (ctx=0x555555750da0 <main::local_ctx>, shader=0x555555cc33b0, dump_ast=false, dump_hir=false, force_recompile=true)
at src/compiler/glsl/glsl_parser_extras.cpp:2212
#8 0x000055555557f876 in compile_shader (ctx=0x555555750da0 <main::local_ctx>, shader=0x555555cc33b0) at src/compiler/glsl/standalone.cpp:398
#9 0x000055555557fefa in standalone_compile_shader (_options=0x555555750d80 <options>, num_files=1, files=0x7fffffffe430, ctx=0x555555750da0 <main::local_ctx>)
at src/compiler/glsl/standalone.cpp:509
#10 0x00005555555813fa in main (argc=4, argv=0x7fffffffe418) at src/compiler/glsl/main.cpp:98
(gdb) frame 0
#0 0x0000555555690460 in process_parameters (instructions=0x555555cd64f0, actual_parameters=0x7fffffffde80, parameters=0x555555cca6a8, state=0x555555cc57f0)
at src/compiler/glsl/ast_function.cpp:53
53 result->constant_expression_value(mem_ctx);
(gdb) print result
$1 = (ir_rvalue *) 0x0
d1fa69ed61d5aebeb69ce8a415c098035a953d48 is the first bad commit
commit d1fa69ed61d5aebeb69ce8a415c098035a953d48
Author: Tapani Pälli <tapani.palli@intel.com>
Date: Tue Sep 25 17:04:40 2018 +0300
glsl: do not attempt assignment if operand type not parsed correctly
v2: check types of both operands (Ian)
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108012
:040000 040000 931a2f24e9f98030a55e8f47f2ae8e73e80d5e46 d3cce6e33325dc1d3777900b3a5ee62db4da7cf1 M src
bisect run success
cc: @tpalli