glsl/list: use uintptr_t for exec_node_data()'s subtraction
authorRhys Perry <pendingchaos02@gmail.com>
Wed, 19 Feb 2020 15:09:38 +0000 (15:09 +0000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 12 Mar 2020 12:09:07 +0000 (12:09 +0000)
commit4d0203aa830a6dfabb163514a5a8cd5b5b7bd86e
treecad0f1d60d45cfd38f492d3f62047d3d88d3ffdc
parent85d05b3fd713d67aa764dff60467a896a7aa1011
glsl/list: use uintptr_t for exec_node_data()'s subtraction

This fixes UBSan warnings when foreach_list_typed_safe() passes NULL:
pointer index expression with base 0x000000000000 overflowed to 0xffffffffffffffa8

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4157>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4157>
src/compiler/glsl/list.h