You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fn main() {
unsafe {
let result = wasi::fd_seek(4, -6551085931117533355, wasi::WHENCE_CUR);
match result {
Ok(new_offset) => eprintln!("fd_seek ok new offset {new_offset}"),
Err(errno) => eprintln!("fd_seek errno {errno}"),
}
}
}
Expected behavior
fd_advise should error with something like inval (28).
Actual behavior
fd_advise succeeds, returning a positive offset.
Additional context
The text was updated successfully, but these errors were encountered:
yagehu
added a commit
to yagehu/wasmer
that referenced
this issue
Apr 22, 2024
Describe the bug
Calling
fd_seek
withwhence::cur
and a large enough negative offset underflows.$ wasmer -vV; rustc -vV wasmer 4.2.8 (f5b182f 2024-04-18) binary: wasmer-cli commit-hash: f5b182fce677570abf4af9b982969d29db7777e5 commit-date: 2024-04-18 host: x86_64-unknown-linux-gnu compiler: singlepass,cranelift rustc 1.73.0 (cc66ad468 2023-10-03) binary: rustc commit-hash: cc66ad468955717ab92600c770da8c1601a4ff33 commit-date: 2023-10-03 host: x86_64-unknown-linux-gnu release: 1.73.0 LLVM version: 17.0.2
Steps to reproduce
Expected behavior
fd_advise
should error with something likeinval
(28).Actual behavior
fd_advise
succeeds, returning a positive offset.Additional context
The text was updated successfully, but these errors were encountered: