[Mesa-dev] [PATCH 7/7] mesa: HACK! tweak the MAX_DEBUG_MESSAGE_LENGTH limit

Emil Velikov emil.l.velikov at gmail.com
Sun Nov 22 16:59:16 PST 2015


On 23 November 2015 at 00:35, Timothy Arceri <t_arceri at yahoo.com.au> wrote:
> On Sun, 2015-11-22 at 23:21 +0000, Emil Velikov wrote:
>> Based on one's interpretation of the spec one may say that length (when
>> non negative) either considers or doesn't the null terminator.
>>
>> I'm leaning towards the latter case, although the CTS authors are
>> thinking about the former.
>
> The spec says:
>
>     "The lengths of all messages, including their null terminators, must be
>     guaranteed to be less or equal to the value of the
>     implementation-dependent constant MAX_DEBUG_MESSAGE_LENGTH."
>
So it seems that we're missing the "walk over all messages, calculate
and check the total length" step. Seems that _mesa_gl_vdebug,
_mesa_error (do_output || do_log), _mesa_shader_debug could use the
same thing.

Might as well reworking the function to "cap or error", and push it
down to log_msg() might.

Nicely spotted, Tim.
-Emil


More information about the mesa-dev mailing list