[Mesa-dev] [Bug 107550] "0[2]" as function parameter hits assert

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Aug 12 17:40:55 UTC 2018


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

            Bug ID: 107550
           Summary: "0[2]" as function parameter hits assert
           Product: Mesa
           Version: git
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: glsl-compiler
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: karolherbst at gmail.com
        QA Contact: intel-3d-bugs at lists.freedesktop.org

Created attachment 141050
  --> https://bugs.freedesktop.org/attachment.cgi?id=141050&action=edit
shader.frag

gdb output:

glsl_compiler: ../src/compiler/glsl/ir.cpp:1094: ir_constant*
ir_constant::get_array_element(unsigned int) const: Assertion
`this->type->is_array()' failed.

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50        return ret;
#0  __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff6cc45c1 in __GI_abort () at abort.c:79
#2  0x00007ffff6cc4491 in __assert_fail_base (fmt=0x7ffff6e27248 "%s%s%s:%u:
%s%sAssertion `%s' failed.\n%n", assertion=0x545a54 "this->type->is_array()",
file=0x544b92 "../src/compiler/glsl/ir.cpp", 
    line=1094, function=0x546a20 <ir_constant::get_array_element(unsigned int)
const::__PRETTY_FUNCTION__> "ir_constant*
ir_constant::get_array_element(unsigned int) const") at assert.c:92
#3  0x00007ffff6cd2752 in __GI___assert_fail (assertion=0x545a54
"this->type->is_array()", file=0x544b92 "../src/compiler/glsl/ir.cpp",
line=1094, 
    function=0x546a20 <ir_constant::get_array_element(unsigned int)
const::__PRETTY_FUNCTION__> "ir_constant*
ir_constant::get_array_element(unsigned int) const") at assert.c:101
#4  0x0000000000464d60 in ir_constant::get_array_element (this=0xc24390, i=2)
at ../src/compiler/glsl/ir.cpp:1094
#5  0x00000000004610ad in ir_dereference_array::constant_expression_value
(this=0xc245f0, mem_ctx=0x7de6e0, variable_context=0x0) at
../src/compiler/glsl/ir_constant_expression.cpp:831
#6  0x00000000004ec22a in process_parameters (instructions=0xc24300,
actual_parameters=0x7fffffffd5f0, parameters=0x7df9c8, state=0x7de6e0) at
../src/compiler/glsl/ast_function.cpp:53
#7  0x00000000004f2bc7 in ast_function_expression::hir (this=0x7df970,
instructions=0xc24300, state=0x7de6e0) at
../src/compiler/glsl/ast_function.cpp:2339
#8  0x00000000004f541d in ast_function_expression::hir_no_rvalue
(this=0x7df970, instructions=0xc24300, state=0x7de6e0) at
../src/compiler/glsl/ast_to_hir.cpp:1089
#9  0x00000000004f9102 in ast_expression_statement::hir (this=0x7dfbb0,
instructions=0xc24300, state=0x7de6e0) at
../src/compiler/glsl/ast_to_hir.cpp:2227
#10 0x00000000004f9175 in ast_compound_statement::hir (this=0x7dfbf0,
instructions=0xc24300, state=0x7de6e0) at
../src/compiler/glsl/ast_to_hir.cpp:2243
#11 0x0000000000501631 in ast_function_definition::hir (this=0x7dfc50,
instructions=0x7e2ee0, state=0x7de6e0) at
../src/compiler/glsl/ast_to_hir.cpp:6191
#12 0x00000000004f3628 in _mesa_ast_to_hir (instructions=0x7e2ee0,
state=0x7de6e0) at ../src/compiler/glsl/ast_to_hir.cpp:156
#13 0x0000000000452ea8 in _mesa_glsl_compile_shader (ctx=0x7ab1c0
<standalone_compile_shader::local_ctx>, shader=0x7dc5b0, dump_ast=false,
dump_hir=false, force_recompile=true)
    at ../src/compiler/glsl/glsl_parser_extras.cpp:2119
#14 0x00000000004053c6 in compile_shader (ctx=0x7ab1c0
<standalone_compile_shader::local_ctx>, shader=0x7dc5b0) at
../src/compiler/glsl/standalone.cpp:394
#15 0x0000000000405915 in standalone_compile_shader (_options=0x7ab170
<options>, num_files=1, files=0x7fffffffdc70) at
../src/compiler/glsl/standalone.cpp:504
#16 0x0000000000404738 in main (argc=4, argv=0x7fffffffdc58) at
../src/compiler/glsl/main.cpp:95

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180812/22baae49/attachment.html>


More information about the mesa-dev mailing list