Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasi: manually adds dot and dot-dot directory entries #1152

Merged
merged 2 commits into from
Feb 22, 2023

Conversation

codefromthecrypt
Copy link
Contributor

This manually adds dot and dot-dot directory entries discarded by compilers like Go. Doing so complies with the latest interpretation of wasi preview1 without forcing us to do the same in preview2 or in GOOS=js. There's a cost penalty of one stat per directory list, which will be only measurable when using real file I/O.

This should result in us being able to remove the exclusion here https://github.com/WebAssembly/wasi-testsuite/pull/55/files#diff-8a3ffd323d75a12f8deb01b053f062876d83dda0b89c1fa24b293cee4195bcfd

See WebAssembly/wasi-testsuite#52

This manually adds dot and dot-dot directory entries discarded by
compilers like Go. Doing so complies with the latest interpretation of
wasi preview1 without forcing us to do the same in preview2 or in
GOOS=js. There's a cost penalty of one stat per directory list, which
will be only measurable when using real file I/O.

This should result in us being able to remove the exclusion here
https://github.com/WebAssembly/wasi-testsuite/pull/55/files#diff-8a3ffd323d75a12f8deb01b053f062876d83dda0b89c1fa24b293cee4195bcfd

See WebAssembly/wasi-testsuite#52

Signed-off-by: Adrian Cole <[email protected]>
Signed-off-by: Adrian Cole <[email protected]>
@codefromthecrypt codefromthecrypt merged commit 3a06ae3 into main Feb 22, 2023
@codefromthecrypt codefromthecrypt deleted the wasi-dot-dot branch February 22, 2023 23:24
evacchi added a commit to evacchi/wazero that referenced this pull request Feb 24, 2023
Updated `newMemorySizer()` to return the updated value, but also
ensure that an invalid `max` still throws an error (invalid module).

- Minor cleanup to use the `memorySizer` type instead of the full
  func signature for clarity
- Added a wat+wasm under `internal/integration_test/vs/testdata/`
  simply because that's where the other cache-related testdata was.

Closes tetratelabs#1152.
evacchi added a commit to evacchi/wazero that referenced this pull request Feb 24, 2023
Updated `newMemorySizer()` to return the updated value, but also
ensure that an invalid `max` still throws an error (invalid module).

- Minor cleanup to use the `memorySizer` type instead of the full
  func signature for clarity
- Added a wat+wasm under `internal/integration_test/vs/testdata/`
  simply because that's where the other cache-related testdata was.

Closes tetratelabs#1152.

Signed-off-by: Edoardo Vacchi <[email protected]>
evacchi added a commit to evacchi/wazero that referenced this pull request Feb 24, 2023
Updated `newMemorySizer()` to return the updated value, but also
ensure that an invalid `max` still throws an error (invalid module).

- Minor cleanup to use the `memorySizer` type instead of the full
  func signature for clarity
- Added a wat+wasm under `internal/integration_test/vs/testdata/`
  simply because that's where the other cache-related testdata was.

Closes tetratelabs#1152.

Signed-off-by: Edoardo Vacchi <[email protected]>
evacchi added a commit to evacchi/wazero that referenced this pull request Feb 24, 2023
Updated `newMemorySizer()` to return the updated value, but also
ensure that an invalid `max` still throws an error (invalid module).

- Minor cleanup to use the `memorySizer` type instead of the full
  func signature for clarity
- Added a wat+wasm under `internal/integration_test/vs/testdata/`
  simply because that's where the other cache-related testdata was.

Closes tetratelabs#1152.

Signed-off-by: Edoardo Vacchi <[email protected]>
evacchi added a commit to evacchi/wazero that referenced this pull request Feb 24, 2023
Updated `newMemorySizer()` to return the updated value, but also
ensure that an invalid `max` still throws an error (invalid module).

- Minor cleanup to use the `memorySizer` type instead of the full
  func signature for clarity
- Added a wat+wasm under `internal/integration_test/vs/testdata/`
  simply because that's where the other cache-related testdata was.

Closes tetratelabs#1152.

Signed-off-by: Edoardo Vacchi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants