Hi, This is a patch against DirectFB’s master that fixes a fatal debug assertion when a system driver fails to allocate buffers. Please review and apply if appropriate.
Following is the rationale. We don't need to go down the stack till DeallocateBuffer() in dfb_surface_pool_deallocate() when the original AllocateBuffer() already failed allocating a valid chunk, thus mark the allocation as CSALF_DEALLOCATED beforehand in dfb_surface_pool_allocate() on failure so that dfb_surface_pool_deallocate() would bails out gracefully. We don't clear allocation's magic as surface_allocation_destructor() is expecting it to be still valid when calling dfb_surface_allocation_unref() in dfb_surface_pool_allocate(). The former will call dfb_surface_pool_deallocate() and then the system driver's (such as fbdev) DeallocateBuffer(); which in turn will fail in asserting a valid FBDevPoolLocalData structure. -Ilyes
0001-surface_pool-mark-an-allocation-as-CSALF_DEALLOCATED.patch
Description: 0001-surface_pool-mark-an-allocation-as-CSALF_DEALLOCATED.patch
_______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev