Stream: git-wasmtime

Topic: wasmtime / PR #6225 wasi-common: change behavior of path_...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 22:08):

pchickey opened PR #6225 from bytecodealliance:pch/path_readlink_truncation to bytecodealliance:main:

This is the same behavior on a too-small buffer as posix readlink(2).

The correct way to call readlink(2), and therefore path_readlink, is to call it multiple times with incrementally larger buffers until the bytes returned is smaller than the buffer passed in, to ensure the value is not being truncated. Userlands are used to this restriction.

Thankfully this nonsense goes away, thanks to the component model, in preview 2, where path_readlink just gives a string. Only the (host) component interfacing with a posix readlink(2) needs to do the truncation detection dance.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 22:08):

pchickey requested alexcrichton for a review on PR #6225.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 22:08):

pchickey requested wasmtime-core-reviewers for a review on PR #6225.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 22:08):

pchickey requested sunfishcode for a review on PR #6225.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2023 at 22:13):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2023 at 18:47):

pchickey merged PR #6225.


Last updated: Oct 23 2024 at 20:03 UTC