Support adding handle annotations to sturucture that contains handles.
All the handles referenced by the structure (direct value or ptr) would
be treated as containing the release/use/acquire annotations directly.
This could be used to capture more error cases for example use after
free:
void spawn(ZX_HANDLE_RELEASE const fdio_spawn_action_t* actions); int main() { zx_handle_t handle; get_handle(&handle); fdio_spawn_action actions[1] = {}; actions[0].h.handle = handle; spawn(actions); use_handle(handle); return 0; }
In this example, spawn would release the handle so using the handle
again should be considered an error. Before this patch, handle would
be considered escaped and thus using it again is not reported.
Can you move this to the private section below?