glapi: guard against invalid XML definitions for glthread

This would have prevented the bug that the previous commit fixes.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8753>
This commit is contained in:
Marek Olšák 2021-01-27 23:12:54 -05:00 committed by Marge Bot
parent b5a0714aae
commit d860b61f09

View file

@ -653,6 +653,12 @@ class gl_function( gl_item ):
name = element.get( "name" )
alias = element.get( "alias" )
# marshal isn't allowed with alias
assert not alias or not element.get('marshal')
assert not alias or not element.get('marshal_count')
assert not alias or not element.get('marshal_sync')
assert not alias or not element.get('marshal_call_after')
if name in static_data.functions:
self.static_entry_points.append(name)