Re: [Mesa-dev] [PATCH 2/2] Gallium:draw:aaline and aapoint: Don't free the tokens.
Stephane, It doens't look right to me: we did allocate these (with the tgsi_alloc_tokens() call above); and the driver should not delete them (the driver will make a copy of the tokens if it needs them, and should not hold on to the incoming tokens. If there's a double free, then I suspect the problem is elsewhere, not the draw module. Jose - Original Message - We didn't allocate them, and the driver will try to free them at the end of the pipeline stage, so leave them alone. --- src/gallium/auxiliary/draw/draw_pipe_aaline.c |1 - src/gallium/auxiliary/draw/draw_pipe_aapoint.c |1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c index 458f85d..83b19ef 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c +++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c @@ -385,7 +385,6 @@ generate_aaline_fs(struct aaline_stage *aaline) goto fail; aaline-fs-generic_attrib = transform.maxGeneric + 1; - FREE((void *)aaline_fs.tokens); return TRUE; fail: diff --git a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c index 9265c37..9e40687 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c +++ b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c @@ -531,7 +531,6 @@ generate_aapoint_fs(struct aapoint_stage *aapoint) goto fail; aapoint-fs-generic_attrib = transform.maxGeneric + 1; - FREE((void *)aapoint_fs.tokens); return TRUE; fail: -- 1.7.5.3.367.ga9930 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] Gallium:draw:aaline and aapoint: Don't free the tokens.
2011/6/29 Jose Fonseca jfons...@vmware.com: Stephane, It doens't look right to me: we did allocate these (with the tgsi_alloc_tokens() call above); and the driver should not delete them (the driver will make a copy of the tokens if it needs them, and should not hold on to the incoming tokens. If there's a double free, then I suspect the problem is elsewhere, not the draw module. Hmm, I'll investigate more. There is definitely a double-free of some kind on those. Stéphane ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/2] Gallium:draw:aaline and aapoint: Don't free the tokens.
We didn't allocate them, and the driver will try to free them at the end of the pipeline stage, so leave them alone. --- src/gallium/auxiliary/draw/draw_pipe_aaline.c |1 - src/gallium/auxiliary/draw/draw_pipe_aapoint.c |1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c index 458f85d..83b19ef 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c +++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c @@ -385,7 +385,6 @@ generate_aaline_fs(struct aaline_stage *aaline) goto fail; aaline-fs-generic_attrib = transform.maxGeneric + 1; - FREE((void *)aaline_fs.tokens); return TRUE; fail: diff --git a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c index 9265c37..9e40687 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c +++ b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c @@ -531,7 +531,6 @@ generate_aapoint_fs(struct aapoint_stage *aapoint) goto fail; aapoint-fs-generic_attrib = transform.maxGeneric + 1; - FREE((void *)aapoint_fs.tokens); return TRUE; fail: -- 1.7.5.3.367.ga9930 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev