Stream: git-wasmtime

Topic: wasmtime / PR #5475 wiggle: copy guest strings from share...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 19 2022 at 23:18):

abrown opened PR #5475 from wiggle-copied-str-reads to main:

Along the same lines as https://github.com/bytecodealliance/wasmtime/pull/5471, this change adds a new smart pointer,
GuestStrCow, to copy the string bytes over from Wasm memory to the
host when the string is found in shared memory. This is necessary to
maintain Rust guarantees: with shared memory, the bytes backing a
GuestStr could be altered by another thread and this would invalidate
the assumption that we can dereference at any point to &str.
GuestStrCow is essentially a wrapper around GuestStr when the memory
is not shared but copies the memory region into a String when the
memory is shared.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 19 2022 at 23:26):

abrown updated PR #5475 from wiggle-copied-str-reads to main.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 20 2022 at 20:07):

abrown updated PR #5475 from wiggle-copied-str-reads to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 03 2023 at 16:11):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 03 2023 at 16:11):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 03 2023 at 16:11):

alexcrichton created PR review comment:

I think this may need a .try_into() or otherwise it's skipping the utf-8 check?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 03 2023 at 23:53):

abrown updated PR #5475 from wiggle-copied-str-reads to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 03 2023 at 23:54):

abrown submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 03 2023 at 23:54):

abrown created PR review comment:

Ah, good catch! Rebased with that additional change as a follow-on commit.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 03 2023 at 23:54):

abrown has marked PR #5475 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 04 2023 at 16:09):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 04 2023 at 16:10):

alexcrichton merged PR #5475.


Last updated: Dec 23 2024 at 13:07 UTC