I "suspect" the bug is in the function below. Note the 'for' loop that calls itself...yuck!
-----------------------------------------------------------------------
if (--bo_fake->refcount == 0) {
assert(bo_fake->map_count == 0);
/* No remaining references, so free it */
if (bo_fake->block){ free_block(bufmgr_fake, bo_fake->block, 0);
}
free_backing_store(bo);
for (i = 0; i < bo_fake->nr_relocs; i++){ drm_intel_fake_bo_unreference_locked(bo_fake->relocs[i].target_buf);
}
DBG("drm_bo_unreference: free buf %d %s\n", bo_fake->id, bo_fake->name);
I "suspect" the bug is in the function below. Note the 'for' loop that calls itself...yuck! ------- ------- ------- ------- ------- ------- ------- ------- ------- -
-------
static void fake_bo_ unreference_ locked( drm_intel_ bo *bo) intel_bufmgr_ fake *bufmgr_fake = (drm_intel_ bufmgr_ fake *)bo->bufmgr; intel_bo_ fake *bo_fake = (drm_intel_bo_fake *)bo;
drm_intel_
{
drm_
drm_
int i;
if (--bo_fake- >refcount == 0) { bo_fake- >map_count == 0);
free_ block(bufmgr_ fake, bo_fake->block, 0); backing_ store(bo) ;
assert(
/* No remaining references, so free it */
if (bo_fake->block){
}
free_
for (i = 0; i < bo_fake->nr_relocs; i++){
drm_intel_ fake_bo_ unreference_ locked( bo_fake- >relocs[ i].target_ buf); "drm_bo_ unreference: free buf %d %s\n", bo_fake->id, bo_fake->name);
}
DBG(
free( bo_fake- >relocs) ;
free(bo);
}
}