compiler/glsl: Use mutex lock while freeing up mem_ctx
builtin_builder::~builtin_builder() and builtin_builder::release() are running into race condition. This leads lightsmark to crash at the end because both calls ralloc_free which mutates the arguments state
This patch fixes lightsmark2008 crash
Fixes: e4da8b9c ("mesa/compiler: rework tear down of builtin/types")
Reviewed-by: Charmaine Lee charmainel@vmware.com Reviewed-by: Neha Bhende bhenden@vmware.com Tested-by: Neha Bhende bhenden@vmware.com