nutanix / libvfio-user

framework for emulating devices in userspace
BSD 3-Clause "New" or "Revised" License
162 stars 51 forks source link

test: don't leave global pointing to stack memory #735

Closed jimharris closed 1 year ago

jimharris commented 1 year ago

test_device_is_stopped_and_copying points the global vfu_ctx structure to a local stack-allocated data structure. This is fine while the function is executing, but newer gcc complains that the pointer is left there after it returns.

So clear the pointer to NULL before returning.

Reported-by: Kamil Godzwon kamilx.godzwon@intel.com

jimharris commented 1 year ago

@jlevon @tmakatos when might this patch be merged? This is just one of a few blockers to get SPDK CI using Fedora 38.