OSDN Git Service

mesa: validate that sync objects were created by mesa
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 4 Dec 2012 09:24:07 +0000 (01:24 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Thu, 6 Dec 2012 17:43:07 +0000 (09:43 -0800)
commit56e95d3ca231110188e5b910f4e17104f3176d52
tree0515c13e0cc51d64a2a92949ed1c9a9d160348fa
parente12d9f0c6df9f309ade2aea708264c81038685b1
mesa: validate that sync objects were created by mesa

Previously, the user could send in a pointer that was not created
by mesa. When we dereferenced that pointer, there would be an
exception.

Now we keep a set of pointers and verify that the pointer
exists in that set before dereferencing it.

Note: This fixes several crashing gles3conform tests.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/mtypes.h
src/mesa/main/shared.c
src/mesa/main/syncobj.c