Stream: git-wasmtime

Topic: wasmtime / issue #7660 Write content bug?


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

Userzxcvbvnm added the bug label to Issue #7660.

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

Userzxcvbvnm opened issue #7660:

Test Case

The c file is uploaded as
test-c.txt

The wasm file is uploaded as
test-wasm.txt

The test case is to write content 6zGtwvXWrrRq8WivBsT8Mx3N6 into the file from position 50.
And the initial file size is less than 50.

Steps to Reproduce

using command wasmtime run --dir=./Data test.wasm

Expected Results

Print:

Successfully get the file fd.
Current offset: 0
Wrote 25 bytes to the file.
File Size: 75 bytes

wamr wasmedge wazero print the above message.
These runtimes filled the end of the file up to position 50 with null characters and wrote the content 6zGtwvXWrrRq8WivBsT8Mx3N6 after position 50.

Actual Results

wasmtime prints:

Successfully get the file fd.
Current offset: 0
Wrote 0 bytes to the file.
File Size: 50 bytes

However, wasmtime only filled the end of the file up to position 50 with null characters and did not write the content 6zGtwvXWrrRq8WivBsT8Mx3N6 after position 50.

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 (Dec 08 2023 at 14:57):

rylev commented on issue #7660:

Tried to reproduce this on mac with versions 13.0.0, 15.0.0, and the latest build on main (3b61c511a0b), and I could not reproduce this. I unfortunately, don't have easy access to a Windows machine. Have you been able to reproduce the issue with a newer version of wasmtime?

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

rylev edited a comment on issue #7660:

Tried to reproduce this on mac with versions 13.0.0, 15.0.0, and the latest build on main (3b61c511a0b), and I could not reproduce this. I unfortunately, don't have easy access to a Windows machine. Have you been able to reproduce the issue with a newer version of wasmtime?

Also, just saw the issue you opened (https://github.com/bytecodealliance/wasmtime/issues/7633) - is this perhaps the same issue?

view this post on Zulip Wasmtime GitHub notifications bot (Dec 09 2023 at 03:19):

Userzxcvbvnm commented on issue #7660:

Thanks for your reply ! I tried this in wasmtime 15.0.1 in Windows, and found the bug has already been fixed. I' ll close this issue. Thanks a lot !

view this post on Zulip Wasmtime GitHub notifications bot (Dec 09 2023 at 03:19):

Userzxcvbvnm closed issue #7660:

Test Case

The c file is uploaded as
test-c.txt

The wasm file is uploaded as
test-wasm.txt

The test case is to write content 6zGtwvXWrrRq8WivBsT8Mx3N6 into the file from position 50.
And the initial file size is less than 50.

Steps to Reproduce

using command wasmtime run --dir=./Data test.wasm

Expected Results

Print:

Successfully get the file fd.
Current offset: 0
Wrote 25 bytes to the file.
File Size: 75 bytes

wamr wasmedge wazero print the above message.
These runtimes filled the end of the file up to position 50 with null characters and wrote the content 6zGtwvXWrrRq8WivBsT8Mx3N6 after position 50.

Actual Results

wasmtime prints:

Successfully get the file fd.
Current offset: 0
Wrote 0 bytes to the file.
File Size: 50 bytes

However, wasmtime only filled the end of the file up to position 50 with null characters and did not write the content 6zGtwvXWrrRq8WivBsT8Mx3N6 after position 50.

Versions and Environment

Wasmtime version or commit: 13.0.0

Operating system: Windows 10

Architecture: amd64


Last updated: Dec 23 2024 at 12:05 UTC