Summary: | Chromium - Memory leak | ||
---|---|---|---|
Product: | Mesa | Reporter: | Bartosz Tomczyk <bartosz.tomczyk86> |
Component: | Mesa core | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | CC: | chadversary, gary.c.wang, lemody, robclark |
Version: | git | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Bartosz Tomczyk
2017-04-20 20:17:44 UTC
I've bisected it and first bad commit is: commit a5e733c6b52e93de3000647d075f5ca2f55fcb71 Author: Rob Clark <robdclark@gmail.com> 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) { Can someone more experienced comment, which if any of above fixes is correct? Adding the commit author - Rob. The pipe_surface workarounds don't look right. The patch in comment 1 makes sense. Bartosz, please send it to the list and include a Cc: Rob.. and Fixes: a5e733c6b52 ("..."). There's a gut feeling that we might need something more, but nothing concrete comes to mind. Pushed to master commit fd6c2a3f3eb7f5f3077fb95b1441ddaa43b806fe Author: Bartosz Tomczyk <bartosz.tomczyk86@gmail.com> Date: Sat Apr 29 16:37:45 2017 +0200 mesa: Avoid leaking surface in st_renderbuffer_delete |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.