* [mesa PATCH] nv50: fix crash in nv50_pre_pipebuffer_map (nv50_screen->cur_ctx)
@ 2010-01-20 22:27 Marcin Slusarz
[not found] ` <20100120222707.GA2894-OI9uyE9O0yo@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Marcin Slusarz @ 2010-01-20 22:27 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
nv50_pre_pipebuffer_map references screen->cur_ctx which points
to freed memory after the context is destroyed.
This crash is easily triggerable by progs/xdemos/glxcontexts.
---
src/gallium/drivers/nv50/nv50_context.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index d598f0e..952741c 100644
--- a/src/gallium/drivers/nv50/nv50_context.c
+++ b/src/gallium/drivers/nv50/nv50_context.c
@@ -82,6 +82,10 @@ nv50_destroy(struct pipe_context *pipe)
so_ref(NULL, &nv50->state.vtxattr);
draw_destroy(nv50->draw);
+
+ if (nv50->screen->cur_ctx == nv50)
+ nv50->screen->cur_ctx = NULL;
+
FREE(nv50);
}
--
1.6.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [mesa PATCH] nv50: fix crash in nv50_pre_pipebuffer_map (nv50_screen->cur_ctx)
[not found] ` <20100120222707.GA2894-OI9uyE9O0yo@public.gmane.org>
@ 2010-01-24 18:24 ` Marcin Slusarz
0 siblings, 0 replies; 2+ messages in thread
From: Marcin Slusarz @ 2010-01-24 18:24 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Wed, Jan 20, 2010 at 11:27:07PM +0100, Marcin Slusarz wrote:
> nv50_pre_pipebuffer_map references screen->cur_ctx which points
> to freed memory after the context is destroyed.
> This crash is easily triggerable by progs/xdemos/glxcontexts.
ping
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-24 18:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-20 22:27 [mesa PATCH] nv50: fix crash in nv50_pre_pipebuffer_map (nv50_screen->cur_ctx) Marcin Slusarz
[not found] ` <20100120222707.GA2894-OI9uyE9O0yo@public.gmane.org>
2010-01-24 18:24 ` Marcin Slusarz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.