Bug in tilesortspu_context?
[email protected] Tue, 14 Jun 2005 18:47:33 -0600
| Newsgroups | gmane.comp.graphics.chromium.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all, At the end of tilesortspu_context.c, the existing code in tilesortspu_DestroyContext looks like this: /* Destroy the tilesort state context */ crFree(contextInfo->server); crStateDestroyContext(contextInfo->State); crHashtableDelete(tilesort_spu.contextTable, ctx, crFree); /* The default buffer */ crPackSetBuffer( thread0->packer, &(thread->geometry_buffer) ); crDLMFreeContext(contextInfo->dlmContext); ------- The problem is that, apparently, crHashtableDelete is deleting the data pointed to by contextInfo. (contextInfo is retrieved from the hashtable earlier in the function.) So, a version that seems to work better for me (i.e. no crash on context deletion) is: /* Destroy the tilesort state context */ crFree(contextInfo->server); crStateDestroyContext(contextInfo->State); /* The default buffer */ crPackSetBuffer( thread0->packer, &(thread->geometry_buffer) ); crDLMFreeContext(contextInfo->dlmContext); crHashtableDelete(tilesort_spu.contextTable, ctx, crFree); ---- Jon ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click