Re: [PATCH 1/5] aio-posix: fix use after leaving scope in aio_poll()

2020-02-18 Thread Sergio Lopez
On Fri, Feb 14, 2020 at 05:17:08PM +, Stefan Hajnoczi wrote: > epoll_handler is a stack variable and must not be accessed after it goes > out of scope: > > if (aio_epoll_check_poll(ctx, pollfds, npfd, timeout)) { > AioHandler epoll_handler; > ... >

[PATCH 1/5] aio-posix: fix use after leaving scope in aio_poll()

2020-02-14 Thread Stefan Hajnoczi
epoll_handler is a stack variable and must not be accessed after it goes out of scope: if (aio_epoll_check_poll(ctx, pollfds, npfd, timeout)) { AioHandler epoll_handler; ... add_pollfd(_handler); ret = aio_epoll(ctx, pollfds, npfd, timeout); }