Stream: git-wasmtime

Topic: wasmtime / Issue #1112 [Filetests] Use `make_exec` instea...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2020 at 15:07):

teapotd commented on Issue #1112:

Hello, I'd like to work on this issue.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2020 at 16:14):

teapotd commented on Issue #1112:

make_exec consumes MmapMut and returns immutable Mmap. Current implementation in simplejit always stores Option<MmapMut> in PtrLen and changes underlying memory to read-execute using region::protect:

https://github.com/bytecodealliance/wasmtime/blob/e2f6c0805231daa0524d7c770d11ced6dfe961a2/cranelift/simplejit/src/memory.rs#L19-L26

https://github.com/bytecodealliance/wasmtime/blob/e2f6c0805231daa0524d7c770d11ced6dfe961a2/cranelift/simplejit/src/memory.rs#L177-L187

In order to make change to make_exec meaningful we need to store Mmap or MmapMut accordingly. Perhaps we should split PtrLen into PtrLen and PtrLenMut? Also mmap is used only if selinux-fix feature is enabled, so the remaining region::protect's have to stay. I'm not sure if we should make that change, I don't see much benefits.


Last updated: Nov 22 2024 at 17:03 UTC