You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pubfn aio_suspend(list:&[&dynAsRef<libc::aiocb>],timeout:Option<TimeSpec>,) -> Result<()>{let p = list as*const[&dynAsRef<libc::aiocb>]as*const[*const libc::aiocb]as*const*const libc::aiocb;
...
Which is incorrect, as &dyn AsRef<libc::aiocb> is:
A wide pointer with a vtable in its metadata.
Not guaranteed that the data pointer is to a libc::aiocb (it may be a struct that contains a libc::aiocb somewhere).
This should either change the argument to be a slice of thin pointers (e.g. &[&libc::aiocb]) or dynamically allocate a new list and call as_ref() on each member of list.
The text was updated successfully, but these errors were encountered:
2019: Fix aio_suspend in non-trivial cases r=asomers a=asomers
aio_suspend would probably fail with EFAULT if the first operation in the list wasn't complete, due to an invalid pointer cast.
Also, deprecate lio_listio, which has the same problem, and others besides.
Fixes#1980
2087: Fix Haiku build by updating tempfile to 3.7.1 r=asomers a=asomers
Stebalien/tempfile#246
Co-authored-by: Alan Somers <asomers@gmail.com>
aio_suspend
performs this cast on its argument:Which is incorrect, as
&dyn AsRef<libc::aiocb>
is:libc::aiocb
(it may be a struct that contains alibc::aiocb
somewhere).This should either change the argument to be a slice of thin pointers (e.g.
&[&libc::aiocb]
) or dynamically allocate a newlist
and callas_ref()
on each member oflist
.The text was updated successfully, but these errors were encountered: