-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[29.0.x]: Fix a missing increment in p1-to-p2 adapter (#10067)
* Add audit for `wasmtime-math` (#10059) I noticed that CI is failing given that an audit and policy for `wasmtime-math` is missing. `wasmtime-math` was introduced in https://github.com/bytecodealliance/wasmtime/pull/9808/files. I followed a similar approach to what it's used for all the other `wasmtime-*` crates. * Fix a missing increment in p1-to-p2 adapter (#10064) This commit fixes a bug in the WASIp1-to-WASIp2 adapter during `fd_prestat_dir_name` where an iterator variable was forgotten to be incremented. That means that getting the path for anything other than the first preopen didn't work correctly. Closes #10058 * Downgrade `wasip2` dep to 0.13.0 Compat with 1.81.0 MSRV --------- Co-authored-by: Saúl Cabrera <[email protected]>
- Loading branch information
1 parent
5454077
commit e304726
Showing
8 changed files
with
111 additions
and
5 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use std::str; | ||
|
||
fn main() { | ||
dbg!(wasip2::filesystem::preopens::get_directories()); | ||
unsafe { | ||
let p3 = wasi::fd_prestat_get(3).unwrap(); | ||
let p4 = wasi::fd_prestat_get(4).unwrap(); | ||
let p5 = wasi::fd_prestat_get(5).unwrap(); | ||
assert_eq!(wasi::fd_prestat_get(6).err().unwrap(), wasi::ERRNO_BADF); | ||
|
||
assert_eq!(p3.u.dir.pr_name_len, 2); | ||
assert_eq!(p4.u.dir.pr_name_len, 2); | ||
assert_eq!(p5.u.dir.pr_name_len, 2); | ||
|
||
let mut buf = [0; 100]; | ||
|
||
wasi::fd_prestat_dir_name(3, buf.as_mut_ptr(), buf.len()).unwrap(); | ||
assert_eq!(str::from_utf8(&buf[..2]).unwrap(), "/a"); | ||
wasi::fd_prestat_dir_name(4, buf.as_mut_ptr(), buf.len()).unwrap(); | ||
assert_eq!(str::from_utf8(&buf[..2]).unwrap(), "/b"); | ||
wasi::fd_prestat_dir_name(5, buf.as_mut_ptr(), buf.len()).unwrap(); | ||
assert_eq!(str::from_utf8(&buf[..2]).unwrap(), "/c"); | ||
assert_eq!( | ||
wasi::fd_prestat_dir_name(6, buf.as_mut_ptr(), buf.len()), | ||
Err(wasi::ERRNO_BADF), | ||
); | ||
} | ||
// .. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -489,6 +489,14 @@ start = "2022-11-21" | |
end = "2025-07-30" | ||
notes = "The Bytecode Alliance is the author of this crate." | ||
|
||
[[wildcard-audits.wasmtime-math]] | ||
who = "Saúl Cabrera <[email protected]>" | ||
criteria = "safe-to-deploy" | ||
user-id = 73222 # wasmtime-publish | ||
start = "2025-01-20" | ||
end = "2026-01-21" | ||
notes = "The Bytecode Alliance is the author of this crate." | ||
|
||
[[wildcard-audits.wasmtime-runtime]] | ||
who = "Bobby Holley <[email protected]>" | ||
criteria = "safe-to-deploy" | ||
|
@@ -4457,6 +4465,12 @@ user-id = 1 # Alex Crichton (alexcrichton) | |
start = "2020-06-03" | ||
end = "2025-12-05" | ||
|
||
[[trusted.wasi]] | ||
criteria = "safe-to-deploy" | ||
user-id = 6825 # Dan Gohman (sunfishcode) | ||
start = "2019-07-22" | ||
end = "2026-01-21" | ||
|
||
[[trusted.wasm-bindgen]] | ||
criteria = "safe-to-deploy" | ||
user-id = 1 # Alex Crichton (alexcrichton) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters