sunshowers opened PR #9687 from sunshowers:map-at-mmap-2
to bytecodealliance:main
:
Draft to show how https://github.com/bytecodealliance/wasmtime/pull/9682 would work. (Will clean this up before putting up.)
sunshowers submitted PR review.
sunshowers created PR review comment:
This was a subtle dependency that took me a bit to understand.
sunshowers submitted PR review.
sunshowers created PR review comment:
(And this is only dangerous when
alloc
represents an owned memory allocation. It's fine ifalloc
is borrowed. This is a subtle point.)
alexcrichton submitted PR review:
:+1:
alexcrichton created PR review comment:
Do you think it'd perhaps be better to remove this
no_clear_on_drop
and instead perform it inDrop for LocalMemory
? (where that could.take()
and explicitly do the image stuff before dropping the mmap)
sunshowers submitted PR review.
sunshowers created PR review comment:
Oh that's a good idea, similar to
MemoryPool
. I think it's correct.
sunshowers submitted PR review.
sunshowers created PR review comment:
Oh actually there's another subtle issue here, I think if
slot.instantiate
below fails, we should clear on drop (that's part of the point of clear-on-drop, right?) So I think it would be best to make this change in a followup since it's a behavior change, not a refactor.
sunshowers updated PR #9687.
sunshowers has marked PR #9687 as ready for review.
sunshowers requested wasmtime-core-reviewers for a review on PR #9687.
sunshowers requested fitzgen for a review on PR #9687.
sunshowers submitted PR review.
sunshowers created PR review comment:
I've expanded this comment -- it would definitely be good to move this to the destructor, but it would be a behavior change so it should be a followup. This PR itself should not contain any behavior changes.
sunshowers updated PR #9687.
Last updated: Dec 23 2024 at 12:05 UTC