From d860b61f091aaf319f06bc248b1370efc3647df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 27 Jan 2021 23:12:54 -0500 Subject: [PATCH] glapi: guard against invalid XML definitions for glthread MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This would have prevented the bug that the previous commit fixes. Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Zoltán Böszörményi Part-of: --- src/mapi/glapi/gen/gl_XML.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py index 94e742f7b9b..da80ea1b860 100644 --- a/src/mapi/glapi/gen/gl_XML.py +++ b/src/mapi/glapi/gen/gl_XML.py @@ -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)