glthread: always sync for glShaderSource because invalid params can crash
authorMarek Olšák <marek.olsak@amd.com>
Tue, 23 Aug 2022 19:41:52 +0000 (15:41 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 21 Sep 2022 14:54:49 +0000 (14:54 +0000)
commit97891087b5db8a12766781567a128c5e585f4c9c
tree5a9ab3667c279bba6e4e500c35e412e9cf3639d4
parent6b6f8621709801e360ea69ebd675ac7caae512f2
glthread: always sync for glShaderSource because invalid params can crash

If an invalid parameter is received along with an invalid pointer and we
ignore the invalid parameter and dereference the pointer, we crash.
Since we can't fully validate all parameters (such as whether "shader"
is a valid object ID), remove the custom code.

Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18223>
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/glthread_shaderobj.c