<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Chromium - Memory leak"
href="https://bugs.freedesktop.org/show_bug.cgi?id=100741#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Chromium - Memory leak"
href="https://bugs.freedesktop.org/show_bug.cgi?id=100741">bug 100741</a>
from <span class="vcard"><a class="email" href="mailto:bartosz.tomczyk86@gmail.com" title="Bartosz Tomczyk <bartosz.tomczyk86@gmail.com>"> <span class="fn">Bartosz Tomczyk</span></a>
</span></b>
<pre>I've bisected it and first bad commit is:
commit a5e733c6b52e93de3000647d075f5ca2f55fcb71
Author: Rob Clark <<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a>>
Date: Wed Oct 26 16:52:52 2016 -0400
mesa: drop current draw/read buffer when ctx is released
Another way of fixing it:
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 3570f94f5a..b0a46422f2 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1664,8 +1664,6 @@ _mesa_make_current( struct gl_context *newCtx,
_mesa_flush(curCtx);
/* We used to call _glapi_check_multithread() here. Now do it in drivers
*/
- _glapi_set_context((void *) newCtx);
- assert(_mesa_get_current_context() == newCtx);
if (!newCtx) {
_glapi_set_dispatch(NULL); /* none current */
@@ -1673,8 +1671,12 @@ _mesa_make_current( struct gl_context *newCtx,
_mesa_reference_framebuffer(&curCtx->WinSysDrawBuffer, NULL);
_mesa_reference_framebuffer(&curCtx->WinSysReadBuffer, NULL);
}
+ _glapi_set_context(NULL);
+ assert(_mesa_get_current_context() == NULL);
}
else {
+ _glapi_set_context((void *) newCtx);
+ assert(_mesa_get_current_context() == newCtx);
_glapi_set_dispatch(newCtx->CurrentClientDispatch);
if (drawBuffer && readBuffer) {</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>