repo
stringlengths
5
53
pr_number
int32
1
321k
task_type
stringclasses
2 values
issue_text
stringlengths
0
81.2k
pr_title
stringlengths
1
319
pr_body
stringlengths
0
105k
base_sha
stringlengths
40
40
head_sha
stringlengths
40
40
gold_diff
stringlengths
0
202M
changed_files
listlengths
0
100
review_threads
listlengths
0
100
test_patch
stringlengths
0
23.4M
merged
bool
1 class
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
All right - I think it's probably right time to start using `strum` crate, please port it and drop `fn name` and `fn from_str`. Similarly, please port also the `Engine` enum.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "All right - I think it's probably right time to start using `strum` crate, please port it and drop `fn name` and `fn from_str`. Similarly, please port also the `Engine` enum.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -135,6 +144,45 @@ impl Engine {\n }\n }\n \n+#[deriv...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
Do not allow multiple variants - just a single one. And please add also `all` that will enable all of them.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "Do not allow multiple variants - just a single one. And please add also `all` that will enable all of them.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -135,6 +144,45 @@ impl Engine {\n }\n }\n \n+#[derive(Debug, Clone, Copy, PartialEq, Eq)]\n+enum FileSystemKind {\n+ ...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
We should likely build a vectors and later join them with '/' instead.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "We should likely build a vectors and later join them with '/' instead.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -206,13 +260,30 @@ impl Config {\n }\n \n fn full_test_name(&self) -> String {\n- if self.source.is_default() {\n+ if self.source.is_defau...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
Just comma.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "Just comma.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -450,6 +521,16 @@ fn process_directive(\n \"DefaultMappedDirectories\" => {\n config.default_mapped_directories = arg.parse::<bool>()?;\n }\n+ \"FileSystems\" => {\n+ let fi...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
This seems like another copy of `copy_test_tree`.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "This seems like another copy of `copy_test_tree`.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -634,6 +715,191 @@ fn copy_symlink(from: &Path, _to: &Path) -> Result<()> {\n bail!(\"cannot copy symlink {} on this host\", from.display())\n }\n \n+fn create_filesystem(kind: ...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
Why do we need 2 fields here? Note `include_file_system_in_name` should probably somehow depend on either `file_system`, or `Vec<FileSystemKind>`.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "Why do we need 2 fields here? Note `include_file_system_in_name` should probably somehow depend on either `file_system`, or `Vec<FileSystemKind>`.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -145,6 +193,9 @@ struct Config {\n test_name: String,\n config_name: String,...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
If possible, I would like to see it unified with `for directory in &config.mapped_directories`.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "If possible, I would like to see it unified with `for directory in &config.mapped_directories`.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -634,6 +715,191 @@ fn copy_symlink(from: &Path, _to: &Path) -> Result<()> {\n bail!(\"cannot copy symlink {} on this host\", from.d...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
No need for extra annotation if I'm not mistaken: https://docs.rs/strum/latest/strum/derive.Display.html
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "No need for extra annotation if I'm not mistaken: https://docs.rs/strum/latest/strum/derive.Display.html", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -116,27 +123,74 @@ struct MappedDirectory {\n guest: String,\n }\n \n-#[derive(Debug, Clone, Copy, PartialEq, Eq)]\n+#[der...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
https://docs.rs/strum/latest/strum/derive.EnumIter.html
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "https://docs.rs/strum/latest/strum/derive.EnumIter.html", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -116,27 +123,74 @@ struct MappedDirectory {\n guest: String,\n }\n \n-#[derive(Debug, Clone, Copy, PartialEq, Eq)]\n+#[derive(Debug, Clone, Copy, PartialEq, Eq, strum::Dis...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
Don't like extra enum, in parsing, for "All" - just fill up all the variants.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "Don't like extra enum, in parsing, for \"All\" - just fill up all the variants.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -116,27 +123,74 @@ struct MappedDirectory {\n guest: String,\n }\n \n-#[derive(Debug, Clone, Copy, PartialEq, Eq)]\n+#[derive(Debug, Clone, Copy, P...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
Should be removed.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "Should be removed.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -116,27 +123,74 @@ struct MappedDirectory {\n guest: String,\n }\n \n-#[derive(Debug, Clone, Copy, PartialEq, Eq)]\n+#[derive(Debug, Clone, Copy, PartialEq, Eq, strum::Display, strum::EnumString)]\n+#[strum(a...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
I would stick with the original version, even though it's not ideal either.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "I would stick with the original version, even though it's not ideal either.\n", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -389,30 +439,21 @@ fn process_directive(\n let (engine, reason) = arg\n .split_once(':')\n .ok_or_else(|| any...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
I would replace the arguments with a defined `struct`.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "I would replace the arguments with a defined `struct`.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -600,43 +656,57 @@ fn run_build_script(config: &Config) -> anyhow::Result<PathBuf> {\n Ok(build_test_path.join(\"main\"))\n }\n \n-fn copy_test_tree(from: &Path, to: &Path)...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
Can we abstract some of the commonly used directives to an AbstractConfig?
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/tests/wasi-wast/wasi/tests/path_symlink.rs b/lib/wasix/tests/wasm_tests/wasi_wast/path_symlink.rs similarity index 82% rename from tests/wasi-wast/wasi/tests/path_symlink.rs rename to lib/wasix/tests/wasm_tests/wasi_wast/path_symlink.rs index 55464f8215e3..b1c35fa92314 100644 --- a/tests/wasi-wast/wasi/tes...
[ "lib/wasix/tests/wasm_tests/wasi_wast/path_symlink.rs" ]
[ { "comment": "Can we abstract some of the commonly used directives to an AbstractConfig?", "path": "lib/wasix/tests/wasm_tests/wasi_wast/path_symlink.rs", "hunk": "@@ -1,6 +1,9 @@\n-// WASI:\n-// tempdir: temp\n-// mapdir: hamlet:test_fs/hamlet\n+//#DefaultMappedDirectories: false", "resolving_sha":...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
Don't like this `unwrap_or`, I would rather start with `file_systems: vec[FileSystemKind::Host]`, and then replace it if `FileSystems` directive takes action.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "Don't like this `unwrap_or`, I would rather start with `file_systems: vec[FileSystemKind::Host]`, and then replace it if `FileSystems` directive takes action.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -209,23 +218,30 @@ impl Config {\n self.tests_build_root.join(se...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
Well, it's a bit strange the name contains plural, but we're expecting a single value. I would support parsing a list of values separated by comma.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "Well, it's a bit strange the name contains plural, but we're expecting a single value. I would support parsing a list of values separated by comma.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -464,6 +480,21 @@ fn process_directive(\n \"DefaultMappedDirectories\" => {...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
`#[strum(serialize_all = "lowercase")]`
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "`#[strum(serialize_all = \"lowercase\")]`", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -126,17 +135,15 @@ pub enum Engine {\n V8,\n }\n \n-impl Engine {\n- pub fn name(self) -> &'static str {\n- match self {\n- Self::Cranelift => \"cranelift\",\n- ...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
`#[strum(serialize_all = "lowercase")]`
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "`#[strum(serialize_all = \"lowercase\")]`", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -116,7 +124,8 @@ struct MappedDirectory {\n guest: String,\n }\n \n-#[derive(Debug, Clone, Copy, PartialEq, Eq)]\n+#[derive(Debug, Clone, Copy, PartialEq, Eq, strum::Display, strum::Enu...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
We should be able to run the new tests with `Singlepass` as well. Please enable it.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "We should be able to run the new tests with `Singlepass` as well. Please enable it.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -989,37 +1209,41 @@ fn collect_tests(tests: &mut Vec<Trial>) -> Result<()> {\n ))?;\n \n for config in configs {\n- ...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
No need for the function.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "No need for the function.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -211,23 +237,28 @@ impl Config {\n self.tests_build_root.join(self.full_test_name())\n }\n \n+ fn file_system_kinds(&self) -> &[FileSystemKind] {", "resolving_sha": "b72b0263cf97318de2ce...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
Don't like this bool, we should rather use `Option<Vec<FileSystemKind>>` for `file_systems`.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index a7c78da7c35e..e88827e4863c 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -61,6 +61,10 @@ //! `ProgramName:{name}` overrides argv[0]. //! //! `DefaultMappedDirectories:{bool}` controls ...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "Don't like this bool, we should rather use `Option<Vec<FileSystemKind>>` for `file_systems`.", "path": "lib/wasix/tests/wasm_tests/mod.rs", "hunk": "@@ -151,6 +173,8 @@ struct Config {\n test_name: String,\n config_name: String,\n engine: Engine,\n+ file_systems: Vec<FileSys...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
Drop please.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/Makefile b/Makefile index 1fad24bd5858..cca8697f90cb 100644 --- a/Makefile +++ b/Makefile @@ -663,12 +663,6 @@ test-capi-integration-%: # Test the Wasmer C API examples cd lib/c-api/examples; WASMER_CAPI_CONFIG=$(shell echo $@ | sed -e s/test-capi-integration-//) WASMER_DIR=`pwd`/../../../package make ...
[ "Makefile" ]
[ { "comment": "Drop please.", "path": "Makefile", "hunk": "@@ -316,6 +316,10 @@ endif\n compiler_features := --features $(subst $(space),$(comma),$(compilers)),wasmer-artifact-create,static-artifact-create,wasmer-artifact-load,static-artifact-load\n test_compiler_features := --features $(subst $(space),$...
true
wasmerio/wasmer
6,648
comment_to_fix
test(wasix): port wasi-wast tests to wasm harness
Drop as well, we'll be run automatically as part of WASIX tests.
713d1ed39e0f29c6b6b2fdcc8629540859ef0666
b72b0263cf97318de2ceb6c346cf0b81b1029154
diff --git a/Makefile b/Makefile index 1fad24bd5858..cca8697f90cb 100644 --- a/Makefile +++ b/Makefile @@ -663,12 +663,6 @@ test-capi-integration-%: # Test the Wasmer C API examples cd lib/c-api/examples; WASMER_CAPI_CONFIG=$(shell echo $@ | sed -e s/test-capi-integration-//) WASMER_DIR=`pwd`/../../../package make ...
[ "Makefile" ]
[ { "comment": "Drop as well, we'll be run automatically as part of WASIX tests.", "path": "Makefile", "hunk": "@@ -667,7 +671,7 @@ test-wasi-unit:\n \t$(CARGO_BINARY) test $(CARGO_TARGET_FLAG) --manifest-path lib/wasi/Cargo.toml --release --locked\n \n test-wasi:", "resolving_sha": "b72b0263cf97318de...
true
wasmerio/wasmer
6,701
issue_to_patch
ci: pin wasix-libc sysroot and verify it stays current
Use a shared CI constant for the wasix-libc sysroot tag so tests and copilot setup install a known prerelease, and fail CI if the pin falls behind the latest wasix-libc release.
0f78633aec5b468056598b39087bd254f5d42c81
d4553e0d5d81de32a5595d207ad7a566f38412a2
diff --git a/.github/ci-constants.env b/.github/ci-constants.env new file mode 100644 index 000000000000..18da91161fa4 --- /dev/null +++ b/.github/ci-constants.env @@ -0,0 +1,3 @@ +# Shared CI constants. Loaded into GITHUB_ENV by workflows that need them. +# Pinned wasix-libc sysroot (wasix-org/wasix-libc release tag)....
[ ".github/ci-constants.env", ".github/workflows/copilot-setup-steps.yml", ".github/workflows/test.yaml", "lib/wasix/tests/wasm_tests/mod.rs", "lib/wasix/tests/wasm_tests/proc_exec4_newline_arg/build.sh", "lib/wasix/tests/wasm_tests/proc_exec4_newline_env/build.sh", "lib/wasix/tests/wasm_tests/proc_spawn3...
[ { "comment": "With `set -euo pipefail`, this `grep | cut` pipeline will cause the script to exit immediately if the key is missing (or the file is missing), so the `if [ -z \"$pinned\" ]` error message is never reached. Make the lookup non-fatal and optionally error explicitly when the constants file is absent....
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index cae9e7fdab6d..9391bcfe719a 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -572,8 +572,8 @@ fn minimal_libc_skip_reason(config: &Config) -> Result<Option<String>> { }; let is_su...
true
wasmerio/wasmer
6,701
comment_to_fix
ci: pin wasix-libc sysroot and verify it stays current
This step runs in the matrix job that includes `windows-x64`, where the default shell is PowerShell. In PowerShell, `$GITHUB_ENV` won’t expand (it should be `$env:GITHUB_ENV`), and `grep` may not be available in PATH. Set `shell: bash` (as used elsewhere) so the same command works on all runners.
0f78633aec5b468056598b39087bd254f5d42c81
d4553e0d5d81de32a5595d207ad7a566f38412a2
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a38f1d1f031b..e862bc05a83b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -64,7 +64,7 @@ jobs: sudo apt install -y libtinfo6 - uses: actions/setup-go@v6 with: - go-version: '1....
[ ".github/workflows/test.yaml" ]
[ { "comment": "This step runs in the matrix job that includes `windows-x64`, where the default shell is PowerShell. In PowerShell, `$GITHUB_ENV` won’t expand (it should be `$env:GITHUB_ENV`), and `grep` may not be available in PATH. Set `shell: bash` (as used elsewhere) so the same command works on all runners."...
true
wasmerio/wasmer
6,701
comment_to_fix
ci: pin wasix-libc sysroot and verify it stays current
This seems to me unnecessary.
0f78633aec5b468056598b39087bd254f5d42c81
d4553e0d5d81de32a5595d207ad7a566f38412a2
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a38f1d1f031b..e862bc05a83b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -64,7 +64,7 @@ jobs: sudo apt install -y libtinfo6 - uses: actions/setup-go@v6 with: - go-version: '1....
[ ".github/workflows/test.yaml" ]
[ { "comment": "This seems to me unnecessary.", "path": ".github/workflows/test.yaml", "hunk": "@@ -609,6 +621,13 @@ jobs:\n - uses: actions/checkout@v6\n with:\n submodules: true\n+ - name: Load CI constants (musl)", "resolving_sha": "d4553e0d5d81de32a5595d207ad7a566f3841...
true
wasmerio/wasmer
6,686
issue_to_patch
Python os.posix_spawnp() truncates multiline python -c arguments under Wasmer `os.posix_spawnp()` appears to corrupt or truncate `argv` entries containing newlines under Wasmer. This breaks child process execution for multiline `python -c ...` payloads. Native Python handles the same code correctly. ```python impor...
Add proc_spawn3 and proc_exec4, avoiding the \n delimited argv and envp from older syscalls
Fixes #6402.
8999e5069fa31d9a7f2bdb6e410e5b3f0fa73974
b5880b5268b74aefc5b4295767286976d83b0deb
diff --git a/lib/wasix/src/lib.rs b/lib/wasix/src/lib.rs index 9986bae31986..306339026a5f 100644 --- a/lib/wasix/src/lib.rs +++ b/lib/wasix/src/lib.rs @@ -568,12 +568,14 @@ fn wasix_exports_32(mut store: &mut impl AsStoreMut, env: &FunctionEnv<WasiEnv>) "proc_exec" => Function::new_typed_with_env(&mut store, e...
[ "lib/wasix/src/lib.rs", "lib/wasix/src/syscalls/mod.rs", "lib/wasix/src/syscalls/wasix/mod.rs", "lib/wasix/src/syscalls/wasix/proc_exec3.rs", "lib/wasix/src/syscalls/wasix/proc_exec4.rs", "lib/wasix/src/syscalls/wasix/proc_spawn.rs", "lib/wasix/src/syscalls/wasix/proc_spawn2.rs", "lib/wasix/src/syscal...
[ { "comment": "The test expects stdout (`//#ExpectedStdout: proc_exec4 newline arg test passed`), but `proc_exec4` replaces the process so `proc_exec4_newline_arg_child` is what actually runs. Currently the child prints nothing, so this expected stdout line won't be produced.", "path": "lib/wasix/tests/wasm_...
diff --git a/lib/wasix/tests/wasm_tests/proc_exec4_newline_arg/build.sh b/lib/wasix/tests/wasm_tests/proc_exec4_newline_arg/build.sh new file mode 100644 index 000000000000..e6f32646bf90 --- /dev/null +++ b/lib/wasix/tests/wasm_tests/proc_exec4_newline_arg/build.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +##ExpectedStdout...
true
wasmerio/wasmer
6,686
comment_to_fix
Add proc_spawn3 and proc_exec4, avoiding the \n delimited argv and envp from older syscalls
The test expects stdout (`//#ExpectedStdout: proc_exec4 newline arg test passed`), but `proc_exec4` replaces the process so `proc_exec4_newline_arg_child` is what actually runs. Currently the child prints nothing, so this expected stdout line won't be produced.
8999e5069fa31d9a7f2bdb6e410e5b3f0fa73974
b5880b5268b74aefc5b4295767286976d83b0deb
diff --git a/lib/wasix/tests/wasm_tests/proc_exec4_newline_arg/proc_exec4_newline_arg_child.c b/lib/wasix/tests/wasm_tests/proc_exec4_newline_arg/proc_exec4_newline_arg_child.c new file mode 100644 index 000000000000..7d2a12119b4c --- /dev/null +++ b/lib/wasix/tests/wasm_tests/proc_exec4_newline_arg/proc_exec4_newline_...
[ "lib/wasix/tests/wasm_tests/proc_exec4_newline_arg/proc_exec4_newline_arg_child.c" ]
[ { "comment": "The test expects stdout (`//#ExpectedStdout: proc_exec4 newline arg test passed`), but `proc_exec4` replaces the process so `proc_exec4_newline_arg_child` is what actually runs. Currently the child prints nothing, so this expected stdout line won't be produced.", "path": "lib/wasix/tests/wasm_...
true
wasmerio/wasmer
6,686
comment_to_fix
Add proc_spawn3 and proc_exec4, avoiding the \n delimited argv and envp from older syscalls
The test expects stdout (`//#ExpectedStdout: proc_exec4 newline env test passed`), but `proc_exec4` replaces the process so the child module must emit that output. Currently this child prints nothing, so the expected stdout line won't be produced.
8999e5069fa31d9a7f2bdb6e410e5b3f0fa73974
b5880b5268b74aefc5b4295767286976d83b0deb
diff --git a/lib/wasix/tests/wasm_tests/proc_exec4_newline_env/proc_exec4_newline_env_child.c b/lib/wasix/tests/wasm_tests/proc_exec4_newline_env/proc_exec4_newline_env_child.c new file mode 100644 index 000000000000..f914af979846 --- /dev/null +++ b/lib/wasix/tests/wasm_tests/proc_exec4_newline_env/proc_exec4_newline_...
[ "lib/wasix/tests/wasm_tests/proc_exec4_newline_env/proc_exec4_newline_env_child.c" ]
[ { "comment": "The test expects stdout (`//#ExpectedStdout: proc_exec4 newline env test passed`), but `proc_exec4` replaces the process so the child module must emit that output. Currently this child prints nothing, so the expected stdout line won't be produced.", "path": "lib/wasix/tests/wasm_tests/proc_exe...
true
wasmerio/wasmer
6,686
comment_to_fix
Add proc_spawn3 and proc_exec4, avoiding the \n delimited argv and envp from older syscalls
`proc_exec4.rs` calls `block_on(...)` but doesn’t import it, so this module won’t compile. Add `use virtual_mio::block_on;` (and while here, drop the unused `os::task::{OwnedTaskStatus, TaskStatus}` imports).
8999e5069fa31d9a7f2bdb6e410e5b3f0fa73974
b5880b5268b74aefc5b4295767286976d83b0deb
diff --git a/lib/wasix/src/syscalls/wasix/proc_exec4.rs b/lib/wasix/src/syscalls/wasix/proc_exec4.rs new file mode 100644 index 000000000000..a7ef24a44fda --- /dev/null +++ b/lib/wasix/src/syscalls/wasix/proc_exec4.rs @@ -0,0 +1,360 @@ +use virtual_mio::block_on; +use wasmer::FromToNativeWasmType; + +use super::*; +use...
[ "lib/wasix/src/syscalls/wasix/proc_exec4.rs" ]
[ { "comment": "`proc_exec4.rs` calls `block_on(...)` but doesn’t import it, so this module won’t compile. Add `use virtual_mio::block_on;` (and while here, drop the unused `os::task::{OwnedTaskStatus, TaskStatus}` imports).", "path": "lib/wasix/src/syscalls/wasix/proc_exec4.rs", "hunk": "@@ -0,0 +1,363 @...
true
wasmerio/wasmer
6,686
comment_to_fix
Add proc_spawn3 and proc_exec4, avoiding the \n delimited argv and envp from older syscalls
This module imports `FromToNativeWasmType` and `os::task::{OwnedTaskStatus, TaskStatus}` but doesn’t use them. Removing unused imports keeps the syscall implementation easier to read and avoids relying on module-level `#![allow(unused)]`.
8999e5069fa31d9a7f2bdb6e410e5b3f0fa73974
b5880b5268b74aefc5b4295767286976d83b0deb
diff --git a/lib/wasix/src/syscalls/wasix/proc_spawn3.rs b/lib/wasix/src/syscalls/wasix/proc_spawn3.rs new file mode 100644 index 000000000000..809122ffc1a2 --- /dev/null +++ b/lib/wasix/src/syscalls/wasix/proc_spawn3.rs @@ -0,0 +1,262 @@ +use virtual_mio::block_on; +use wasmer_wasix_types::wasi::ProcSpawnFdOpName; + +...
[ "lib/wasix/src/syscalls/wasix/proc_spawn3.rs" ]
[ { "comment": "This module imports `FromToNativeWasmType` and `os::task::{OwnedTaskStatus, TaskStatus}` but doesn’t use them. Removing unused imports keeps the syscall implementation easier to read and avoids relying on module-level `#![allow(unused)]`.", "path": "lib/wasix/src/syscalls/wasix/proc_spawn3.rs"...
true
wasmerio/wasmer
6,686
comment_to_fix
Add proc_spawn3 and proc_exec4, avoiding the \n delimited argv and envp from older syscalls
`FromToNativeWasmType` is no longer used in `proc_spawn2` after refactoring to `proc_spawn3_impl`, so the import can be removed.
8999e5069fa31d9a7f2bdb6e410e5b3f0fa73974
b5880b5268b74aefc5b4295767286976d83b0deb
diff --git a/lib/wasix/src/syscalls/wasix/proc_spawn2.rs b/lib/wasix/src/syscalls/wasix/proc_spawn2.rs index 227ff890c0a6..8d5d09b29694 100644 --- a/lib/wasix/src/syscalls/wasix/proc_spawn2.rs +++ b/lib/wasix/src/syscalls/wasix/proc_spawn2.rs @@ -1,15 +1,10 @@ -use virtual_mio::block_on; -use wasmer::FromToNativeWasmTy...
[ "lib/wasix/src/syscalls/wasix/proc_spawn2.rs" ]
[ { "comment": "`FromToNativeWasmType` is no longer used in `proc_spawn2` after refactoring to `proc_spawn3_impl`, so the import can be removed.", "path": "lib/wasix/src/syscalls/wasix/proc_spawn2.rs", "hunk": "@@ -1,15 +1,12 @@\n-use virtual_mio::block_on;\n use wasmer::FromToNativeWasmType;\n-use wasmer...
true
wasmerio/wasmer
6,686
comment_to_fix
Add proc_spawn3 and proc_exec4, avoiding the \n delimited argv and envp from older syscalls
The doc comment’s return semantics still describe an `exec*`-style syscall (“Does not return otherwise”), but `proc_spawn2` returns to the caller after spawning (writing the PID into `ret`). This is misleading for syscall consumers.
8999e5069fa31d9a7f2bdb6e410e5b3f0fa73974
b5880b5268b74aefc5b4295767286976d83b0deb
diff --git a/lib/wasix/src/syscalls/wasix/proc_spawn2.rs b/lib/wasix/src/syscalls/wasix/proc_spawn2.rs index 227ff890c0a6..8d5d09b29694 100644 --- a/lib/wasix/src/syscalls/wasix/proc_spawn2.rs +++ b/lib/wasix/src/syscalls/wasix/proc_spawn2.rs @@ -1,15 +1,10 @@ -use virtual_mio::block_on; -use wasmer::FromToNativeWasmTy...
[ "lib/wasix/src/syscalls/wasix/proc_spawn2.rs" ]
[ { "comment": "The doc comment’s return semantics still describe an `exec*`-style syscall (“Does not return otherwise”), but `proc_spawn2` returns to the caller after spawning (writing the PID into `ret`). This is misleading for syscall consumers.", "path": "lib/wasix/src/syscalls/wasix/proc_spawn2.rs", ...
true
wasmerio/wasmer
6,677
issue_to_patch
feat(WASIX): compatibility testing with older wasix-libc
The PR implements https://linear.app/wasmer/issue/WARP-62/wasix-backwards-compatibility-testing. @Arshia001: What versions do we want to test?
4bc6ae7ed053f85ab314b346bed5eaa537b9d288
2530093209eb601e51e4d1214f26f25de14ee516
diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 21e184d08c0d..8d2a271a7132 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -72,6 +72,8 @@ jobs: with: github_token: ${{ secrets.GITHUB_TO...
[ ".github/workflows/copilot-setup-steps.yml", ".github/workflows/test.yaml", "Cargo.lock", "Cargo.toml", "lib/wasix/Cargo.toml", "lib/wasix/tests/wasm_tests/mod.rs", "lib/wasix/tests/wasm_tests/pthread_tests/mutex-errorcheck-notrecoverable/main.c", "lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-a...
[ { "comment": "`minimal_libc_skip_reason` currently returns `None` when the selected sysroot is *older* than the required minimal libc, and returns a skip reason when it is new enough. This inverts the intended behavior (it will skip supported sysroots and run unsupported ones).", "path": "lib/wasix/tests/wa...
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index e88827e4863c..1a50a92c711b 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -44,6 +44,9 @@ //! //! `UnixOnly:{bool}` ignores the configuration on non-Unix hosts when true. //! +//! `Minim...
true
wasmerio/wasmer
6,677
comment_to_fix
feat(WASIX): compatibility testing with older wasix-libc
`minimal_libc_skip_reason` currently returns `None` when the selected sysroot is *older* than the required minimal libc, and returns a skip reason when it is new enough. This inverts the intended behavior (it will skip supported sysroots and run unsupported ones).
4bc6ae7ed053f85ab314b346bed5eaa537b9d288
2530093209eb601e51e4d1214f26f25de14ee516
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index e88827e4863c..1a50a92c711b 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -44,6 +44,9 @@ //! //! `UnixOnly:{bool}` ignores the configuration on non-Unix hosts when true. //! +//! `Minim...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "`minimal_libc_skip_reason` currently returns `None` when the selected sysroot is *older* than the required minimal libc, and returns a skip reason when it is new enough. This inverts the intended behavior (it will skip supported sysroots and run unsupported ones).", "path": "lib/wasix/tests/wa...
true
wasmerio/wasmer
6,677
comment_to_fix
feat(WASIX): compatibility testing with older wasix-libc
The new sysroot loop currently only generates tests when `engine == Cranelift` *and* `sysroot` is `Some(...)`, which drops the baseline (default sysroot) runs for all engines/filesystems. This likely disables most of the wasm_tests coverage instead of adding an extra compatibility axis.
4bc6ae7ed053f85ab314b346bed5eaa537b9d288
2530093209eb601e51e4d1214f26f25de14ee516
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index e88827e4863c..1a50a92c711b 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -44,6 +44,9 @@ //! //! `UnixOnly:{bool}` ignores the configuration on non-Unix hosts when true. //! +//! `Minim...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "The new sysroot loop currently only generates tests when `engine == Cranelift` *and* `sysroot` is `Some(...)`, which drops the baseline (default sysroot) runs for all engines/filesystems. This likely disables most of the wasm_tests coverage instead of adding an extra compatibility axis.", "pat...
true
wasmerio/wasmer
6,677
comment_to_fix
feat(WASIX): compatibility testing with older wasix-libc
`set_sysroot` uses `dirs::home_dir().unwrap()`, which will panic if the home directory can't be determined (some CI/container contexts). Since this already returns `Result`, it should surface a regular error instead of crashing the whole test run.
4bc6ae7ed053f85ab314b346bed5eaa537b9d288
2530093209eb601e51e4d1214f26f25de14ee516
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index e88827e4863c..1a50a92c711b 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -44,6 +44,9 @@ //! //! `UnixOnly:{bool}` ignores the configuration on non-Unix hosts when true. //! +//! `Minim...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "`set_sysroot` uses `dirs::home_dir().unwrap()`, which will panic if the home directory can't be determined (some CI/container contexts). Since this already returns `Result`, it should surface a regular error instead of crashing the whole test run.", "path": "lib/wasix/tests/wasm_tests/mod.rs",...
true
wasmerio/wasmer
6,677
comment_to_fix
feat(WASIX): compatibility testing with older wasix-libc
This step's YAML is invalid (`run:` has no scalar value) and it will also run on Windows where `wasixccenv` is not installed (the prior wasixcc install step is skipped on windows). Add an `if:` guard matching the wasixcc step and make `run` a single-line string or a block scalar.
4bc6ae7ed053f85ab314b346bed5eaa537b9d288
2530093209eb601e51e4d1214f26f25de14ee516
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6969e1a1653e..a38f1d1f031b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -667,6 +667,9 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} version: v0.4.3 + - name: Insta...
[ ".github/workflows/test.yaml" ]
[ { "comment": "This step's YAML is invalid (`run:` has no scalar value) and it will also run on Windows where `wasixccenv` is not installed (the prior wasixcc install step is skipped on windows). Add an `if:` guard matching the wasixcc step and make `run` a single-line string or a block scalar.", "path": ".g...
true
wasmerio/wasmer
6,677
comment_to_fix
feat(WASIX): compatibility testing with older wasix-libc
This step's YAML is invalid (`run:` has no scalar value). Use a single-line `run:` value or a `run: |` block so the workflow parses correctly.
4bc6ae7ed053f85ab314b346bed5eaa537b9d288
2530093209eb601e51e4d1214f26f25de14ee516
diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 21e184d08c0d..8d2a271a7132 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -72,6 +72,8 @@ jobs: with: github_token: ${{ secrets.GITHUB_TO...
[ ".github/workflows/copilot-setup-steps.yml" ]
[ { "comment": "This step's YAML is invalid (`run:` has no scalar value). Use a single-line `run:` value or a `run: |` block so the workflow parses correctly.", "path": ".github/workflows/copilot-setup-steps.yml", "hunk": "@@ -72,6 +72,9 @@ jobs:\n with:\n github_token: ${{ secrets.GITHU...
true
wasmerio/wasmer
6,677
comment_to_fix
feat(WASIX): compatibility testing with older wasix-libc
The MinimalLibc skip logic compares versions in the wrong direction: it currently checks `minimal_libc >= sysroot_version`, but the directive intends to skip when the selected sysroot is *older* than the minimum (i.e., it should accept only when `sysroot_version >= minimal_libc`). As written, configurations may run und...
4bc6ae7ed053f85ab314b346bed5eaa537b9d288
2530093209eb601e51e4d1214f26f25de14ee516
diff --git a/lib/wasix/tests/wasm_tests/mod.rs b/lib/wasix/tests/wasm_tests/mod.rs index e88827e4863c..1a50a92c711b 100644 --- a/lib/wasix/tests/wasm_tests/mod.rs +++ b/lib/wasix/tests/wasm_tests/mod.rs @@ -44,6 +44,9 @@ //! //! `UnixOnly:{bool}` ignores the configuration on non-Unix hosts when true. //! +//! `Minim...
[ "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "The MinimalLibc skip logic compares versions in the wrong direction: it currently checks `minimal_libc >= sysroot_version`, but the directive intends to skip when the selected sysroot is *older* than the minimum (i.e., it should accept only when `sysroot_version >= minimal_libc`). As written, conf...
true
wasmerio/wasmer
6,693
issue_to_patch
fix(virtual-fs): remove anyhow from offloaded file test
# Description Small test-only fix in `virtual-fs`. `mem_fs::offloaded_file::tests::test_offload_file` returned `anyhow::Result<()>`, but `anyhow` is optional and not enabled for `--no-default-features --features host-fs`. So a real host-fs test build just falls over. Swapped it to `std::io::Result<()>`. Same t...
8999e5069fa31d9a7f2bdb6e410e5b3f0fa73974
807e2fc6047ed8934acbc740a589e462f67a2574
diff --git a/lib/virtual-fs/src/mem_fs/offloaded_file.rs b/lib/virtual-fs/src/mem_fs/offloaded_file.rs index a975333b671f..f270b025ddf9 100644 --- a/lib/virtual-fs/src/mem_fs/offloaded_file.rs +++ b/lib/virtual-fs/src/mem_fs/offloaded_file.rs @@ -394,10 +394,11 @@ impl OffloadedFile { #[cfg(test)] mod tests { us...
[ "lib/virtual-fs/src/mem_fs/offloaded_file.rs" ]
[]
true
wasmerio/wasmer
6,687
issue_to_patch
fix err_buf_len underflow in write_dl_error
1. err_buf_len is the guest-supplied error buffer length passed to dlopen/dlsym; the truncation path computed `err_buf_len - 1`, which underflows usize when a guest passes 0 (subtract-overflow panic in debug, wraps to a bad str slice in release). 2. when err_buf_len equals the message length the writer emitted the mess...
455388f406800b8b723cfc59a2f381d9ed1d3d59
3626a6ee5fef262f13b166959d24b5190bd0da01
diff --git a/lib/wasix/src/syscalls/wasix/dlopen.rs b/lib/wasix/src/syscalls/wasix/dlopen.rs index 01063772bcea..009fa211109b 100644 --- a/lib/wasix/src/syscalls/wasix/dlopen.rs +++ b/lib/wasix/src/syscalls/wasix/dlopen.rs @@ -77,21 +77,68 @@ pub(crate) fn write_dl_error<M: MemorySize>( err_buf: WasmPtr<u8, M>, ...
[ "lib/wasix/src/syscalls/wasix/dlopen.rs" ]
[]
true
wasmerio/wasmer
6,684
issue_to_patch
fix(cli): missing progress bar
After #6648, we accidentally lost the progress bar support due to us not accidentally enabling `wasmer-wasix/sys-default` from tests. Better than that, we should not depend on `sys-default`, but just on `sys` feature.
d24a2580de25c10c6fe6a49c9e293eed9c759a59
77af16d4e122cb2799c63d2e0bf6f46ab83262de
diff --git a/lib/wasix/Cargo.toml b/lib/wasix/Cargo.toml index 08d0160c7163..1613946018cc 100644 --- a/lib/wasix/Cargo.toml +++ b/lib/wasix/Cargo.toml @@ -225,8 +225,9 @@ sys = [ "ctrlc", "wasmer/wat", "wasmer/js-serializable-module", + "wasmer/sys", ] -sys-default = ["sys", "wasmer/sys"] +sys-default = ["sy...
[ "lib/wasix/Cargo.toml", "lib/wasix/src/runtime/mod.rs" ]
[ { "comment": "`#[cfg(feature = \"sys\")]` enables this block whenever `wasmer-wasix` is built with its `sys` feature, but the block unconditionally references `wasmer::sys::NativeEngineExt` and `Engine::is_sys()`, which only exist when the *dependency* `wasmer` is built with its `sys` feature. In `lib/wasix/Car...
true
wasmerio/wasmer
6,684
comment_to_fix
fix(cli): missing progress bar
`#[cfg(feature = "sys")]` enables this block whenever `wasmer-wasix` is built with its `sys` feature, but the block unconditionally references `wasmer::sys::NativeEngineExt` and `Engine::is_sys()`, which only exist when the *dependency* `wasmer` is built with its `sys` feature. In `lib/wasix/Cargo.toml`, `sys` does **n...
d24a2580de25c10c6fe6a49c9e293eed9c759a59
77af16d4e122cb2799c63d2e0bf6f46ab83262de
diff --git a/lib/wasix/src/runtime/mod.rs b/lib/wasix/src/runtime/mod.rs index bc45b1485cf8..4328433b1d6b 100644 --- a/lib/wasix/src/runtime/mod.rs +++ b/lib/wasix/src/runtime/mod.rs @@ -392,7 +392,7 @@ pub async fn load_module( let p = CompilationProgressCallback::new(move |p| { progress.notify(M...
[ "lib/wasix/src/runtime/mod.rs" ]
[ { "comment": "`#[cfg(feature = \"sys\")]` enables this block whenever `wasmer-wasix` is built with its `sys` feature, but the block unconditionally references `wasmer::sys::NativeEngineExt` and `Engine::is_sys()`, which only exist when the *dependency* `wasmer` is built with its `sys` feature. In `lib/wasix/Car...
true
wasmerio/wasmer
6,684
comment_to_fix
fix(cli): missing progress bar
`sys` now includes `wasmer/sys` (added above), so `sys-default = ["sys", "wasmer/sys"]` is redundant. Keeping both is harmless but makes feature intent harder to read/maintain.
d24a2580de25c10c6fe6a49c9e293eed9c759a59
77af16d4e122cb2799c63d2e0bf6f46ab83262de
diff --git a/lib/wasix/Cargo.toml b/lib/wasix/Cargo.toml index 08d0160c7163..1613946018cc 100644 --- a/lib/wasix/Cargo.toml +++ b/lib/wasix/Cargo.toml @@ -225,8 +225,9 @@ sys = [ "ctrlc", "wasmer/wat", "wasmer/js-serializable-module", + "wasmer/sys", ] -sys-default = ["sys", "wasmer/sys"] +sys-default = ["sy...
[ "lib/wasix/Cargo.toml" ]
[ { "comment": "`sys` now includes `wasmer/sys` (added above), so `sys-default = [\"sys\", \"wasmer/sys\"]` is redundant. Keeping both is harmless but makes feature intent harder to read/maintain.", "path": "lib/wasix/Cargo.toml", "hunk": "@@ -225,6 +225,7 @@ sys = [\n \"ctrlc\",\n \"wasmer/wat\",\n ...
true
wasmerio/wasmer
6,676
issue_to_patch
fix(Artifact): move new enum values to the end
@pmikolajczyk41 The libcalls enum variant was extended in #6672, but unfortunately the new values very not put at the end, but in the middle of the variant space. That broke already existing artifacts.
4bc6ae7ed053f85ab314b346bed5eaa537b9d288
beef15bc51566a797d14f1f6f8933729904815f1
diff --git a/lib/types/src/libcalls.rs b/lib/types/src/libcalls.rs index 92befe6241ba..141f9482f2c8 100644 --- a/lib/types/src/libcalls.rs +++ b/lib/types/src/libcalls.rs @@ -32,13 +32,6 @@ pub enum LibCall { /// nearest.f64 NearestF64, - - /// sqrt.f32 - SqrtF32, - - /// sqrt.f64 - SqrtF64, - ...
[ "lib/types/src/libcalls.rs" ]
[ { "comment": "The appended `sqrt.*` variants now live inside the section documented as “Soft-float routines… ordered to match the GCC runtime library documentation”, which is misleading and makes it easier to accidentally reorder these variants again later. Since the enum discriminant (`LibCall as u16`) is used...
true
wasmerio/wasmer
6,676
comment_to_fix
fix(Artifact): move new enum values to the end
The appended `sqrt.*` variants now live inside the section documented as “Soft-float routines… ordered to match the GCC runtime library documentation”, which is misleading and makes it easier to accidentally reorder these variants again later. Since the enum discriminant (`LibCall as u16`) is used for artifact compatib...
4bc6ae7ed053f85ab314b346bed5eaa537b9d288
beef15bc51566a797d14f1f6f8933729904815f1
diff --git a/lib/types/src/libcalls.rs b/lib/types/src/libcalls.rs index 92befe6241ba..141f9482f2c8 100644 --- a/lib/types/src/libcalls.rs +++ b/lib/types/src/libcalls.rs @@ -32,13 +32,6 @@ pub enum LibCall { /// nearest.f64 NearestF64, - - /// sqrt.f32 - SqrtF32, - - /// sqrt.f64 - SqrtF64, - ...
[ "lib/types/src/libcalls.rs" ]
[ { "comment": "The appended `sqrt.*` variants now live inside the section documented as “Soft-float routines… ordered to match the GCC runtime library documentation”, which is misleading and makes it easier to accidentally reorder these variants again later. Since the enum discriminant (`LibCall as u16`) is used...
true
wasmerio/wasmer
6,674
issue_to_patch
fix(wasix): initialize WasiEnv before side-module TLS init on spawn
## Summary - Adds `dl-spawn-tls-init-under-contention`, a wasm repro that reliably hits the production crash when a spawned thread replays side modules during `create_instance_group` on a pool worker. - Fixes the root cause by calling `initialize_handles_and_layout` (setting `WasiEnv::inner`) immediately after the ...
2db63d0a6f0316672ec638191e3b462d37419bdc
401ef8bf4d5469699b84a7f01a9cf3d606fc00f1
diff --git a/lib/wasix/src/state/linker/instance_group.rs b/lib/wasix/src/state/linker/instance_group.rs index f057d27c0194..7b2617024fd8 100644 --- a/lib/wasix/src/state/linker/instance_group.rs +++ b/lib/wasix/src/state/linker/instance_group.rs @@ -29,6 +29,11 @@ pub(super) struct DlInstance { pub(super) tls_bas...
[ "lib/wasix/src/state/linker/instance_group.rs", "lib/wasix/src/state/linker/mod.rs", "lib/wasix/tests/wasm_tests/dynamic_library_tests/dl-spawn-tls-init-under-contention/build.sh", "lib/wasix/tests/wasm_tests/dynamic_library_tests/dl-spawn-tls-init-under-contention/main.c", "lib/wasix/tests/wasm_tests/dynam...
[]
diff --git a/lib/wasix/tests/wasm_tests/dynamic_library_tests/dl-spawn-tls-init-under-contention/build.sh b/lib/wasix/tests/wasm_tests/dynamic_library_tests/dl-spawn-tls-init-under-contention/build.sh new file mode 100755 index 000000000000..7437859dfd09 --- /dev/null +++ b/lib/wasix/tests/wasm_tests/dynamic_library_te...
true
wasmerio/wasmer
6,678
issue_to_patch
deps: allow unmaintained proc-macro-error2 crate
https://rustsec.org/advisories/RUSTSEC-2026-0173
1d44ac70c6a9dce672611f10240e5b5419ebe4b8
600b41bad2d167c8f4e6199c29d68835c38323fc
diff --git a/deny.toml b/deny.toml index a5076bbeef8b..bb5c53158238 100644 --- a/deny.toml +++ b/deny.toml @@ -77,6 +77,7 @@ ignore = [ "RUSTSEC-2024-0436", # unmaintained 'paste' crate "RUSTSEC-2025-0141", # unmaintained 'bincode' crate + "RUSTSEC-2026-0173", # unmaintained 'proc-macro-error2' ] # If this i...
[ "deny.toml" ]
[]
true
wasmerio/wasmer
6,675
issue_to_patch
fix(cli): return an error when binfmt_misc is missing
# Description `wasmer binfmt` panics if `--binfmt-misc` points to a path that does not exist. This is easy to hit in practice because the flag is user supplied, and `binfmt_misc` is not always mounted either. Small papercut, but the panic is kinda rough rn. This swaps the panic for a normal CLI error and adds a regre...
2db63d0a6f0316672ec638191e3b462d37419bdc
d7bdfcd472af0f718da5f8613836d454ffc9da36
diff --git a/lib/cli/src/commands/binfmt.rs b/lib/cli/src/commands/binfmt.rs index 743261ede478..872335297670 100644 --- a/lib/cli/src/commands/binfmt.rs +++ b/lib/cli/src/commands/binfmt.rs @@ -64,7 +64,7 @@ impl Binfmt { /// execute [Binfmt] pub fn execute(&self) -> Result<()> { if !self.binfmt_mis...
[ "lib/cli/src/commands/binfmt.rs" ]
[]
true
wasmerio/wasmer
6,673
issue_to_patch
CI: enable V8 for Wasmer builds
This PR enables V8 in release builds of the wasmer CLI for targets where a prebuilt Wee8 binary is available. Issues: #6121
2db63d0a6f0316672ec638191e3b462d37419bdc
805c86d8ea955487c84f4e72453f64a88231e483
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b4451b2445e4..7463670309fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,8 +59,7 @@ jobs: cross_compilation_artifact_name: "cross_compiled_from_linux" build_wasm: true ...
[ ".github/workflows/build.yml", "lib/napi" ]
[]
true
wasmerio/wasmer
6,672
issue_to_patch
Add two variants of the `sqrt` libcall
Similar to effort to https://github.com/wasmerio/wasmer/pull/6604: adding float operation libcall support to Wasmer: square root (in both single and double precision). As this doesn't belong to the official soft-float specification, but rather belongs to the other variants already present (like trunc, floor, nearbyi...
24dce18ab24a7b823f0ce70b728d3245e6b910de
640cdf16571b234bca72dfd63c823f6989c4c758
diff --git a/lib/compiler-llvm/src/object_file.rs b/lib/compiler-llvm/src/object_file.rs index 12b30e1155d5..5b5f6e80f774 100644 --- a/lib/compiler-llvm/src/object_file.rs +++ b/lib/compiler-llvm/src/object_file.rs @@ -45,6 +45,8 @@ static LIBCALLS_ELF: phf::Map<&'static str, LibCall> = phf::phf_map! { "floor" => ...
[ "lib/compiler-llvm/src/object_file.rs", "lib/types/src/libcalls.rs", "lib/vm/src/libcalls.rs" ]
[ { "comment": "Adding new variants to a `pub enum` is a semver-breaking change for downstream crates that exhaustively `match` on `LibCall` (no `#[non_exhaustive]` here). If this crate follows semver, consider (mandatory if you want to avoid downstream breakage) marking `LibCall` as `#[non_exhaustive]` in a majo...
true
wasmerio/wasmer
6,672
comment_to_fix
Add two variants of the `sqrt` libcall
Adding new variants to a `pub enum` is a semver-breaking change for downstream crates that exhaustively `match` on `LibCall` (no `#[non_exhaustive]` here). If this crate follows semver, consider (mandatory if you want to avoid downstream breakage) marking `LibCall` as `#[non_exhaustive]` in a major release, or otherwis...
24dce18ab24a7b823f0ce70b728d3245e6b910de
640cdf16571b234bca72dfd63c823f6989c4c758
diff --git a/lib/types/src/libcalls.rs b/lib/types/src/libcalls.rs index b48b833a28df..92befe6241ba 100644 --- a/lib/types/src/libcalls.rs +++ b/lib/types/src/libcalls.rs @@ -33,6 +33,12 @@ pub enum LibCall { /// nearest.f64 NearestF64, + /// sqrt.f32 + SqrtF32, + + /// sqrt.f64 + SqrtF64, + ...
[ "lib/types/src/libcalls.rs" ]
[ { "comment": "Adding new variants to a `pub enum` is a semver-breaking change for downstream crates that exhaustively `match` on `LibCall` (no `#[non_exhaustive]` here). If this crate follows semver, consider (mandatory if you want to avoid downstream breakage) marking `LibCall` as `#[non_exhaustive]` in a majo...
true
wasmerio/wasmer
6,672
comment_to_fix
Add two variants of the `sqrt` libcall
The doc comment reads like a Rust method call (`f32.sqrt`), which is slightly misleading/atypical in Rust docs (usually `f32::sqrt`) and doesn’t mention the WebAssembly semantic. Consider updating it to something like `/// Implementation of f32::sqrt (WebAssembly sqrt instruction)` (and similarly for f64) to make the i...
24dce18ab24a7b823f0ce70b728d3245e6b910de
640cdf16571b234bca72dfd63c823f6989c4c758
diff --git a/lib/vm/src/libcalls.rs b/lib/vm/src/libcalls.rs index 63f88007102c..7b860a41a381 100644 --- a/lib/vm/src/libcalls.rs +++ b/lib/vm/src/libcalls.rs @@ -100,6 +100,18 @@ pub extern "C" fn wasmer_vm_f32_nearest(x: f32) -> f32 { } } +/// Implementation of f32.sqrt +#[unsafe(no_mangle)] +pub extern "C" f...
[ "lib/vm/src/libcalls.rs" ]
[ { "comment": "The doc comment reads like a Rust method call (`f32.sqrt`), which is slightly misleading/atypical in Rust docs (usually `f32::sqrt`) and doesn’t mention the WebAssembly semantic. Consider updating it to something like `/// Implementation of f32::sqrt (WebAssembly sqrt instruction)` (and similarly ...
true
wasmerio/wasmer
6,478
issue_to_patch
Fix sockets not getting an ephemeral port between bind() and listen()
Duplicate of #6473, from a wasmerio branch as requested by @artemyarulin.
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/Makefile b/Makefile index 187f70dc8a5b..3cc750f2e5f0 100644 --- a/Makefile +++ b/Makefile @@ -309,6 +309,8 @@ test_compilers := $(strip $(test_compilers)) # Define the compiler Cargo features for all crates. compiler_features := --features $(subst $(space),$(comma),$(compilers)),wasmer-artifact-create,st...
[ "Makefile", "lib/virtual-net/src/client.rs", "lib/virtual-net/src/host.rs", "lib/virtual-net/src/lib.rs", "lib/virtual-net/src/loopback.rs", "lib/virtual-net/src/meta.rs", "lib/virtual-net/src/server.rs", "lib/virtual-net/src/tests.rs", "lib/wasix/src/net/socket.rs", "lib/wasix/src/syscalls/wasix/...
[ { "comment": "`socket.listen(128)` hard-codes a backlog that may be lower than the OS default/backlog used by `std::net::TcpListener::bind` (previous implementation). This can reduce accept capacity under load and change behavior across platforms. Prefer using the platform’s `SOMAXCONN` (where available) or a c...
diff --git a/lib/wasix/tests/wasm_tests/socket_tests/bind-fail-stays-unbound/main.c b/lib/wasix/tests/wasm_tests/socket_tests/bind-fail-stays-unbound/main.c new file mode 100644 index 000000000000..3b080bd85ad1 --- /dev/null +++ b/lib/wasix/tests/wasm_tests/socket_tests/bind-fail-stays-unbound/main.c @@ -0,0 +1,110 @@ ...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
`socket.listen(128)` hard-codes a backlog that may be lower than the OS default/backlog used by `std::net::TcpListener::bind` (previous implementation). This can reduce accept capacity under load and change behavior across platforms. Prefer using the platform’s `SOMAXCONN` (where available) or a crate-provided “max bac...
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/virtual-net/src/host.rs b/lib/virtual-net/src/host.rs index 3f1af0ff4817..4549a1a8d95e 100644 --- a/lib/virtual-net/src/host.rs +++ b/lib/virtual-net/src/host.rs @@ -4,7 +4,7 @@ use crate::ruleset::{Direction, Ruleset}; use crate::{ IpCidr, IpRoute, NetworkError, Result, SocketStatus, StreamSecur...
[ "lib/virtual-net/src/host.rs" ]
[ { "comment": "`socket.listen(128)` hard-codes a backlog that may be lower than the OS default/backlog used by `std::net::TcpListener::bind` (previous implementation). This can reduce accept capacity under load and change behavior across platforms. Prefer using the platform’s `SOMAXCONN` (where available) or a c...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
This adds a new failure path in the journaling branch: if `socket.addr_local()` fails, `sock_bind` will now error even though the bind itself may have succeeded (observable behavior change when `feature = "journal"`). To keep journaling best-effort, consider falling back to the originally requested `addr` (or skipping ...
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/wasix/src/syscalls/wasix/sock_bind.rs b/lib/wasix/src/syscalls/wasix/sock_bind.rs index 37bec2ac69d5..156db98c1c7e 100644 --- a/lib/wasix/src/syscalls/wasix/sock_bind.rs +++ b/lib/wasix/src/syscalls/wasix/sock_bind.rs @@ -28,7 +28,21 @@ pub fn sock_bind<M: MemorySize>( #[cfg(feature = "journal")...
[ "lib/wasix/src/syscalls/wasix/sock_bind.rs" ]
[ { "comment": "This adds a new failure path in the journaling branch: if `socket.addr_local()` fails, `sock_bind` will now error even though the bind itself may have succeeded (observable behavior change when `feature = \"journal\"`). To keep journaling best-effort, consider falling back to the originally reques...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
`placeholder_from` hard-codes defaults for many fields, which is easy to get out of sync as `SocketProperties` evolves and can unintentionally clear settings if the placeholder state is ever observed. A more maintainable approach is to implement `Default` for `SocketProperties` and use `std::mem::take(props)` when you ...
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/wasix/src/net/socket.rs b/lib/wasix/src/net/socket.rs index 5c6245c2ded1..82eab51a9f62 100644 --- a/lib/wasix/src/net/socket.rs +++ b/lib/wasix/src/net/socket.rs @@ -4,7 +4,7 @@ use std::{ mem::MaybeUninit, net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr}, pin::Pin, - sync::{Arc, RwLock,...
[ "lib/wasix/src/net/socket.rs" ]
[ { "comment": "`placeholder_from` hard-codes defaults for many fields, which is easy to get out of sync as `SocketProperties` evolves and can unintentionally clear settings if the placeholder state is ever observed. A more maintainable approach is to implement `Default` for `SocketProperties` and use `std::mem::...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
`listen_tcp` currently discards its `only_v6` / `reuse_port` / `reuse_addr` parameters and hard-codes `false` when delegating to `bind_tcp`. Even though loopback currently ignores these flags, threading them through avoids surprising behavior and prevents future bugs if loopback later starts honoring those options.
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/virtual-net/src/loopback.rs b/lib/virtual-net/src/loopback.rs index b59519790bcb..72605c5c77da 100644 --- a/lib/virtual-net/src/loopback.rs +++ b/lib/virtual-net/src/loopback.rs @@ -1,4 +1,4 @@ -use std::collections::VecDeque; +use std::collections::{HashSet, VecDeque}; use std::net::SocketAddr; use ...
[ "lib/virtual-net/src/loopback.rs" ]
[ { "comment": "`listen_tcp` currently discards its `only_v6` / `reuse_port` / `reuse_addr` parameters and hard-codes `false` when delegating to `bind_tcp`. Even though loopback currently ignores these flags, threading them through avoids surprising behavior and prevents future bugs if loopback later starts honor...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
`release_socket_bindings()` removes only `recv_tx` and `recv_with_addr_tx`, but `new_socket()` also registers this socket in `accept_tx` and `sent_tx` (and potentially `handlers`). As a result, dropping a socket can leave stale senders/handlers in these maps, causing memory/resource leaks and possibly misrouting future...
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/virtual-net/src/client.rs b/lib/virtual-net/src/client.rs index 3aa10ff1b03d..add48e9464e6 100644 --- a/lib/virtual-net/src/client.rs +++ b/lib/virtual-net/src/client.rs @@ -54,6 +54,7 @@ use crate::VirtualIoSource; use crate::VirtualNetworking; use crate::VirtualRawSocket; use crate::VirtualSocket;...
[ "lib/virtual-net/src/client.rs" ]
[ { "comment": "`release_socket_bindings()` removes only `recv_tx` and `recv_with_addr_tx`, but `new_socket()` also registers this socket in `accept_tx` and `sent_tx` (and potentially `handlers`). As a result, dropping a socket can leave stale senders/handlers in these maps, causing memory/resource leaks and poss...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
`inet_pton()` and `getsockname()` return values are ignored here. If either fails, the test may proceed with an invalid/unspecified address (and `connect()` may fail for confusing reasons). Please check the return values and abort with a clear error on failure.
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c b/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c new file mode 100644 index 000000000000..14e50522e0a1 --- /dev/null +++ b/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c @@ -0,0 +1,200 ...
[ "lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c" ]
[ { "comment": "`inet_pton()` and `getsockname()` return values are ignored here. If either fails, the test may proceed with an invalid/unspecified address (and `connect()` may fail for confusing reasons). Please check the return values and abort with a clear error on failure.", "path": "lib/wasix/tests/wasm_...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
`inet_pton()` return value is ignored for the client bind address. If it fails, the socket will bind to an unintended address and the test result becomes unreliable. Please check the return code and fail the test on error.
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c b/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c new file mode 100644 index 000000000000..14e50522e0a1 --- /dev/null +++ b/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c @@ -0,0 +1,200 ...
[ "lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c" ]
[ { "comment": "`inet_pton()` return value is ignored for the client bind address. If it fails, the socket will bind to an unintended address and the test result becomes unreliable. Please check the return code and fail the test on error.", "path": "lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
A TCP socket that has been bound but not connected should not report a synthetic peer address. POSIX `getpeername` on an unconnected TCP socket fails with `ENOTCONN`; returning `0.0.0.0:0`/`[::]:0` here makes a successfully bound-but-unconnected socket look like it has a peer and can hide application bugs.
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/wasix/src/net/socket.rs b/lib/wasix/src/net/socket.rs index 5c6245c2ded1..82eab51a9f62 100644 --- a/lib/wasix/src/net/socket.rs +++ b/lib/wasix/src/net/socket.rs @@ -4,7 +4,7 @@ use std::{ mem::MaybeUninit, net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr}, pin::Pin, - sync::{Arc, RwLock,...
[ "lib/wasix/src/net/socket.rs" ]
[ { "comment": "A TCP socket that has been bound but not connected should not report a synthetic peer address. POSIX `getpeername` on an unconnected TCP socket fails with `ENOTCONN`; returning `0.0.0.0:0`/`[::]:0` here makes a successfully bound-but-unconnected socket look like it has a peer and can hide applicat...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
Open question: should `sock_bind(..., port 0)` silently keep the old delayed-bind behavior when a backend returns `Unsupported` here? The core fix depends on `bind` being able to report the effective ephemeral port immediately, so falling back to `Ok(None)` means those backends can still return port 0 from `getsockname...
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/wasix/src/net/socket.rs b/lib/wasix/src/net/socket.rs index 5c6245c2ded1..82eab51a9f62 100644 --- a/lib/wasix/src/net/socket.rs +++ b/lib/wasix/src/net/socket.rs @@ -4,7 +4,7 @@ use std::{ mem::MaybeUninit, net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr}, pin::Pin, - sync::{Arc, RwLock,...
[ "lib/wasix/src/net/socket.rs" ]
[ { "comment": "Open question: should `sock_bind(..., port 0)` silently keep the old delayed-bind behavior when a backend returns `Unsupported` here? The core fix depends on `bind` being able to report the effective ephemeral port immediately, so falling back to `Ok(None)` means those backends can still return po...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
`InodeSocketProtected::poll_write_ready` reports a `BoundTcp` socket as writable with `Poll::Ready(Ok(0))`. In the WASIX poll/select path, a ready event with `nbytes == 0` is interpreted as a hangup (see `InodeValFilePollGuardJoin` setting `FD_READWRITE_HANGUP` when `bytes_available == 0`), which can make a freshly-bou...
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/wasix/src/net/socket.rs b/lib/wasix/src/net/socket.rs index 5c6245c2ded1..82eab51a9f62 100644 --- a/lib/wasix/src/net/socket.rs +++ b/lib/wasix/src/net/socket.rs @@ -4,7 +4,7 @@ use std::{ mem::MaybeUninit, net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr}, pin::Pin, - sync::{Arc, RwLock,...
[ "lib/wasix/src/net/socket.rs" ]
[ { "comment": "`InodeSocketProtected::poll_write_ready` reports a `BoundTcp` socket as writable with `Poll::Ready(Ok(0))`. In the WASIX poll/select path, a ready event with `nbytes == 0` is interpreted as a hangup (see `InodeValFilePollGuardJoin` setting `FD_READWRITE_HANGUP` when `bytes_available == 0`), which ...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
`ListenBound` returns `NetworkError::Unsupported` when the `socket_id` does not exist (`guard.get_mut(&socket_id)` is `None`). For consistency with other socket operations (and the `Close` handler just above), a missing socket should report `NetworkError::InvalidFd` so clients can distinguish an invalid descriptor from...
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/virtual-net/src/server.rs b/lib/virtual-net/src/server.rs index 7a0b8a6c6feb..f7ff2564e457 100644 --- a/lib/virtual-net/src/server.rs +++ b/lib/virtual-net/src/server.rs @@ -1,8 +1,9 @@ use crate::meta::{FrameSerializationFormat, ResponseType}; use crate::rx_tx::{RemoteRx, RemoteTx, RemoteTxWakers}; ...
[ "lib/virtual-net/src/server.rs" ]
[ { "comment": "`ListenBound` returns `NetworkError::Unsupported` when the `socket_id` does not exist (`guard.get_mut(&socket_id)` is `None`). For consistency with other socket operations (and the `Close` handler just above), a missing socket should report `NetworkError::InvalidFd` so clients can distinguish an i...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
`ConnectBound` returns `NetworkError::Unsupported` when the `socket_id` does not exist (`guard.get_mut(&socket_id)` is `None`). This should likely be `NetworkError::InvalidFd` (matching `process_inner` behavior and the `Close` handler) so callers get an accurate error for stale/invalid socket IDs.
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/virtual-net/src/server.rs b/lib/virtual-net/src/server.rs index 7a0b8a6c6feb..f7ff2564e457 100644 --- a/lib/virtual-net/src/server.rs +++ b/lib/virtual-net/src/server.rs @@ -1,8 +1,9 @@ use crate::meta::{FrameSerializationFormat, ResponseType}; use crate::rx_tx::{RemoteRx, RemoteTx, RemoteTxWakers}; ...
[ "lib/virtual-net/src/server.rs" ]
[ { "comment": "`ConnectBound` returns `NetworkError::Unsupported` when the `socket_id` does not exist (`guard.get_mut(&socket_id)` is `None`). This should likely be `NetworkError::InvalidFd` (matching `process_inner` behavior and the `Close` handler) so callers get an accurate error for stale/invalid socket IDs....
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
`normalize_listener_addr()` is used to normalize listener/bind reservation keys (e.g., 0.0.0.0/:: → localhost). However, `loopback_connect_to()` still looks up `tcp_listeners` using the raw `peer_addr` without normalization, so connecting to a listener bound on an unspecified address will miss the intended entry and ma...
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/virtual-net/src/loopback.rs b/lib/virtual-net/src/loopback.rs index b59519790bcb..72605c5c77da 100644 --- a/lib/virtual-net/src/loopback.rs +++ b/lib/virtual-net/src/loopback.rs @@ -1,4 +1,4 @@ -use std::collections::VecDeque; +use std::collections::{HashSet, VecDeque}; use std::net::SocketAddr; use ...
[ "lib/virtual-net/src/loopback.rs" ]
[ { "comment": "`normalize_listener_addr()` is used to normalize listener/bind reservation keys (e.g., 0.0.0.0/:: → localhost). However, `loopback_connect_to()` still looks up `tcp_listeners` using the raw `peer_addr` without normalization, so connecting to a listener bound on an unspecified address will miss the...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
In the UDP bind path, the socket address is written into `PreSocket.addr` / `RemoteSocket.local_addr` before awaiting `net.bind_udp(...)`, but on error (or bind timeout) that pre-set address is not rolled back. That leaves the socket logically "bound" per `getsockname()` even though `bind()` failed, which diverges from...
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/wasix/src/net/socket.rs b/lib/wasix/src/net/socket.rs index 5c6245c2ded1..82eab51a9f62 100644 --- a/lib/wasix/src/net/socket.rs +++ b/lib/wasix/src/net/socket.rs @@ -4,7 +4,7 @@ use std::{ mem::MaybeUninit, net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr}, pin::Pin, - sync::{Arc, RwLock,...
[ "lib/wasix/src/net/socket.rs" ]
[ { "comment": "In the UDP bind path, the socket address is written into `PreSocket.addr` / `RemoteSocket.local_addr` before awaiting `net.bind_udp(...)`, but on error (or bind timeout) that pre-set address is not rolled back. That leaves the socket logically \"bound\" per `getsockname()` even though `bind()` fai...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
`setsockopt(SO_REUSEADDR)` return value is ignored here. If it fails (e.g., option unsupported), the test can later fail in a confusing way. Please check the return and abort with a clear error so failures are attributable.
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c b/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c new file mode 100644 index 000000000000..14e50522e0a1 --- /dev/null +++ b/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c @@ -0,0 +1,200 ...
[ "lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c" ]
[ { "comment": "`setsockopt(SO_REUSEADDR)` return value is ignored here. If it fails (e.g., option unsupported), the test can later fail in a confusing way. Please check the return and abort with a clear error so failures are attributable.", "path": "lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
`setsockopt(SO_REUSEADDR)` return value is ignored here. If it fails, the rest of the test may produce misleading bind/connect errors. Check and fail fast with a clear message.
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c b/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c new file mode 100644 index 000000000000..14e50522e0a1 --- /dev/null +++ b/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c @@ -0,0 +1,200 ...
[ "lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c" ]
[ { "comment": "`setsockopt(SO_REUSEADDR)` return value is ignored here. If it fails, the rest of the test may produce misleading bind/connect errors. Check and fail fast with a clear message.", "path": "lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c", "hunk": "@@ -0,0 +1,186 @@\n...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
`setsockopt(SO_REUSEADDR)` return value is ignored here. If it fails, the subsequent bind failure message may incorrectly imply port-reservation semantics issues. Check the return and exit with a clear error.
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c b/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c new file mode 100644 index 000000000000..14e50522e0a1 --- /dev/null +++ b/lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c @@ -0,0 +1,200 ...
[ "lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c" ]
[ { "comment": "`setsockopt(SO_REUSEADDR)` return value is ignored here. If it fails, the subsequent bind failure message may incorrectly imply port-reservation semantics issues. Check the return and exit with a clear error.", "path": "lib/wasix/tests/wasm_tests/socket_tests/connect-holds-local-port/main.c", ...
true
wasmerio/wasmer
6,478
comment_to_fix
Fix sockets not getting an ephemeral port between bind() and listen()
In the TCP bind path, treating `NetworkError::Unsupported` as a hard error (`Errno::Notsup`) is a behavioral regression for any `VirtualNetworking` implementation that hasn’t been updated to implement `bind_tcp` yet (e.g. `AskingNetworking` in `lib/cli/.../net.rs` currently forwards `listen_tcp/connect_tcp` but not `bi...
386dd14f56d97ff0847ffaf9d0f996acded7f9cc
e6fef03b3719c45193b63fbc0e43d135e7aff953
diff --git a/lib/wasix/src/net/socket.rs b/lib/wasix/src/net/socket.rs index 5c6245c2ded1..82eab51a9f62 100644 --- a/lib/wasix/src/net/socket.rs +++ b/lib/wasix/src/net/socket.rs @@ -4,7 +4,7 @@ use std::{ mem::MaybeUninit, net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr}, pin::Pin, - sync::{Arc, RwLock,...
[ "lib/wasix/src/net/socket.rs" ]
[ { "comment": "In the TCP bind path, treating `NetworkError::Unsupported` as a hard error (`Errno::Notsup`) is a behavioral regression for any `VirtualNetworking` implementation that hasn’t been updated to implement `bind_tcp` yet (e.g. `AskingNetworking` in `lib/cli/.../net.rs` currently forwards `listen_tcp/co...
true
wasmerio/wasmer
6,668
issue_to_patch
fix: focused unlink test & move unlink-fd-write-after-unlink
# Description - moved unlink-fd-write-after-unlink test under the new test harness - added a focused unlink regression test
1a4585c0c767b720275172f3270c739779769930
9b5a85f7b9cdcd880f138a23e88fdca6df4d9161
[ "lib/wasix/tests/wasm_tests/fd_tests/fd-unlink/main.c", "lib/wasix/tests/wasm_tests/fd_tests/fd-write-after-unlink/main.c", "tests/wasix/unlink-open-fd-write-after-unlink/run.sh" ]
[]
diff --git a/lib/wasix/tests/wasm_tests/fd_tests/fd-unlink/main.c b/lib/wasix/tests/wasm_tests/fd_tests/fd-unlink/main.c new file mode 100644 index 000000000000..3f6522947789 --- /dev/null +++ b/lib/wasix/tests/wasm_tests/fd_tests/fd-unlink/main.c @@ -0,0 +1,30 @@ +#include <assert.h> +#include <errno.h> +#include <fcn...
true
wasmerio/wasmer
6,667
issue_to_patch
Make proper atomic loads from the guest's memory in the atomics libcalls
Previously, we were constructing an `AtomicPtr` and then loading from it, which does the wrong thing; it loads the _pointer_ atomically, then make a non-atomic read of the target address. This change fixes that mistake by using `AtomicU32/U64::from_ptr` which will load the target value atomically. I tried implementi...
f28c5340dcdd3cdeb8c41f1ecb557c86f1992290
ec3b2bb3162532f7ac368d181f0f894078d1d87e
diff --git a/lib/vm/src/threadconditions.rs b/lib/vm/src/threadconditions.rs index f6c8dfbb8353..d1ef95c32808 100644 --- a/lib/vm/src/threadconditions.rs +++ b/lib/vm/src/threadconditions.rs @@ -1,8 +1,7 @@ use std::{ - sync::atomic::AtomicPtr, sync::{ Arc, - atomic::{AtomicBool, Ordering}, + ...
[ "lib/vm/src/threadconditions.rs", "lib/vm/src/vmcontext.rs" ]
[ { "comment": "`dst.address` is a `u32` byte offset, but it’s cast to `isize` and used with `ptr::offset`. On 32-bit targets, offsets >= 2^31 wrap to negative, which can compute the wrong address / trigger UB. Using `add(usize)` avoids the signed cast and wraparound.", "path": "lib/vm/src/threadconditions.rs...
true
wasmerio/wasmer
6,667
comment_to_fix
Make proper atomic loads from the guest's memory in the atomics libcalls
`dst.address` is a `u32` byte offset, but it’s cast to `isize` and used with `ptr::offset`. On 32-bit targets, offsets >= 2^31 wrap to negative, which can compute the wrong address / trigger UB. Using `add(usize)` avoids the signed cast and wraparound.
f28c5340dcdd3cdeb8c41f1ecb557c86f1992290
ec3b2bb3162532f7ac368d181f0f894078d1d87e
diff --git a/lib/vm/src/threadconditions.rs b/lib/vm/src/threadconditions.rs index f6c8dfbb8353..d1ef95c32808 100644 --- a/lib/vm/src/threadconditions.rs +++ b/lib/vm/src/threadconditions.rs @@ -1,8 +1,7 @@ use std::{ - sync::atomic::AtomicPtr, sync::{ Arc, - atomic::{AtomicBool, Ordering}, + ...
[ "lib/vm/src/threadconditions.rs" ]
[ { "comment": "`dst.address` is a `u32` byte offset, but it’s cast to `isize` and used with `ptr::offset`. On 32-bit targets, offsets >= 2^31 wrap to negative, which can compute the wrong address / trigger UB. Using `add(usize)` avoids the signed cast and wraparound.", "path": "lib/vm/src/threadconditions.rs...
true
wasmerio/wasmer
6,667
comment_to_fix
Make proper atomic loads from the guest's memory in the atomics libcalls
Same issue as the U32 case: casting the `u32` byte offset to `isize` and using `offset()` can wrap on 32-bit targets. Prefer `add(dst.address as usize)` to avoid signed overflow/wraparound.
f28c5340dcdd3cdeb8c41f1ecb557c86f1992290
ec3b2bb3162532f7ac368d181f0f894078d1d87e
diff --git a/lib/vm/src/threadconditions.rs b/lib/vm/src/threadconditions.rs index f6c8dfbb8353..d1ef95c32808 100644 --- a/lib/vm/src/threadconditions.rs +++ b/lib/vm/src/threadconditions.rs @@ -1,8 +1,7 @@ use std::{ - sync::atomic::AtomicPtr, sync::{ Arc, - atomic::{AtomicBool, Ordering}, + ...
[ "lib/vm/src/threadconditions.rs" ]
[ { "comment": "Same issue as the U32 case: casting the `u32` byte offset to `isize` and using `offset()` can wrap on 32-bit targets. Prefer `add(dst.address as usize)` to avoid signed overflow/wraparound.", "path": "lib/vm/src/threadconditions.rs", "hunk": "@@ -143,14 +142,12 @@ impl ThreadConditions {\n...
true
wasmerio/wasmer
6,666
issue_to_patch
Align DummyUnwindRegistry with the UnwindRegistry interface
The dummy unwind registry fallback (used on non-unix, non-Windows-x64 targets) had drifted out of sync with its call sites and sibling implementations (`systemv.rs`, `windows_x64.rs`): - `register` accepted `&CompiledFunctionUnwindInfo` (the owned type), while both call sites and the other registries use `&Compile...
a602a659eef889578b8fc5bee7ae3104313637c9
b2a3e3f3425614c1f95732dcc000407963b8c581
diff --git a/lib/compiler/src/engine/unwind/dummy.rs b/lib/compiler/src/engine/unwind/dummy.rs index 0a34e29fd560..103dac72a38d 100644 --- a/lib/compiler/src/engine/unwind/dummy.rs +++ b/lib/compiler/src/engine/unwind/dummy.rs @@ -1,6 +1,6 @@ //! Module for Dummy unwind registry. -use wasmer_types::CompiledFunctionU...
[ "lib/compiler/src/engine/unwind/dummy.rs" ]
[ { "comment": "Renaming a `pub` method from `publish` to `publish_eh_frame` is an API-breaking change for any callers of `DummyUnwindRegistry`. If this type is part of a public API surface, consider keeping `publish` as a forwarding wrapper (or deprecating it) to preserve compatibility, e.g. `publish(...) { self...
true
wasmerio/wasmer
6,666
comment_to_fix
Align DummyUnwindRegistry with the UnwindRegistry interface
Renaming a `pub` method from `publish` to `publish_eh_frame` is an API-breaking change for any callers of `DummyUnwindRegistry`. If this type is part of a public API surface, consider keeping `publish` as a forwarding wrapper (or deprecating it) to preserve compatibility, e.g. `publish(...) { self.publish_eh_frame(...)...
a602a659eef889578b8fc5bee7ae3104313637c9
b2a3e3f3425614c1f95732dcc000407963b8c581
diff --git a/lib/compiler/src/engine/unwind/dummy.rs b/lib/compiler/src/engine/unwind/dummy.rs index 0a34e29fd560..103dac72a38d 100644 --- a/lib/compiler/src/engine/unwind/dummy.rs +++ b/lib/compiler/src/engine/unwind/dummy.rs @@ -1,6 +1,6 @@ //! Module for Dummy unwind registry. -use wasmer_types::CompiledFunctionU...
[ "lib/compiler/src/engine/unwind/dummy.rs" ]
[ { "comment": "Renaming a `pub` method from `publish` to `publish_eh_frame` is an API-breaking change for any callers of `DummyUnwindRegistry`. If this type is part of a public API surface, consider keeping `publish` as a forwarding wrapper (or deprecating it) to preserve compatibility, e.g. `publish(...) { self...
true
wasmerio/wasmer
6,666
comment_to_fix
Align DummyUnwindRegistry with the UnwindRegistry interface
The doc comment no longer matches the method name/signature after the rename. Consider updating the comment to mention EH frame publishing (or clarify that this is a no-op dummy implementation that accepts an optional EH frame payload).
a602a659eef889578b8fc5bee7ae3104313637c9
b2a3e3f3425614c1f95732dcc000407963b8c581
diff --git a/lib/compiler/src/engine/unwind/dummy.rs b/lib/compiler/src/engine/unwind/dummy.rs index 0a34e29fd560..103dac72a38d 100644 --- a/lib/compiler/src/engine/unwind/dummy.rs +++ b/lib/compiler/src/engine/unwind/dummy.rs @@ -1,6 +1,6 @@ //! Module for Dummy unwind registry. -use wasmer_types::CompiledFunctionU...
[ "lib/compiler/src/engine/unwind/dummy.rs" ]
[ { "comment": "The doc comment no longer matches the method name/signature after the rename. Consider updating the comment to mention EH frame publishing (or clarify that this is a no-op dummy implementation that accepts an optional EH frame payload).", "path": "lib/compiler/src/engine/unwind/dummy.rs", ...
true
wasmerio/wasmer
6,665
issue_to_patch
chore: address build/clippy warnings
64427950599657ee519dd7f6bc1fc729c5cafc44
8ab11ac588859024b87f35b6ca8d65ce25409dee
diff --git a/lib/vm/src/interrupt_registry/unsupported.rs b/lib/vm/src/interrupt_registry/unsupported.rs index f35b53e86e9e..0825e9e7ea64 100644 --- a/lib/vm/src/interrupt_registry/unsupported.rs +++ b/lib/vm/src/interrupt_registry/unsupported.rs @@ -9,18 +9,18 @@ pub fn install(store_id: StoreId) -> Result<InterruptIn...
[ "lib/api/tests/module.rs", "lib/vm/src/interrupt_registry/unsupported.rs", "lib/vm/src/trap/traphandlers.rs", "lib/wasix/src/fs/mod.rs", "lib/wasix/tests/wasm_tests/mod.rs" ]
[ { "comment": "`#[warn(unused)]` on the `ComponentResolution::Special` variant appears to be a no-op in this module (there are no surrounding `allow/deny` lint attributes for `unused` here), and it doesn’t suppress any unused/dead_code lint that would typically cause build/clippy failures. Keeping it may be conf...
diff --git a/lib/api/tests/module.rs b/lib/api/tests/module.rs index e50981bd630f..31969694d0c1 100644 --- a/lib/api/tests/module.rs +++ b/lib/api/tests/module.rs @@ -305,7 +305,6 @@ mod function_extents_tests { /// Returns a [`Store`] backed by the sys engine using whatever compiler is /// available. Craneli...
true
wasmerio/wasmer
6,665
comment_to_fix
chore: address build/clippy warnings
`#[warn(unused)]` on the `ComponentResolution::Special` variant appears to be a no-op in this module (there are no surrounding `allow/deny` lint attributes for `unused` here), and it doesn’t suppress any unused/dead_code lint that would typically cause build/clippy failures. Keeping it may be confusing for future reade...
64427950599657ee519dd7f6bc1fc729c5cafc44
8ab11ac588859024b87f35b6ca8d65ce25409dee
diff --git a/lib/wasix/src/fs/mod.rs b/lib/wasix/src/fs/mod.rs index 2910b65d1b22..751e89a09e85 100644 --- a/lib/wasix/src/fs/mod.rs +++ b/lib/wasix/src/fs/mod.rs @@ -293,6 +293,7 @@ struct EphemeralSymlinkEntry { #[derive(Debug)] #[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))] +#[warn(unused)...
[ "lib/wasix/src/fs/mod.rs" ]
[ { "comment": "`#[warn(unused)]` on the `ComponentResolution::Special` variant appears to be a no-op in this module (there are no surrounding `allow/deny` lint attributes for `unused` here), and it doesn’t suppress any unused/dead_code lint that would typically cause build/clippy failures. Keeping it may be conf...
true
wasmerio/wasmer
6,663
issue_to_patch
fix(llvm): recognise soft-float libcalls when cross-compiling to RISC-V
### Problem `SOFTFLOAT_LIBCALLS_ELF` and its lookup branch were gated on `#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"), not(target_feature = "f"))]`, which checks the **host** architecture, not the LLVM output target. Cross-compiling a WASM module to soft-float RISC-V from a macOS or x86-64 host panic...
43daa0c8fa364ba23a8c8eb6bb6cacf40d066ef5
0d4768bcd14f48135bd8211d3e499448cef0bf64
diff --git a/lib/compiler-llvm/src/object_file.rs b/lib/compiler-llvm/src/object_file.rs index 60d8fdf5b7f3..12b30e1155d5 100644 --- a/lib/compiler-llvm/src/object_file.rs +++ b/lib/compiler-llvm/src/object_file.rs @@ -1,5 +1,7 @@ use object::{Object, ObjectSection, ObjectSymbol}; -use target_lexicon::BinaryFormat; +u...
[ "lib/compiler-llvm/src/object_file.rs", "lib/compiler-llvm/src/translator/code.rs", "lib/compiler-llvm/src/translator/trampoline.rs" ]
[ { "comment": "The new logic expands soft-float libcall resolution from “RISC-V without hardware float” (previous cfg-gated behavior) to “any RISC-V”, which can change relocation resolution on hard-float RISC-V targets. This isn’t guaranteed to be harmless: if an undefined symbol coincides with a soft-float buil...
true
wasmerio/wasmer
6,663
comment_to_fix
fix(llvm): recognise soft-float libcalls when cross-compiling to RISC-V
The new logic expands soft-float libcall resolution from “RISC-V without hardware float” (previous cfg-gated behavior) to “any RISC-V”, which can change relocation resolution on hard-float RISC-V targets. This isn’t guaranteed to be harmless: if an undefined symbol coincides with a soft-float builtin name (e.g. `__adds...
43daa0c8fa364ba23a8c8eb6bb6cacf40d066ef5
0d4768bcd14f48135bd8211d3e499448cef0bf64
diff --git a/lib/compiler-llvm/src/object_file.rs b/lib/compiler-llvm/src/object_file.rs index 60d8fdf5b7f3..12b30e1155d5 100644 --- a/lib/compiler-llvm/src/object_file.rs +++ b/lib/compiler-llvm/src/object_file.rs @@ -1,5 +1,7 @@ use object::{Object, ObjectSection, ObjectSymbol}; -use target_lexicon::BinaryFormat; +u...
[ "lib/compiler-llvm/src/object_file.rs" ]
[ { "comment": "The new logic expands soft-float libcall resolution from “RISC-V without hardware float” (previous cfg-gated behavior) to “any RISC-V”, which can change relocation resolution on hard-float RISC-V targets. This isn’t guaranteed to be harmless: if an undefined symbol coincides with a soft-float buil...
true
wasmerio/wasmer
6,663
comment_to_fix
fix(llvm): recognise soft-float libcalls when cross-compiling to RISC-V
The new logic expands soft-float libcall resolution from “RISC-V without hardware float” (previous cfg-gated behavior) to “any RISC-V”, which can change relocation resolution on hard-float RISC-V targets. This isn’t guaranteed to be harmless: if an undefined symbol coincides with a soft-float builtin name (e.g. `__adds...
43daa0c8fa364ba23a8c8eb6bb6cacf40d066ef5
0d4768bcd14f48135bd8211d3e499448cef0bf64
diff --git a/lib/compiler-llvm/src/object_file.rs b/lib/compiler-llvm/src/object_file.rs index 60d8fdf5b7f3..12b30e1155d5 100644 --- a/lib/compiler-llvm/src/object_file.rs +++ b/lib/compiler-llvm/src/object_file.rs @@ -1,5 +1,7 @@ use object::{Object, ObjectSection, ObjectSymbol}; -use target_lexicon::BinaryFormat; +u...
[ "lib/compiler-llvm/src/object_file.rs" ]
[ { "comment": "The new logic expands soft-float libcall resolution from “RISC-V without hardware float” (previous cfg-gated behavior) to “any RISC-V”, which can change relocation resolution on hard-float RISC-V targets. This isn’t guaranteed to be harmless: if an undefined symbol coincides with a soft-float buil...
true
wasmerio/wasmer
6,663
comment_to_fix
fix(llvm): recognise soft-float libcalls when cross-compiling to RISC-V
The `is_riscv_softfloat` predicate is too coarse for LLVM’s behavior when only *some* FP is available (e.g., `riscv32imafc` has `F` but not necessarily `D`). In that scenario LLVM can still emit soft-float helper calls for `f64` (and potentially other FP ops), but this code will refuse to classify any of those symbols ...
43daa0c8fa364ba23a8c8eb6bb6cacf40d066ef5
0d4768bcd14f48135bd8211d3e499448cef0bf64
diff --git a/lib/compiler-llvm/src/object_file.rs b/lib/compiler-llvm/src/object_file.rs index 60d8fdf5b7f3..12b30e1155d5 100644 --- a/lib/compiler-llvm/src/object_file.rs +++ b/lib/compiler-llvm/src/object_file.rs @@ -1,5 +1,7 @@ use object::{Object, ObjectSection, ObjectSymbol}; -use target_lexicon::BinaryFormat; +u...
[ "lib/compiler-llvm/src/object_file.rs" ]
[ { "comment": "The `is_riscv_softfloat` predicate is too coarse for LLVM’s behavior when only *some* FP is available (e.g., `riscv32imafc` has `F` but not necessarily `D`). In that scenario LLVM can still emit soft-float helper calls for `f64` (and potentially other FP ops), but this code will refuse to classify...
true
wasmerio/wasmer
6,663
comment_to_fix
fix(llvm): recognise soft-float libcalls when cross-compiling to RISC-V
The `is_riscv_softfloat` predicate is too coarse for LLVM’s behavior when only *some* FP is available (e.g., `riscv32imafc` has `F` but not necessarily `D`). In that scenario LLVM can still emit soft-float helper calls for `f64` (and potentially other FP ops), but this code will refuse to classify any of those symbols ...
43daa0c8fa364ba23a8c8eb6bb6cacf40d066ef5
0d4768bcd14f48135bd8211d3e499448cef0bf64
diff --git a/lib/compiler-llvm/src/object_file.rs b/lib/compiler-llvm/src/object_file.rs index 60d8fdf5b7f3..12b30e1155d5 100644 --- a/lib/compiler-llvm/src/object_file.rs +++ b/lib/compiler-llvm/src/object_file.rs @@ -1,5 +1,7 @@ use object::{Object, ObjectSection, ObjectSymbol}; -use target_lexicon::BinaryFormat; +u...
[ "lib/compiler-llvm/src/object_file.rs" ]
[ { "comment": "The `is_riscv_softfloat` predicate is too coarse for LLVM’s behavior when only *some* FP is available (e.g., `riscv32imafc` has `F` but not necessarily `D`). In that scenario LLVM can still emit soft-float helper calls for `f64` (and potentially other FP ops), but this code will refuse to classify...
true
wasmerio/wasmer
6,663
comment_to_fix
fix(llvm): recognise soft-float libcalls when cross-compiling to RISC-V
`load_object_file` is `pub`, and adding a new required parameter (`triple: &Triple`) is a breaking API change for downstream callers. If this crate/module has external consumers, consider either (a) adding a new function (e.g., `load_object_file_with_triple`) and keeping the old signature as a wrapper (using an “unknow...
43daa0c8fa364ba23a8c8eb6bb6cacf40d066ef5
0d4768bcd14f48135bd8211d3e499448cef0bf64
diff --git a/lib/compiler-llvm/src/object_file.rs b/lib/compiler-llvm/src/object_file.rs index 60d8fdf5b7f3..12b30e1155d5 100644 --- a/lib/compiler-llvm/src/object_file.rs +++ b/lib/compiler-llvm/src/object_file.rs @@ -1,5 +1,7 @@ use object::{Object, ObjectSection, ObjectSymbol}; -use target_lexicon::BinaryFormat; +u...
[ "lib/compiler-llvm/src/object_file.rs" ]
[ { "comment": "`load_object_file` is `pub`, and adding a new required parameter (`triple: &Triple`) is a breaking API change for downstream callers. If this crate/module has external consumers, consider either (a) adding a new function (e.g., `load_object_file_with_triple`) and keeping the old signature as a wra...
true
wasmerio/wasmer
6,664
issue_to_patch
test(wasix): add getaddrinfo AF_INET family filtering regression test
Guards against wasix-libc returning IPv6 sockaddr entries when AF_INET is requested, which breaks AF_INET socket connect() callers. Corresponds to change in wasix-org/wasix-libc#114.
43daa0c8fa364ba23a8c8eb6bb6cacf40d066ef5
82f872d0e4f61624ea479b275a71f66265c56371
[ "lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c" ]
[ { "comment": "`struct sockaddr_in` is used (via `sizeof(struct sockaddr_in)`), but the file doesn’t include `<netinet/in.h>`, which is the standard header that defines `struct sockaddr_in`. Depending on the libc headers, this can fail to compile.", "path": "lib/wasix/tests/wasm_tests/socket_tests/getaddrinf...
diff --git a/lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c b/lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c new file mode 100644 index 000000000000..f93f716560af --- /dev/null +++ b/lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c @@ -0,0 +...
true
wasmerio/wasmer
6,664
comment_to_fix
test(wasix): add getaddrinfo AF_INET family filtering regression test
`struct sockaddr_in` is used (via `sizeof(struct sockaddr_in)`), but the file doesn’t include `<netinet/in.h>`, which is the standard header that defines `struct sockaddr_in`. Depending on the libc headers, this can fail to compile.
43daa0c8fa364ba23a8c8eb6bb6cacf40d066ef5
82f872d0e4f61624ea479b275a71f66265c56371
diff --git a/lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c b/lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c new file mode 100644 index 000000000000..f93f716560af --- /dev/null +++ b/lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c @@ -0,0 +...
[ "lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c" ]
[ { "comment": "`struct sockaddr_in` is used (via `sizeof(struct sockaddr_in)`), but the file doesn’t include `<netinet/in.h>`, which is the standard header that defines `struct sockaddr_in`. Depending on the libc headers, this can fail to compile.", "path": "lib/wasix/tests/wasm_tests/socket_tests/getaddrinf...
true
wasmerio/wasmer
6,664
comment_to_fix
test(wasix): add getaddrinfo AF_INET family filtering regression test
The test currently calls `getaddrinfo(..., "0", ...)` (port 0) and then does a blocking TCP `connect()` to the first result. This is very likely to fail deterministically (port 0 is not a usable destination service), making the regression test flaky or always-failing. A more reliable way to ensure the sockaddr returned...
43daa0c8fa364ba23a8c8eb6bb6cacf40d066ef5
82f872d0e4f61624ea479b275a71f66265c56371
diff --git a/lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c b/lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c new file mode 100644 index 000000000000..f93f716560af --- /dev/null +++ b/lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c @@ -0,0 +...
[ "lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c" ]
[ { "comment": "The test currently calls `getaddrinfo(..., \"0\", ...)` (port 0) and then does a blocking TCP `connect()` to the first result. This is very likely to fail deterministically (port 0 is not a usable destination service), making the regression test flaky or always-failing. A more reliable way to ensu...
true
wasmerio/wasmer
6,664
comment_to_fix
test(wasix): add getaddrinfo AF_INET family filtering regression test
`connect_first_af_inet()` creates a TCP socket (`SOCK_STREAM`). Even with the service changed, a TCP `connect()` requires a listening server and can fail with ECONNREFUSED, which makes the test depend on runtime network state. Using a UDP socket (`SOCK_DGRAM`) makes this a deterministic check that the returned sockaddr...
43daa0c8fa364ba23a8c8eb6bb6cacf40d066ef5
82f872d0e4f61624ea479b275a71f66265c56371
diff --git a/lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c b/lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c new file mode 100644 index 000000000000..f93f716560af --- /dev/null +++ b/lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c @@ -0,0 +...
[ "lib/wasix/tests/wasm_tests/socket_tests/getaddrinfo-af-inet-filter/main.c" ]
[ { "comment": "`connect_first_af_inet()` creates a TCP socket (`SOCK_STREAM`). Even with the service changed, a TCP `connect()` requires a listening server and can fail with ECONNREFUSED, which makes the test depend on runtime network state. Using a UDP socket (`SOCK_DGRAM`) makes this a deterministic check that...
true
wasmerio/wasmer
6,649
issue_to_patch
perf(compiler): cache VMOffsets on AllocatedArtifact
## Summary Computes `VMOffsets` once at artifact build / deserialize time and reuses it on every `Instance::new` for the artifact. Around 7% faster on the warm `Instance::new` path and around 12% faster on a steady-state cached instantiate-and-call cycle, measured on Singlepass-compiled wasm. No public API change, no...
d529bf7f901f50f8858c3808d8fe385bd6093acf
97ed6e568e3f9fb7ac18fd4ba37a1779a0475c11
diff --git a/lib/compiler/src/engine/artifact.rs b/lib/compiler/src/engine/artifact.rs index f2be6afe9d49..795eae92610d 100644 --- a/lib/compiler/src/engine/artifact.rs +++ b/lib/compiler/src/engine/artifact.rs @@ -42,6 +42,7 @@ use wasmer_types::{ target::{CpuFeature, Target}, }; +use wasmer_types::VMOffsets; ...
[ "lib/compiler/src/engine/artifact.rs", "lib/vm/src/instance/allocator.rs" ]
[ { "comment": "Comparing `VMOffsets` via its `Debug` string is brittle: `Debug` output is not a stable contract and could change (without any semantic non-determinism), causing noisy failures. Prefer asserting determinism through stable, semantically meaningful properties (e.g., compare a set of accessor-returne...
true
wasmerio/wasmer
6,649
comment_to_fix
perf(compiler): cache VMOffsets on AllocatedArtifact
Comparing `VMOffsets` via its `Debug` string is brittle: `Debug` output is not a stable contract and could change (without any semantic non-determinism), causing noisy failures. Prefer asserting determinism through stable, semantically meaningful properties (e.g., compare a set of accessor-returned offsets/sizes such a...
d529bf7f901f50f8858c3808d8fe385bd6093acf
97ed6e568e3f9fb7ac18fd4ba37a1779a0475c11
diff --git a/lib/vm/src/instance/allocator.rs b/lib/vm/src/instance/allocator.rs index c81bfd1e0df2..935208efd25b 100644 --- a/lib/vm/src/instance/allocator.rs +++ b/lib/vm/src/instance/allocator.rs @@ -78,6 +78,42 @@ impl InstanceAllocator { Vec<NonNull<VMGlobalDefinition>>, ) { let offsets = VM...
[ "lib/vm/src/instance/allocator.rs" ]
[ { "comment": "Comparing `VMOffsets` via its `Debug` string is brittle: `Debug` output is not a stable contract and could change (without any semantic non-determinism), causing noisy failures. Prefer asserting determinism through stable, semantically meaningful properties (e.g., compare a set of accessor-returne...
true
wasmerio/wasmer
6,649
comment_to_fix
perf(compiler): cache VMOffsets on AllocatedArtifact
The `module` parameter is intentionally unused and is currently silenced with `let _ = module;`. To make the intent clearer at the API boundary and avoid an extra statement in the body, rename the parameter to `_module` (or add an `#[allow(unused_variables)]` on the parameter/function). This keeps the contract visible ...
d529bf7f901f50f8858c3808d8fe385bd6093acf
97ed6e568e3f9fb7ac18fd4ba37a1779a0475c11
diff --git a/lib/vm/src/instance/allocator.rs b/lib/vm/src/instance/allocator.rs index c81bfd1e0df2..935208efd25b 100644 --- a/lib/vm/src/instance/allocator.rs +++ b/lib/vm/src/instance/allocator.rs @@ -78,6 +78,42 @@ impl InstanceAllocator { Vec<NonNull<VMGlobalDefinition>>, ) { let offsets = VM...
[ "lib/vm/src/instance/allocator.rs" ]
[ { "comment": "The `module` parameter is intentionally unused and is currently silenced with `let _ = module;`. To make the intent clearer at the API boundary and avoid an extra statement in the body, rename the parameter to `_module` (or add an `#[allow(unused_variables)]` on the parameter/function). This keeps...
true
wasmerio/wasmer
6,649
comment_to_fix
perf(compiler): cache VMOffsets on AllocatedArtifact
Can you please reduce the generated comments so that the functionality and the speed up will be documented at one place? No needs for duplicating the information N times.
d529bf7f901f50f8858c3808d8fe385bd6093acf
97ed6e568e3f9fb7ac18fd4ba37a1779a0475c11
diff --git a/lib/compiler/src/engine/artifact.rs b/lib/compiler/src/engine/artifact.rs index f2be6afe9d49..795eae92610d 100644 --- a/lib/compiler/src/engine/artifact.rs +++ b/lib/compiler/src/engine/artifact.rs @@ -42,6 +42,7 @@ use wasmer_types::{ target::{CpuFeature, Target}, }; +use wasmer_types::VMOffsets; ...
[ "lib/compiler/src/engine/artifact.rs" ]
[ { "comment": "Can you please reduce the generated comments so that the functionality and the speed up will be documented at one place? No needs for duplicating the information N times.", "path": "lib/compiler/src/engine/artifact.rs", "hunk": "@@ -65,6 +66,17 @@ pub struct AllocatedArtifact {\n finis...
true
wasmerio/wasmer
6,650
issue_to_patch
perf(types): chunked thread-local StoreId allocator
`StoreId::default` used to hit a single global `AtomicUsize` on every call, so `Store::new` callers on different cores contended for the same cache line. This PR replaces that with a chunked thread-local allocator: each thread reserves 256 IDs in one `fetch_add` then hands them out from a thread-local cursor. The fi...
079dd3db96b3b2711dfb62359fdecec596b53f57
5e7228539e22188fd75bec7b6a619198f042f9ea
diff --git a/Cargo.lock b/Cargo.lock index c8a34f8ec50c..b601396cd2e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7519,6 +7519,7 @@ version = "7.2.0-alpha.3" dependencies = [ "bytecheck", "crc32fast", + "criterion", "enum-iterator", "enumset", "getrandom 0.4.2", diff --git a/lib/types/Cargo.toml b/lib/types...
[ "Cargo.lock", "lib/types/Cargo.toml", "lib/types/benches/store_id_alloc.rs", "lib/types/src/store_id.rs" ]
[ { "comment": "I'd use a struct here for better readability.", "path": "lib/types/src/store_id.rs", "hunk": "@@ -26,13 +27,52 @@ impl StoreId {\n }\n }\n \n+/// Number of IDs each thread reserves from the global counter at a time.\n+///\n+/// `Default::default` used to hit a single global `AtomicUsiz...
true
wasmerio/wasmer
6,650
comment_to_fix
perf(types): chunked thread-local StoreId allocator
I'd use a struct here for better readability.
079dd3db96b3b2711dfb62359fdecec596b53f57
5e7228539e22188fd75bec7b6a619198f042f9ea
diff --git a/lib/types/src/store_id.rs b/lib/types/src/store_id.rs index abf2871c9fc0..c21861327b1f 100644 --- a/lib/types/src/store_id.rs +++ b/lib/types/src/store_id.rs @@ -1,5 +1,6 @@ use core::fmt::Display; use std::{ + cell::Cell, num::NonZeroUsize, sync::atomic::{AtomicUsize, Ordering}, }; @@ -26,...
[ "lib/types/src/store_id.rs" ]
[ { "comment": "I'd use a struct here for better readability.", "path": "lib/types/src/store_id.rs", "hunk": "@@ -26,13 +27,52 @@ impl StoreId {\n }\n }\n \n+/// Number of IDs each thread reserves from the global counter at a time.\n+///\n+/// `Default::default` used to hit a single global `AtomicUsiz...
true
wasmerio/wasmer
6,650
comment_to_fix
perf(types): chunked thread-local StoreId allocator
Can you include also a Criterion benchmark, please?
079dd3db96b3b2711dfb62359fdecec596b53f57
5e7228539e22188fd75bec7b6a619198f042f9ea
diff --git a/lib/types/src/store_id.rs b/lib/types/src/store_id.rs index abf2871c9fc0..c21861327b1f 100644 --- a/lib/types/src/store_id.rs +++ b/lib/types/src/store_id.rs @@ -1,5 +1,6 @@ use core::fmt::Display; use std::{ + cell::Cell, num::NonZeroUsize, sync::atomic::{AtomicUsize, Ordering}, }; @@ -26,...
[ "lib/types/src/store_id.rs" ]
[ { "comment": "Can you include also a Criterion benchmark, please?", "path": "lib/types/src/store_id.rs", "hunk": "@@ -46,3 +86,73 @@ impl Display for StoreId {\n }\n }\n }\n+\n+#[cfg(test)]\n+mod tests {\n+ use super::*;\n+ use std::collections::HashSet;\n+ use std::sync::Mutex;\n+ ...
true
wasmerio/wasmer
6,650
comment_to_fix
perf(types): chunked thread-local StoreId allocator
Remove the extensive comment, and use `criterion.workspace = true` syntax.
079dd3db96b3b2711dfb62359fdecec596b53f57
5e7228539e22188fd75bec7b6a619198f042f9ea
diff --git a/lib/types/Cargo.toml b/lib/types/Cargo.toml index e7f95fc4a6fa..709ba3851115 100644 --- a/lib/types/Cargo.toml +++ b/lib/types/Cargo.toml @@ -38,6 +38,11 @@ features = ["wasm_js"] [dev-dependencies] memoffset.workspace = true +criterion.workspace = true + +[[bench]] +name = "store_id_alloc" +harness = ...
[ "lib/types/Cargo.toml" ]
[ { "comment": "Remove the extensive comment, and use `criterion.workspace = true` syntax.", "path": "lib/types/Cargo.toml", "hunk": "@@ -38,7 +38,9 @@ features = [\"wasm_js\"]\n \n [dev-dependencies]\n memoffset.workspace = true\n-criterion = { workspace = true, default-features = true }\n+# Workspace de...
true