OSDN Git Service

Make drv_mapping_destroy() be called in release builds
authorJason Macnak <natsu@google.com>
Tue, 12 Nov 2019 18:53:05 +0000 (10:53 -0800)
committerCommit Bot <commit-bot@chromium.org>
Sat, 16 Nov 2019 19:34:52 +0000 (19:34 +0000)
commit0907d821ccd589ecc0e047909cc6df18ddb5f31c
tree4b3fa8e5abda7ac59995e6ca7677f08c5c65d18e
parent4d5358d32cdf2afa2fd10b09c002751eed2c4cdc
Make drv_mapping_destroy() be called in release builds

The entire assert statement is currently being dropped when NDEBUG is defined
which causes mappings to never be cleaned up on bo destruction. When mappings
are not cleaned up, a new buffer that gets a recycled handle may find an old
mapping in drv_bo_map() which is not valid for the new buffer.

BUG=b:123764798
TEST=built and ran with cuttlefish locally

Change-Id: Ib7147c3f5ed3a2b84793dfc2b17236ee0d92ac13
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1912760
Tested-by: Jason Macnak <natsu@google.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Jason Macnak <natsu@google.com>
drv.c