On 23 November 2015 at 00:35, Timothy Arceri <t_arc...@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 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev