Fix double free when texture allocation fails + fix a null pointer deref
(1) The struct holding the resource is allocated outside vrend_renderer_resource_allocated_texture
, and when the texture allocation itself fails, then this struct is freed after returning from that call (or for the intermediate blit texture it is asserted that texture allocation doesn't fail, because there it should never fail). Therefore, the struct must not be freed inside vrend_renderer_resource_allocated_texture
(2) when one tries to launch a grid but no CS was sent before, then a null pointer dereference hit, this MR adds a test and fixes this.
Fixes #154 Fixes #155
Merge request reports
Activity
added bugfix label
added 7 commits
-
c5f5ceec...b97d148d - 3 commits from branch
virgl:master
- 3320973c - tests/fuzzer: Add test that triggers a double free
- f9b079cc - vrend: Don't free resource struct in _resource_allocate_texture
- 725e12be - test: Add fuzzer test to check illegal CS shader execution
- 572a3687 - vrend: Don't try launching a grid if no CS is available
Toggle commit list-
c5f5ceec...b97d148d - 3 commits from branch
added 9 commits
-
572a3687...8126424f - 5 commits from branch
virgl:master
- ea2787b4 - tests/fuzzer: Add test that triggers a double free
- 0a93ffea - vrend: Don't free resource struct in _resource_allocate_texture
- 6cc29bf3 - test: Add fuzzer test to check illegal CS shader execution
- ba07c7d3 - vrend: Don't try launching a grid if no CS is available
Toggle commit list-
572a3687...8126424f - 5 commits from branch
added 4 commits
Toggle commit listenabled an automatic merge when the pipeline for 63bcca25 succeeds