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 /ops/optimizer_tests/async_result.expected | |
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 'ops/optimizer_tests/async_result.expected')
-rw-r--r-- | ops/optimizer_tests/async_result.expected | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ops/optimizer_tests/async_result.expected b/ops/optimizer_tests/async_result.expected index be2e79ac0..87d46977d 100644 --- a/ops/optimizer_tests/async_result.expected +++ b/ops/optimizer_tests/async_result.expected @@ -3,9 +3,9 @@ returns_result: true has_ref_opstate: false has_rc_opstate: true has_fast_callback_option: false -needs_fast_callback_option: true +needs_fast_callback_option: false fast_result: None -fast_parameters: [V8Value, I32, U32, Uint8Array] -transforms: {2: Transform { kind: SliceU8(true), index: 2 }} +fast_parameters: [V8Value, I32, U32] +transforms: {} is_async: true fast_compatible: true |