ktock added the bug label to Issue #7437.
ktock opened issue #7437:
Test Case
#include <stdio.h> #include <unistd.h> int main(){ printf(">"); fflush(stdout); char buf[10]; read(0, buf, 10); printf("Got %s\n", buf); }
I built this using wasi-sdk 19.0.
Steps to Reproduce
- Compile the C code above (I used wasi-sdk 19.0)
- Run it on wasmtime
Expected Results
fflush works and buffered string is printed.
wasmtime v13 prints the string when
fflush
is called.$ wasmtime --version wasmtime-cli 13.0.1 $ wasmtime ./a.out >hi Got hi
Actual Results
fflush doesn't work and buffered string isn't printed.
wasmtime v14 doesn't print the string even if
fflush
is called.$ wasmtime --version wasmtime-cli 14.0.3 $ wasmtime ./a.out
(nothing is printed)
Versions and Environment
wasmtime-cli 14.0.3
Operating system: Linux 5.15.0-87-generic
Architecture: x86_64
Extra Info
alexcrichton commented on issue #7437:
Thanks for the report! This was an accidental regression from https://github.com/bytecodealliance/wasmtime/pull/6825 and this should be fixed in #7441
pchickey commented on issue #7437:
@ktock Thanks for this bug report, we did not have test coverage for this case but I will work on adding it.
fitzgen closed issue #7437:
Test Case
#include <stdio.h> #include <unistd.h> int main(){ printf(">"); fflush(stdout); char buf[10]; read(0, buf, 10); printf("Got %s\n", buf); }
I built this using wasi-sdk 19.0.
Steps to Reproduce
- Compile the C code above (I used wasi-sdk 19.0)
- Run it on wasmtime
Expected Results
fflush works and buffered string is printed.
wasmtime v13 prints the string when
fflush
is called.$ wasmtime --version wasmtime-cli 13.0.1 $ wasmtime ./a.out >hi Got hi
Actual Results
fflush doesn't work and buffered string isn't printed.
wasmtime v14 doesn't print the string even if
fflush
is called.$ wasmtime --version wasmtime-cli 14.0.3 $ wasmtime ./a.out
(nothing is printed)
Versions and Environment
wasmtime-cli 14.0.3
Operating system: Linux 5.15.0-87-generic
Architecture: x86_64
Extra Info
Last updated: Nov 22 2024 at 16:03 UTC