diff options
author | Andreu Botella <andreu@andreubotella.com> | 2023-01-14 23:40:01 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-15 07:40:01 +0000 |
commit | 90c03812720c328dcb68939400b265128b6eca8f (patch) | |
tree | a1e5ce445e3c9d6eac7be43f1909cb354fe1e69d /cli/tsc/dts/lib.deno.ns.d.ts | |
parent | 44d9acca75b5a0aa886bf370cd4658bfb6e7097e (diff) |
fix(ops): disallow memory slices as inputs to async ops (#16738)
In Rust, it is UB if a slice is mutated while borrowed except through
the slice itself, and it is also UB if a mutable slice is read while
borrowed. The op macro allows borrowing an `ArrayBuffer{,View}` as a
memory slice for the duration of an op, but this is not sound for async
ops, since the `ArrayBuffer` could be accessed from JS during the await
points. This PR therefore disallows such automatic borrowing only for
async ops.
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Diffstat (limited to 'cli/tsc/dts/lib.deno.ns.d.ts')
0 files changed, 0 insertions, 0 deletions