mesa: Handle negative length in glPushDebugGroup().
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 24 Mar 2016 06:46:12 +0000 (23:46 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 24 Mar 2016 17:47:50 +0000 (10:47 -0700)
commitd1bb1df87ed8518693730efc80b3a8b9912bb7bf
treed1ead7b407a57ef9eac509a6144cf9dcb62667cd
parent028459a00d6faec85ea75ebbaff75fb6f1d91bff
mesa: Handle negative length in glPushDebugGroup().

The KHR_debug spec doesn't actually say we should handle this, but that
is most likely an oversight - it says to check against strlen and
generate errors if length is negative.  It appears they just forgot to
explicitly spell out that we should then proceed to actually handle it.

Fixes crashes from uncaught std::string exceptions in many
dEQP-GLES31.functional.debug.error_filters.* tests.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
src/mesa/main/debug_output.c