Stream: git-wasmtime

Topic: wasmtime / issue #7659 Write content through softlink fil...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 08 2023 at 11:01):

Userzxcvbvnm added the bug label to Issue #7659.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 08 2023 at 11:01):

Userzxcvbvnm opened issue #7659:

Test Case

The c file is uploaded as
test-c.txt

The wasm file is uploaded as
test-wasm.txt

Steps to Reproduce

We create a normal file Data/hello.txt, and a softlink file Data/link/hello_softlink.txt points to Data/hello.txt
using command wasmtime run --dir=./Data test.wasm to execute the wasm file.

Expected Results

In windows, WAMR could write content successfully to the source file Data/hello.txt. And this behavior could be considered as a right behavior, since Data/link/hello_softlink.txt points to Data/hello.txt.

Actual Results

wasmtime create a new file Data/link/hello.txt and write content to this file rather the file Data/hello.txt.
This may be a bug?

Versions and Environment

Wasmtime version or commit: 13.0.0

Operating system: Windows 10

Architecture: amd64

view this post on Zulip Wasmtime GitHub notifications bot (Jan 28 2024 at 20:01):

alexcrichton commented on issue #7659:

Thanks for the report. I've gotten around now to debugging this. I am, however, unfortunately unable to reproduce. Here's what I did:

$ mkdir Data
$ cd Data
# ... create a `hello.txt` file here
$ mkdir link
$ cd link
$ mklink hello_softlink.txt ..\hello.txt

When I run Wasmtime with that --dir Data file then the wasm module executes successfully and the contents show up in Data/hello.txt as expected.

Can you clarify exactly how you set up the symlinks and such? I find the syntax for creating symlinks often confusing so I'm curious if you may have made a mistake in the direction of the symlink or forgotten a ../ for example.


Last updated: Nov 22 2024 at 16:03 UTC