glsl: Catch subscripted calls to undeclared subroutines
authorGeorge Barrett <bob@bob131.so>
Sun, 19 Nov 2017 10:55:10 +0000 (21:55 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 20 Nov 2017 00:04:04 +0000 (11:04 +1100)
commitf09c2cefdd53cd61562a994294e9d0630868d2da
tree2238fe96c95c03888b56a1f4f6a21cf6ff77ec71
parent514db90448ece28f6acaffea6358c715c47b359a
glsl: Catch subscripted calls to undeclared subroutines

generate_array_index fails to check whether the target of a subroutine
call exists in the AST, potentially passing around null ir_rvalue
pointers eventuating in abort/segfault.

Fixes: fd01840c0bd3 ("glsl: add AoA support to subroutines")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100438
src/compiler/glsl/ast_function.cpp