[Mesa-dev] [Bug 98281] 'message's in ctx->Debug.LogMessages[] seem to leak.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Oct 17 16:51:27 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=98281

--- Comment #8 from Emil Velikov <emil.l.velikov at gmail.com> ---
(In reply to Suzuki, Shinji from comment #6)
> (In reply to Emil Velikov from comment #3)
> > Can you attach a simple program which reproduces this ? Ideally one which
> > does not depend on glew, in order to isolate a problem with it.
> 
> Please have a look on the following attachment. In a nutshell, calling
> glGetString(GL_EXTENSIONS) within a core-profile context seems to generate
> the leak.
> 
> ==25470== 46 bytes in 1 blocks are definitely lost in loss record 78 of 189
> ==25470==    at 0x4C2DB8F: malloc (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==25470==    by 0x8DED4C8: debug_message_store (debug_output.c:226)
> ==25470==    by 0x8DED6EC: debug_log_message (debug_output.c:634)
> ==25470==    by 0x8DED6EC: log_msg_locked_and_unlock (debug_output.c:868)
> ==25470==    by 0x8E0D49C: _mesa_error (errors.c:330)
> ==25470==    by 0x8E7FBD3: _mesa_GetString (getstring.c:139)
> ==25470==    by 0x401DF8: main (test.cpp:193)

Hmm yes. IIRC this happens because the spec dictates that the stack depth must
be 1 to begin with, at which point we detect that we should 'do_log' in
_mesa_error() which effectively adds the debug message.

Might be worth checking how other implementations behave in such a case (just
do anything illegal) and read through the spec what the exact behaviour should
be.

Just some ideas, I'm busy with something else atm :-\

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161017/e087e015/attachment.html>


More information about the mesa-dev mailing list