<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 - glsl/ir.cpp:1376: ir_dereference_variable::ir_dereference_variable(ir_variable*): Assertion `var != NULL' failed."
href="https://bugs.freedesktop.org/show_bug.cgi?id=100438">100438</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>glsl/ir.cpp:1376: ir_dereference_variable::ir_dereference_variable(ir_variable*): Assertion `var != NULL' failed.
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>11.1
</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>Keywords</th>
<td>bisected, regression
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>glsl-compiler
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>vlee@freedesktop.org
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>CC</th>
<td>airlied@freedesktop.org, t_arceri@yahoo.com.au
</td>
</tr></table>
<p>
<div>
<pre>mesa: 7ee91af30074a4381e4353122319e3b4b3fe7cbd (master 17.1.0-devel)
This GLSL shader triggers an assert.
void main()
{
a[b](c);
}
$ ./src/compiler/glsl_compiler --version 110 test.frag
glsl_compiler: glsl/ir.cpp:1376:
ir_dereference_variable::ir_dereference_variable(ir_variable*): Assertion `var
!= NULL' failed.
Aborted (core dumped)
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
#1 0x00007f4f4e7363ea in __GI_abort () at abort.c:89
#2 0x00007f4f4e72cbb7 in __assert_fail_base (fmt=<optimized out>,
assertion=assertion@entry=0x56396212559c "var != NULL",
file=file@entry=0x56396210d127 "glsl/ir.cpp", line=line@entry=1376,
function=function@entry=0x56396210dfa0
<ir_dereference_variable::ir_dereference_variable(ir_variable*)::__PRETTY_FUNCTION__>
"ir_dereference_variable::ir_dereference_variable(ir_variable*)") at
assert.c:92
#3 0x00007f4f4e72cc62 in __GI___assert_fail
(assertion=assertion@entry=0x56396212559c "var != NULL",
file=file@entry=0x56396210d127 "glsl/ir.cpp", line=line@entry=1376,
function=function@entry=0x56396210dfa0
<ir_dereference_variable::ir_dereference_variable(ir_variable*)::__PRETTY_FUNCTION__>
"ir_dereference_variable::ir_dereference_variable(ir_variable*)") at
assert.c:101
#4 0x0000563962038087 in ir_dereference_variable::ir_dereference_variable
(var=0x0, this=<optimized out>) at glsl/ir.cpp:1376
#5 0x0000563962077f67 in ir_dereference_variable::ir_dereference_variable
(var=0x0, this=<optimized out>) at ../../src/compiler/glsl/list.h:58
#6 ir_dereference_array::ir_dereference_array (this=0x56396387c710, var=0x0,
array_index=0x56396387c530) at glsl/ir.cpp:1399
#7 0x0000563962101144 in generate_array_index
(mem_ctx=mem_ctx@entry=0x56396386cc40,
instructions=instructions@entry=0x56396387c4a0,
state=state@entry=0x56396386cc40, loc=..., array=<optimized out>,
idx=<optimized out>, function_name=function_name@entry=0x7ffdbdfbcf50,
actual_parameters=0x7ffdbdfbcfc0) at glsl/ast_function.cpp:668
#8 0x00005639621051eb in ast_function_expression::hir (this=0x56396386df68,
instructions=0x56396387c4a0, state=0x56396386cc40) at
glsl/ast_function.cpp:2191
#9 0x00005639620c2273 in ast_expression_statement::hir (this=<optimized out>,
instructions=<optimized out>, state=<optimized out>) at
glsl/ast_to_hir.cpp:2201
#10 0x00005639620c22cf in ast_compound_statement::hir (this=0x56396386e0d8,
instructions=0x56396387c4a0, state=0x56396386cc40) at glsl/ast_to_hir.cpp:2217
#11 0x00005639620c8a6c in ast_function_definition::hir (this=0x56396386e138,
instructions=<optimized out>, state=0x56396386cc40) at glsl/ast_to_hir.cpp:5845
#12 0x00005639620bee28 in _mesa_ast_to_hir (instructions=0x56396386e8b0,
state=state@entry=0x56396386cc40) at glsl/ast_to_hir.cpp:155
#13 0x000056396206ff5f in _mesa_glsl_compile_shader
(ctx=ctx@entry=0x5639623687a0 <standalone_compile_shader::local_ctx>,
shader=shader@entry=0x56396386ad10, dump_ast=<optimized out>,
dump_hir=<optimized out>, force_recompile=force_recompile@entry=true)
at glsl/glsl_parser_extras.cpp:1984
#14 0x000056396203c2cc in compile_shader (ctx=ctx@entry=0x5639623687a0
<standalone_compile_shader::local_ctx>, shader=shader@entry=0x56396386ad10) at
glsl/standalone.cpp:385
#15 0x000056396203c6fb in standalone_compile_shader (_options=<optimized out>,
num_files=<optimized out>, files=<optimized out>) at glsl/standalone.cpp:488
#16 0x0000563962038cdb in main (argc=<optimized out>, argv=0x7ffdbdfbd498) at
glsl/main.cpp:92
(gdb) frame 4
#4 0x0000563962038087 in ir_dereference_variable::ir_dereference_variable
(var=0x0, this=<optimized out>) at glsl/ir.cpp:1376
1376 assert(var != NULL);
(gdb) print var
$1 = (ir_variable *) 0x0
fd01840c0bd3b22d058a65a17ad30e3b45813b60 is the first bad commit
commit fd01840c0bd3b22d058a65a17ad30e3b45813b60
Author: Timothy Arceri <<a href="mailto:t_arceri@yahoo.com.au">t_arceri@yahoo.com.au</a>>
Date: Wed Aug 5 15:49:22 2015 +1000
glsl: add AoA support to subroutines
process_parameters() will now be called earlier because we need
actual_parameters processed earlier so we can use it with
match_subroutine_by_name() to get the subroutine variable, we need
to do this inside the recursive function generate_array_index() because
we can't create the ir_dereference_array() until we have gotten to the
outermost array.
For the remainder of the array dimensions the type doesn't matter so we
can just use the existing _mesa_ast_array_index_to_hir() function to
process the ast.
Reviewed-by: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>>
:040000 040000 6fd2725cb11bcd8a8339a426017a93474d8fe261
dd66f0eaee3f686a47397a886d25917ed452397e M src
bisect run success</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>