commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
65b694f6c24928ad4ee7340fec703ae907d6325a | Chris Fallin | 2022-04-18T22:47:15 | Turn on the regalloc2 checker in the `compile` fuzz target. (#4047)
This tells Cranelift to run regalloc2's symbolic verifier on the results
of register allocation after compiling each function.
We already fuzz regalloc2 independently, but that provides coverage
using regalloc2's purpose-built (synthetic) `Functi... | diff --git a/fuzz/fuzz_targets/compile.rs b/fuzz/fuzz_targets/compile.rs
index 684d75637..10036f348 100644
--- a/fuzz/fuzz_targets/compile.rs
+++ b/fuzz/fuzz_targets/compile.rs
@@ -1,10 +1,21 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
-use wasmtime::{Engine, Module};
+use wasmtime::{Config, Engine, Module};
+
+... | 1 | 13 | 2 |
0af8737ec36ce73ac9f88510fe8d1ec39ed1d4fc | Chris Fallin | 2022-04-18T21:06:07 | Add support for running the regalloc2 checker. (#4043)
With these fixes, all this PR has to do is instantiate and run the
checker on the `regalloc2::Output`. This is off by default, and is
enabled by setting the `regalloc_checker` Cranelift option.
This restores the old functionality provided by e.g. the
`backtr... | diff --git a/Cargo.lock b/Cargo.lock
index 1084250a0..39d3f1188 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2316,9 +2316,9 @@ dependencies = [
[[package]]
name = "regalloc2"
-version = "0.1.1"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3dd122b168f0046afcde717e... | 7 | 39 | 3 |
534e4263ce15ae881b4f384c59669005fe3aa785 | Alex Crichton | 2022-04-18T20:56:35 | Use tokio::test instead of `dummy_waker` in tests (#3975)
Currently wasmtime's async tests use a mixture of `#[tokio::test]` and
`dummy_waker`. To be consistent this tries to move all tests possible to
`#[tokio::test]` and just a two need to keep using `dummy_waker` (no
renamed to `noop_waker`) due to what they're ... | diff --git a/tests/all/async_functions.rs b/tests/all/async_functions.rs
index 9c325385d..7ea40ec09 100644
--- a/tests/all/async_functions.rs
+++ b/tests/all/async_functions.rs
@@ -8,35 +8,35 @@ fn async_store() -> Store<()> {
Store::new(&Engine::new(Config::new().async_support(true)).unwrap(), ())
}
-fn run_sm... | 2 | 261 | 335 |
5aa9bdc7eb7fca46c081b9b87911e75b8b93bc21 | Chris Fallin | 2022-04-18T17:59:26 | Cranelift: fix fuzzbug in critical-edge splitting. (#4044)
regalloc2 is a bit pickier about critical edges than regalloc.rs was,
because of how it inserts moves. In particular, if a branch has any
arguments (e.g., a conditional branch or br_table), its successors must
all have only one predecessor, so we can do edg... | diff --git a/cranelift/codegen/src/machinst/blockorder.rs b/cranelift/codegen/src/machinst/blockorder.rs
index 718abcd22..d4ddc1512 100644
--- a/cranelift/codegen/src/machinst/blockorder.rs
+++ b/cranelift/codegen/src/machinst/blockorder.rs
@@ -253,6 +253,34 @@ impl BlockLoweringOrder {
block_in_count[entr... | 1 | 28 | 0 |
5774e068b74b1aedff2bb6e15eccfe8d3807ed48 | Chris Fallin | 2022-04-18T16:53:57 | Cranelift: fix regalloc2 integration bug wrt blockparam branch args. (#4042)
Previously, the block successor accumulation and the blockparam branch
arg setup were decoupled. The lowering backend implicitly specified
the order of successor edges via its `MachTerminator` enum on the last
instruction in the block, whi... | diff --git a/cranelift/codegen/src/isa/aarch64/inst/mod.rs b/cranelift/codegen/src/isa/aarch64/inst/mod.rs
index a0e36dc07..2c5d82b4b 100644
--- a/cranelift/codegen/src/isa/aarch64/inst/mod.rs
+++ b/cranelift/codegen/src/isa/aarch64/inst/mod.rs
@@ -98,7 +98,6 @@ pub struct CallIndInfo {
pub struct JTSequenceInfo {
... | 7 | 44 | 68 |
7cf5f058303d2ee8c42df658d4ca608771a8561d | Chris Fallin | 2022-04-15T14:04:02 | Cranelift: remove slow invariant validation in cfg(fuzzing) from MachBuffer. (#4038)
Following the merge of regalloc2 support, this became slower because we
are stricter about the critical-edge invariant, generating a separate
edge block for every out-edge even if two or more out-edges go to the
same successor (thi... | diff --git a/cranelift/codegen/src/machinst/buffer.rs b/cranelift/codegen/src/machinst/buffer.rs
index 7802b44e7..883f64923 100644
--- a/cranelift/codegen/src/machinst/buffer.rs
+++ b/cranelift/codegen/src/machinst/buffer.rs
@@ -326,62 +326,6 @@ impl<I: VCodeInst> MachBuffer<I> {
}
}
- /// Debug-only... | 1 | 0 | 57 |
bfae6384aa7fb6f64046bc33a62e36d0ba2a1b84 | Yang Hau | 2022-04-14T14:35:53 | fix typo (#4030) | diff --git a/crates/runtime/src/instance/allocator.rs b/crates/runtime/src/instance/allocator.rs
index 8a7a796c8..cb0e26127 100644
--- a/crates/runtime/src/instance/allocator.rs
+++ b/crates/runtime/src/instance/allocator.rs
@@ -98,7 +98,7 @@ pub enum InstantiationError {
#[error("Insufficient resources: {0}")]
... | 1 | 1 | 1 |
ade04c92c2dca6d8f8609125bf3e80fa8345dab2 | Dan Gohman | 2022-04-13T16:51:57 | Update to rustix 0.33.6. (#4022)
Relevant to Wasmtime, this fixes undefined references to `utimensat` and
`futimens` on macOS 10.12 and earlier. See bytecodealliance/rustix#157
for details.
It also contains a fix for s390x which isn't currently needed by Wasmtime
itself, but which is needed to make rustix's own ... | diff --git a/Cargo.lock b/Cargo.lock
index ba662af8d..11bb1a177 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2500,9 +2500,9 @@ dependencies = [
[[package]]
name = "rustix"
-version = "0.33.5"
+version = "0.33.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03627528abcc4a365554d32a9... | 10 | 11 | 11 |
f9cf4fe6400417544965b63e0b540c5c58ce306a | Nikita Baksalyar | 2022-04-12T20:01:00 | Fix documentation for codegen::Context::compile (#4019)
The function docs incorrectly referred to an argument that's no longer there. | diff --git a/cranelift/codegen/src/context.rs b/cranelift/codegen/src/context.rs
index 91781d189..bedc5aeb1 100644
--- a/cranelift/codegen/src/context.rs
+++ b/cranelift/codegen/src/context.rs
@@ -100,8 +100,8 @@ impl Context {
///
/// Run the function through all the passes necessary to generate code for the... | 1 | 4 | 3 |
54aa7205065955fcf89da0ae8dabb5314f7d3056 | Nick Fitzgerald | 2022-04-11T21:33:27 | fuzzing: Refactor `TableOps` fuzz generator to allow GC with refs on the stack (#4016)
This makes the generator more similar to `wasm-smith` where it is keeping track
of what is on the stack and making choices about what instructions are valid to
generate given the current stack state. This should in theory allow th... | diff --git a/Cargo.lock b/Cargo.lock
index 4031fdc0b..ba662af8d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3613,6 +3613,7 @@ dependencies = [
"arbitrary",
"env_logger 0.8.4",
"log",
+ "rand 0.8.5",
"rayon",
"target-lexicon",
"tempfile",
diff --git a/crates/fuzzing/Cargo.toml b/crates/fuzzing/Cargo.toml
in... | 4 | 176 | 223 |
7e8f356798546d069bedd7499cc0a36eeb0463f1 | Alex Crichton | 2022-04-11T17:51:58 | Enable explicitly initializating copy-on-write images (#3964)
This commit adds a method, `Module::initialize_copy_on_write_image`,
which will explicitly create the copy-on-write image during the method
call instead of lazily deferring it until the first instantiation of a
module. Given the relative expense of creat... | diff --git a/crates/wasmtime/src/instance.rs b/crates/wasmtime/src/instance.rs
index 4d2f9bf6f..d8eea30db 100644
--- a/crates/wasmtime/src/instance.rs
+++ b/crates/wasmtime/src/instance.rs
@@ -618,6 +618,12 @@ impl<T> InstancePre<T> {
})
}
+ /// Returns a reference to the module that this [`InstanceP... | 2 | 40 | 6 |
1bf0c8c220e37c91cbe0946d944bdb6f0c13e35c | Mrmaxmeier | 2022-04-08T01:45:21 | cranelift: fix broken `selinux-fix` refactor (#4001) | diff --git a/cranelift/jit/src/memory.rs b/cranelift/jit/src/memory.rs
index 5adde6d3d..c183da9db 100644
--- a/cranelift/jit/src/memory.rs
+++ b/cranelift/jit/src/memory.rs
@@ -37,11 +37,11 @@ impl PtrLen {
MmapMut::map_anon(alloc_size).map(|mut mmap| {
// The order here is important; we assign th... | 1 | 2 | 2 |
d147802d513db045406c043740a77e0556d1dfdb | Alex Crichton | 2022-04-05T19:32:33 | Update wasm-tools crates (#3997)
* Update wasm-tools crates
This commit updates the wasm-tools family of crates as used in Wasmtime.
Notably this brings in the update which removes module linking support
as well as a number of internal refactorings around names and such
within wasmparser itself. This updates all... | diff --git a/Cargo.lock b/Cargo.lock
index 5c1508a49..4031fdc0b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3316,18 +3316,18 @@ checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2"
[[package]]
name = "wasm-encoder"
-version = "0.10.0"
+version = "0.11.0"
source = "registry+https://github.... | 26 | 177 | 298 |
7b5176baeaf742ef6ea429efa7f269cd904e4cca | Alex Crichton | 2022-04-04T17:27:12 | Upgrade all crates to the Rust 2021 edition (#3991)
* Upgrade all crates to the Rust 2021 edition
I've personally started using the new format strings for things like
`panic!("some message {foo}")` or similar and have been upgrading crates
on a case-by-case basis, but I think it probably makes more sense to go
a... | diff --git a/Cargo.toml b/Cargo.toml
index 8766245a2..35ed0120d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,7 +9,7 @@ categories = ["wasm"]
keywords = ["webassembly", "wasm"]
repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"
-edition = "2018"
+edition = "2021"
default-run = "wasmti... | 59 | 60 | 58 |
666c2554ea0e1728c35aa41178cf235920db888a | Chris Fallin | 2022-03-31T21:26:01 | Merge pull request from GHSA-gwc9-348x-qwv2
* Run the GC smoketest with epoch support enabled as well.
* Handle safepoints in cold blocks properly.
Currently, the way that we find safepoint slots for a given instruction
relies on the instruction index order in the safepoint list matching the
order of instruction emi... | diff --git a/cranelift/codegen/src/machinst/vcode.rs b/cranelift/codegen/src/machinst/vcode.rs
index e31c1d8ec..d1e585c60 100644
--- a/cranelift/codegen/src/machinst/vcode.rs
+++ b/cranelift/codegen/src/machinst/vcode.rs
@@ -17,6 +17,7 @@
//! See the main module comment in `mod.rs` for more details on the VCode-based
... | 4 | 46 | 15 |
353f1b48ab73aab92e014b214a7770cbbf99c2ab | Alex Crichton | 2022-03-31T21:24:42 | Split wasmtime-runtime's single getter into typed getters (#3987)
This splits the existing `lookup_by_declaration` function into a
lookup-per-type-of-item. This refactor ends up cleaning up a fair bit of
code in the `wasmtime` crate by removing a number of `unreachable!()`
blocks which are now no longer necessary. | diff --git a/crates/runtime/src/instance.rs b/crates/runtime/src/instance.rs
index 22be3f0ca..b08af11a1 100644
--- a/crates/runtime/src/instance.rs
+++ b/crates/runtime/src/instance.rs
@@ -287,55 +287,51 @@ impl Instance {
self.vmctx() as *const VMContext as *mut VMContext
}
- /// Lookup an export wi... | 5 | 91 | 87 |
fde84aa79c76c01794989dba8d277a2b1d579e0e | Alex Crichton | 2022-03-31T20:37:16 | Deduplicate creation of `CompiledModule` (#3986)
Push the creation of a module's `CompiledModule` into one location of
`Module::from_parts` instead of duplicating it across two callers. | diff --git a/crates/wasmtime/src/module.rs b/crates/wasmtime/src/module.rs
index 011e7437f..9abdcb1e1 100644
--- a/crates/wasmtime/src/module.rs
+++ b/crates/wasmtime/src/module.rs
@@ -332,14 +332,7 @@ impl Module {
}
};
- let module = CompiledModule::from_artifacts(
- mmap,
- ... | 2 | 12 | 18 |
5338e12f9df48784709b512c8f174259074c4491 | Alex Crichton | 2022-03-31T18:17:34 | Disable module linking in instantiate fuzzer (#3981)
Support was removed from Wasmtime so there's no need to fuzz it any
more. | diff --git a/fuzz/fuzz_targets/instantiate.rs b/fuzz/fuzz_targets/instantiate.rs
index ec8744b8f..cd1df275a 100644
--- a/fuzz/fuzz_targets/instantiate.rs
+++ b/fuzz/fuzz_targets/instantiate.rs
@@ -24,9 +24,6 @@ fn run(data: &[u8]) -> Result<()> {
Timeout::None
};
- // Enable module linking for this f... | 1 | 0 | 3 |
453feb6f82fa2d302578f2f341e6de06cda2f75a | Alex Crichton | 2022-03-30T18:51:34 | Remove some dead code (#3970)
This commit removes methods that are never used between crates or trait
impls like `Clone` which may have been used one day but are no longer used. | diff --git a/crates/environ/src/compilation.rs b/crates/environ/src/compilation.rs
index 3ec65cb4f..1dc6891ba 100644
--- a/crates/environ/src/compilation.rs
+++ b/crates/environ/src/compilation.rs
@@ -17,7 +17,7 @@ use thiserror::Error;
/// Information about a function, such as trap information, address map,
/// an... | 6 | 11 | 46 |
d1d10dc8da9989a998a0683b0a93cb8713fac6ba | Alex Crichton | 2022-03-30T18:51:25 | Refactor the `TypeTables` type (#3971)
* Remove duplicate `TypeTables` type
This was once needed historically but it is no longer needed.
* Make the internals of `TypeTables` private
Instead of reaching internally for the `wasm_signatures` map an `Index`
implementation now exists to indirect accesses through... | diff --git a/crates/cranelift/src/compiler.rs b/crates/cranelift/src/compiler.rs
index 529063016..967605de2 100644
--- a/crates/cranelift/src/compiler.rs
+++ b/crates/cranelift/src/compiler.rs
@@ -256,7 +256,7 @@ impl wasmtime_environ::Compiler for Compiler {
let compiled_trampolines = translation
... | 12 | 43 | 42 |
819b61b6612f21c6269b8f469d791a429b459289 | Dan Gohman | 2022-03-29T17:17:10 | Update to rustix 0.33.5, to fix a link error on Android (#3966)
* Update to rustix 0.33.5, to fix a link error on Android
This updates to rustix 0.33.5, which includes bytecodealliance/rustix#258,
which fixes bytecodealliance/rustix#256, a link error on Android.
Fixes #3965.
* Bump the rustix versions in the... | diff --git a/Cargo.lock b/Cargo.lock
index f75183da0..36bc831c1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2500,9 +2500,9 @@ dependencies = [
[[package]]
name = "rustix"
-version = "0.33.3"
+version = "0.33.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9466f25b92a648960ac1042f... | 10 | 11 | 11 |
6c8c94723a842258a4ead8e92eeb0a745a57aa64 | Damian Heaton | 2022-03-28T16:32:59 | Scalar values in `vectorizelanes` & `extractlanes` (#3922)
- `extractlanes` will now function on a scalar value, returning the
value as a single-element array.
- `vectorizelanes` will accept a single-element array, returning the
contained value.
Existing `if !x.is_vector()` code-patterns have been simplified as ... | diff --git a/cranelift/interpreter/src/step.rs b/cranelift/interpreter/src/step.rs
index 01f41279e..7397b8589 100644
--- a/cranelift/interpreter/src/step.rs
+++ b/cranelift/interpreter/src/step.rs
@@ -546,26 +546,18 @@ where
Opcode::Iabs => {
let (min_val, _) = ctrl_ty.lane_type().bounds(true);
... | 1 | 53 | 63 |
6a60e8363f50b936e4c4fc958cb9742314ff09f3 | Adam Wick | 2022-03-23T15:43:34 | Add support for `async` call hooks (#3876)
* Instead of simply panicking, return an error when we attempt to resume on a dying fiber.
This situation should never occur in the existing code base, but can be
triggered if support for running outside async code in a call hook.
* Shift `async_cx()` to return an `Opt... | diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs
index f832bbb11..12d1d07ec 100644
--- a/crates/wasmtime/src/func.rs
+++ b/crates/wasmtime/src/func.rs
@@ -272,8 +272,9 @@ macro_rules! generate_wrap_async_func {
{
assert!(store.as_context().async_support(), concat!("cannot use... | 5 | 369 | 27 |
41594dc5d9fcd67a8da67a05559f5e45b5d310f3 | Alex Crichton | 2022-03-18T18:51:55 | Expose details for mlocking modules externally (#3944)
This commit exposes some various details and config options for having
finer-grain control over mlock-ing the memory of modules. This amounts
to three different changes being present in this commit:
* A new `Module::image_range` API is added to expose the ran... | diff --git a/crates/jit/src/instantiate.rs b/crates/jit/src/instantiate.rs
index 36d13033d..76624260d 100644
--- a/crates/jit/src/instantiate.rs
+++ b/crates/jit/src/instantiate.rs
@@ -682,6 +682,14 @@ impl CompiledModule {
pub fn has_address_map(&self) -> bool {
!self.address_map_data().is_empty()
}... | 3 | 84 | 12 |
8cfb55209053f1186b4173a780c1a3b686b7dec1 | Alex Crichton | 2022-03-18T17:17:24 | Increase instance size limit when fuzzing (#3943)
In today's installment of the Wondrous Adventures of What Are the Actual
Limits on the Pooling Allocator Required to Run the Spec Tests a fuzz
bug was found where the instance size wasn't big enough to run
`names.wast`. Today's episode is similar to prior episodes w... | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index 78d4afe81..6c595dec8 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -363,7 +363,7 @@ impl Config {
limits.table_elements = limits.memories.max(1_000);
limits.memory_p... | 1 | 1 | 1 |
dd32bd13d6d6a64765f3591a836a2d79e506a795 | Nazar Mokrynskyi | 2022-03-17T14:54:02 | Update zstd to 0.11.1 (#3938) | diff --git a/Cargo.lock b/Cargo.lock
index 28630cb7d..d68c8fe12 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3926,18 +3926,18 @@ dependencies = [
[[package]]
name = "zstd"
-version = "0.10.0+zstd.1.5.2"
+version = "0.11.1+zstd.1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b1... | 2 | 7 | 7 |
fdf063df98ad3839b0e0b78ea55b53b1a296abb0 | Alex Crichton | 2022-03-16T17:27:50 | Increase minimum instance threshold for spectests fuzzer (#3935)
Looks like `const.wast` needs a lot of instances | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index 601bf6f3c..78d4afe81 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -362,7 +362,7 @@ impl Config {
limits.tables = limits.memories.max(5);
limits.table_elements = lim... | 1 | 1 | 1 |
fa72d63b921408d2a2ec495fcf419b5521d23087 | Alex Crichton | 2022-03-15T15:04:34 | Update the v8 crate used when fuzzing (#3929)
A recently discovered fuzz bug reported a difference in execution result
between Wasmtime and v8. The module in question had an exported function
which had multiple results, including floats. About a year ago I
reported a bug on v8 about functions with multiple results ... | diff --git a/Cargo.lock b/Cargo.lock
index 61cedcc74..28630cb7d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3112,9 +3112,9 @@ dependencies = [
[[package]]
name = "v8"
-version = "0.33.0"
+version = "0.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b3adb16fd1af3e28d6fda8348a6d... | 2 | 3 | 3 |
62a6a7ab6c17aa72a0e17e584a6ed3f18bad95d9 | Alex Crichton | 2022-03-14T17:29:58 | Use const-initialized thread locals (#3923)
This was a relatively recent feature added to the Rust standard library
which should help accelerate calls into WebAssembly slightly. | diff --git a/cranelift/codegen/src/timing.rs b/cranelift/codegen/src/timing.rs
index 1613abb9f..4d25560e8 100644
--- a/cranelift/codegen/src/timing.rs
+++ b/cranelift/codegen/src/timing.rs
@@ -176,7 +176,7 @@ mod details {
// Information about passes in a single thread.
thread_local! {
- static CURRE... | 3 | 13 | 7 |
884ca1f75bb963d0a7d830d262e30c382dc7ef98 | Alex Crichton | 2022-03-14T17:29:45 | Remove more dead relocation handling code (#3924)
Forgotten from #3905 I now realized. | diff --git a/crates/cranelift/src/obj.rs b/crates/cranelift/src/obj.rs
index 05bde6d7f..08373bb2c 100644
--- a/crates/cranelift/src/obj.rs
+++ b/crates/cranelift/src/obj.rs
@@ -14,9 +14,8 @@
//! names have format "_trampoline_N", where N is `SignatureIndex`.
use crate::debug::{DwarfSection, DwarfSectionRelocTarget}... | 1 | 1 | 39 |
44351cc4af690479384e1f31dd7834ac44fe1c1c | Alex Crichton | 2022-03-14T16:35:17 | fuzz: Increase more limits when spectest fuzzing (#3926)
When using the pooling instance allocator for running spec tests we have
to make sure that the configured limits of the allocator aren't so low
as to cause the spec tests to fail due to resource exhaustion issues or
similar. This commit adds in minimum thresh... | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index c91cf1f9b..e4cd7ee93 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -354,12 +354,16 @@ impl Config {
..
} = &mut self.wasmtime.strategy
{
- limits.mem... | 1 | 10 | 6 |
bc1170c2ddba9b8667ad888ac9080bb49410cbad | Alex Crichton | 2022-03-10T18:23:34 | Eagerly create `ModuleMemoryImages` (#3914)
This commit removes the currently existing laziness-via-`OnceCell` when
a `Module` is created for creating a `ModuleMemoryImages` data
structure. Processing of data is now already shifted to compile time for
the wasm module which means that creating a `ModuleMemoryImages`... | diff --git a/crates/wasmtime/src/module.rs b/crates/wasmtime/src/module.rs
index 01520f9ee..f47fc3324 100644
--- a/crates/wasmtime/src/module.rs
+++ b/crates/wasmtime/src/module.rs
@@ -4,7 +4,6 @@ use crate::{
};
use crate::{Engine, ModuleType};
use anyhow::{bail, Context, Result};
-use once_cell::sync::OnceCell;
u... | 1 | 26 | 26 |
0df4e961c0e64a395e6e29f35ebbb217e507e527 | Nathaniel McCallum | 2022-03-10T18:09:06 | fix(wasi): enable all `WasiFile`s to be pollable (#3913)
Currently, the use of the downcast method means that you have to use one
of the hard-coded types. But Enarx needs to define its own `WasiFile`
implementations. This works fine, except the resulting files cannot be
used in poll because they aren't part of the ... | diff --git a/Cargo.lock b/Cargo.lock
index 5e7257c12..61cedcc74 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3204,6 +3204,7 @@ dependencies = [
"bitflags",
"cap-rand",
"cap-std",
+ "io-extras",
"rustix",
"thiserror",
"tracing",
diff --git a/crates/wasi-common/Cargo.toml b/crates/wasi-common/Cargo.toml
index... | 10 | 84 | 150 |
8b48ce7fb79c7e36748e2e1a90be3bdf7d65cbce | Nathaniel McCallum | 2022-03-09T23:22:42 | feat(wasi)!: make most `WasiFile` methods take `&mut self` (#3901)
1. This makes it easier for implementors to deal with internal APIs.
2. This matches the signatures of the WASI Snapshot traits.
Although it is likely true that these methods would have to become
immutable in order to implement threading efficient... | diff --git a/crates/wasi-common/cap-std-sync/src/file.rs b/crates/wasi-common/cap-std-sync/src/file.rs
index 5c2a2b182..8fec43c68 100644
--- a/crates/wasi-common/cap-std-sync/src/file.rs
+++ b/crates/wasi-common/cap-std-sync/src/file.rs
@@ -26,19 +26,19 @@ impl WasiFile for File {
fn as_any(&self) -> &dyn Any {
... | 10 | 138 | 127 |
44a435a43a9662a960664dee1d417913490b8242 | Nathaniel McCallum | 2022-03-09T22:38:10 | feat(wasi): provide default implementations for `WasiFile` (#3904)
Additionally, as cleanup, remove duplicate implementations. | diff --git a/crates/wasi-common/cap-std-sync/src/file.rs b/crates/wasi-common/cap-std-sync/src/file.rs
index ff985685d..5c2a2b182 100644
--- a/crates/wasi-common/cap-std-sync/src/file.rs
+++ b/crates/wasi-common/cap-std-sync/src/file.rs
@@ -26,9 +26,6 @@ impl WasiFile for File {
fn as_any(&self) -> &dyn Any {
... | 6 | 100 | 436 |
ae4d86804d515a323848706a19b1b6b38c9e5493 | Nick Fitzgerald | 2022-03-09T21:57:16 | cli: Add documentation for the `--fuel` option (#3893) | diff --git a/src/lib.rs b/src/lib.rs
index b94d6862d..1de3ec4fa 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -234,7 +234,14 @@ struct CommonOptions {
#[structopt(long)]
enable_cranelift_nan_canonicalization: bool,
- #[structopt(long)]
+ /// Enable execution fuel with N units fuel, where execution will ... | 1 | 8 | 1 |
4d404c90b48fbaf9d6d18557f489503a05898afc | Alex Crichton | 2022-03-09T21:45:30 | Ensure functions are aligned properly on AArch64 (#3908)
Previously (as in an hour ago) #3905 landed a new ability for fuzzing to
arbitrarily insert padding between functions. Running some fuzzers
locally though this instantly hit a lot of problems on AArch64 because
the arbitrary padding isn't aligned to 4 bytes l... | diff --git a/cranelift/codegen/src/machinst/buffer.rs b/cranelift/codegen/src/machinst/buffer.rs
index 7091d880d..ffc96c1ab 100644
--- a/cranelift/codegen/src/machinst/buffer.rs
+++ b/cranelift/codegen/src/machinst/buffer.rs
@@ -1616,7 +1616,7 @@ impl<I: VCodeInst> MachTextSectionBuilder<I> {
}
impl<I: VCodeInst> T... | 4 | 11 | 9 |
f21aa98ccb111698d6251db0f96857f57bb026c3 | Alex Crichton | 2022-03-09T18:58:27 | Fuzz-code-coverage motivated improvements (#3905)
* fuzz: Fuzz padding between compiled functions
This commit hooks up the custom
`wasmtime_linkopt_padding_between_functions` configuration option to the
cranelift compiler into the fuzz configuration, enabling us to ensure
that randomly inserting a moderate amoun... | diff --git a/crates/cranelift/Cargo.toml b/crates/cranelift/Cargo.toml
index 4f588334d..a337bcfe3 100644
--- a/crates/cranelift/Cargo.toml
+++ b/crates/cranelift/Cargo.toml
@@ -8,7 +8,7 @@ repository = "https://github.com/bytecodealliance/wasmtime"
documentation = "https://docs.rs/wasmtime-cranelift/"
categories = ["... | 7 | 48 | 193 |
29298b1f88f99e2c244c5ead946d4c8526456d85 | Alex Crichton | 2022-03-09T17:36:55 | fuzz: Raise memory pages limit for spectest fuzzing (#3903)
A recent fuzz failure showed that at least `call.wast` requires a memory
larger than 10 pages, so increase the minimum number of pages that can
be used for executing spec tests. | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index 7f9bfbcbe..04c6b5f75 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -355,9 +355,9 @@ impl Config {
limits.memories = 1;
limits.tables = 5;
limits.table_e... | 1 | 2 | 2 |
e73446790ec20db6460dc44b79a956bad3e326d6 | Alex Crichton | 2022-03-09T16:53:05 | fuzz: Limit memories in the instantiate-many fuzzer (#3902)
A fuzz bug was hit last night where the root of the fuzz bug appears to
be exhaustion of the virtual address space. The specific case in
question instantiated a module with ~100 memories ~100 times, and each
memory reserved ~8gb of the virtual address spac... | diff --git a/fuzz/fuzz_targets/instantiate-many.rs b/fuzz/fuzz_targets/instantiate-many.rs
index 351da977e..a562abe37 100644
--- a/fuzz/fuzz_targets/instantiate-many.rs
+++ b/fuzz/fuzz_targets/instantiate-many.rs
@@ -24,6 +24,16 @@ fn run(data: &[u8]) -> Result<()> {
// use timeouts or ensure that the generated wa... | 1 | 10 | 0 |
2f4419cc6c1c4721a2c36ce39d12c008a6094790 | Alex Crichton | 2022-03-09T15:46:25 | Implement runtime checks for compilation settings (#3899)
* Implement runtime checks for compilation settings
This commit fills out a few FIXME annotations by implementing run-time
checks that when a `Module` is created it has compatible codegen
settings for the current host (as `Module` is proof of "this code ca... | diff --git a/crates/environ/src/compilation.rs b/crates/environ/src/compilation.rs
index d091024e6..3ec65cb4f 100644
--- a/crates/environ/src/compilation.rs
+++ b/crates/environ/src/compilation.rs
@@ -235,7 +235,7 @@ pub trait Compiler: Send + Sync {
}
/// Value of a configured setting for a [`Compiler`]
-#[derive(... | 7 | 272 | 119 |
9137b4a50e2e883ac23049f6abf3381155620189 | wasmtime-publish | 2022-03-07T21:18:34 | Bump Wasmtime to 0.35.0 (#3885)
[automatically-tag-and-release-this-commit]
Co-authored-by: Wasmtime Publish <wasmtime-publish@users.noreply.github.com> | diff --git a/Cargo.lock b/Cargo.lock
index cce701b9e..5e7257c12 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -501,7 +501,7 @@ dependencies = [
[[package]]
name = "cranelift"
-version = "0.81.0"
+version = "0.82.0"
dependencies = [
"cranelift-codegen",
"cranelift-frontend",
@@ -509,14 +509,14 @@ dependencies = [... | 42 | 180 | 180 |
e81d4cea03142eca99ae656928d1ac8f9615c2e9 | Roman Volosatovs | 2022-03-07T21:17:59 | feat(wasi): make `WasiCtx` overridable (#3895)
In some use cases it is desirable to provide a custom snapshot WASI
context. Facilitate this by depending on a combination of traits
required rather than concrete type in the signature.
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net> | diff --git a/crates/wasi/src/lib.rs b/crates/wasi/src/lib.rs
index 91fd9b6c3..177442397 100644
--- a/crates/wasi/src/lib.rs
+++ b/crates/wasi/src/lib.rs
@@ -42,11 +42,16 @@ macro_rules! define_wasi {
use wasmtime::Linker;
-pub fn add_to_linker<T>(
+pub fn add_to_linker<T, U>(
linker: &mut Linker<T>,
- get_... | 1 | 8 | 3 |
6e9da94e43c2fbe1ae86392223d001759e01692b | Alex Crichton | 2022-03-07T17:35:26 | Relax restrictions in the differential fuzzer (#3890)
If either end stack overflows we can't validate the other side since the
other side, depending on codegen settings, may have been successful, hit
a different trap, or also stack overflowed. | diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs
index 7f88c61dc..d5bc0ce18 100644
--- a/crates/fuzzing/src/oracles.rs
+++ b/crates/fuzzing/src/oracles.rs
@@ -404,6 +404,13 @@ pub fn differential_execution(
};
match (lhs, rhs) {
+ // Different compilation setting... | 1 | 7 | 0 |
dbe797447da75897f97bfed5fa4f12ba27b179cf | Alex Crichton | 2022-03-07T16:45:25 | Fix table element limits in spectest fuzzer (#3888)
Ensure that there's enough table elements allowed to execute the spec
tests since some tests have a minimum required. | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index c38dd5505..7f9bfbcbe 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -354,6 +354,7 @@ impl Config {
{
limits.memories = 1;
limits.tables = 5;
+ lim... | 2 | 3 | 1 |
8c9c72caaac6f7a21f031f274c87eb26ac630ca7 | Alex Crichton | 2022-03-04T21:01:49 | Add a benchmark for measuring call overhead (#3883)
The goal of this new benchmark, `call`, is to help us measure the
overhead of both calling into WebAssembly from the host as well as
calling the host from WebAssembly. There's lots of various ways to
measure this so this benchmark is a bit large but should hopeful... | diff --git a/Cargo.toml b/Cargo.toml
index 5c0aa9f8a..ff9f9ae48 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -135,3 +135,7 @@ harness = false
[[bench]]
name = "thread_eager_init"
harness = false
+
+[[bench]]
+name = "call"
+harness = false
diff --git a/benches/call.rs b/benches/call.rs
new file mode 100644
index 0000... | 2 | 474 | 0 |
352908e960332ebd2148ab2b7da82a08f2a595f8 | Alex Crichton | 2022-03-04T18:29:44 | Fix calling call hooks with `unchecked` func variants (#3881)
This commit fixes calling the call hooks configured in a store for host
functions defined with `Func::new_unchecked` or similar. I believe that
this was just an accidental oversight and there's no fundamental reason
to not support this. | diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs
index ac8272088..12a85107a 100644
--- a/crates/wasmtime/src/func.rs
+++ b/crates/wasmtime/src/func.rs
@@ -998,8 +998,6 @@ impl Func {
values_vec: *mut ValRaw,
func: &dyn Fn(Caller<'_, T>, &[Val], &mut [Val]) -> Result<(), Trap>,
... | 2 | 87 | 34 |
a7567cb9ec0ee18ffdc6bc77f3c14d7a496d4fec | Andrew Brown | 2022-03-04T18:16:37 | typo: fix typos in documentation comments (#3882) | diff --git a/crates/runtime/src/export.rs b/crates/runtime/src/export.rs
index df883a3a9..5f540924b 100644
--- a/crates/runtime/src/export.rs
+++ b/crates/runtime/src/export.rs
@@ -69,7 +69,7 @@ pub struct ExportMemory {
pub definition: *mut VMMemoryDefinition,
/// Pointer to the containing `VMContext`.
... | 2 | 2 | 2 |
8861d0cc428caf88955d274f91f812cb66494994 | Alex Crichton | 2022-03-03T17:24:38 | fuzz: Update pooling allocator limits on tables (#3880)
Another instance similar to #3879 where when doing differential tests
the pooling allocator configuration needs to be updated to allow for a
possible table. | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index 7601af6f2..c38dd5505 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -304,6 +304,8 @@ impl Config {
limits.memories = 1;
limits.memory_pages = 1;
+ limits... | 1 | 2 | 0 |
d3fd1ebe5fd187bdb3cbe0356d0c29774405c081 | Alex Crichton | 2022-03-03T17:24:01 | fuzz: Increase table limit in differential_v8 fuzzer (#3879)
When manually increasing the table limit in this specific fuzzer we also
need to increase the limit in the pooling allocator itself if
configured. | diff --git a/fuzz/fuzz_targets/differential_v8.rs b/fuzz/fuzz_targets/differential_v8.rs
index 59fad1186..440ac9956 100644
--- a/fuzz/fuzz_targets/differential_v8.rs
+++ b/fuzz/fuzz_targets/differential_v8.rs
@@ -2,6 +2,7 @@
use libfuzzer_sys::arbitrary::{Result, Unstructured};
use libfuzzer_sys::fuzz_target;
+use ... | 1 | 8 | 0 |
38d0d426f2d1b1111cd36b269a2676f4f67d323b | Alex Crichton | 2022-03-03T17:23:39 | fuzz: Bump table limit with spectest fuzzing (#3878)
Spec tests need multiple tables so increase the limits on the pooling
allocator when enabled for spec tests to ensure that all the spec tests
can run. | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index 87aa46ab1..7601af6f2 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -343,6 +343,7 @@ impl Config {
config.reference_types_enabled = true;
config.multi_value_enabled = true;
... | 1 | 2 | 0 |
7d1bc7d808dd197c410689bb3302310c68798609 | Alex Crichton | 2022-03-02T20:29:25 | Move spec interpreter fuzzing behind a Cargo feature (#3871)
* Move spec interpreter fuzzing behind a Cargo feature
Building the spec interpreter requires a local installation of Ocaml and
now libgmp which isn't always available, so this enables the ability to
disable building the spec interpreter by using `cargo... | diff --git a/crates/fuzzing/Cargo.toml b/crates/fuzzing/Cargo.toml
index b7b264bd4..fc7b01287 100644
--- a/crates/fuzzing/Cargo.toml
+++ b/crates/fuzzing/Cargo.toml
@@ -22,7 +22,7 @@ wasmtime-wast = { path = "../wast" }
wasm-encoder = "0.10.0"
wasm-smith = "0.9.0"
wasm-mutate = "0.2"
-wasm-spec-interpreter = { path ... | 3 | 42 | 43 |
1fb71fa1ea9e5fd96e9698a4d4af4f1c26526865 | Alex Crichton | 2022-03-02T20:04:59 | Remove some asserts in `MemoryImage::new` (#3874)
This commit removes some `.unwrap()` annotations around casts between
integers to either be infallible or handle errors. This fixes a panic in
a fuzz test case that popped out for memory64-using modules. The actual
issue here is pretty benign, we were just too eager... | diff --git a/crates/runtime/src/cow.rs b/crates/runtime/src/cow.rs
index 7cd2987d1..8a6ce3650 100644
--- a/crates/runtime/src/cow.rs
+++ b/crates/runtime/src/cow.rs
@@ -90,10 +90,12 @@ impl MemoryImage {
) -> Result<Option<MemoryImage>> {
// Sanity-check that various parameters are page-aligned.
... | 1 | 5 | 3 |
2f48c890a86e0e67a5c4c6d02624f28ebba1200a | Alex Crichton | 2022-03-02T19:34:04 | Fix failing fuzzers with too-small instance sizes (#3873)
The recent removal of `ModuleLimits` meant that the update to the
fuzzers could quickly fail where the instance size limit was set to
something small (like 0) and then nothing would succeed in compilation.
This allows the modules to fail to compile and then ... | diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs
index 85c6b3c60..d2e040495 100644
--- a/crates/fuzzing/src/oracles.rs
+++ b/crates/fuzzing/src/oracles.rs
@@ -260,6 +260,15 @@ fn compile_module(
if string.contains("minimum element size") {
return None;
... | 1 | 9 | 0 |
ad5ce38467eabc90698df019abf01a49bbe67298 | Alex Crichton | 2022-03-02T18:03:16 | Remove `all-arch` from `cranelift-interpreter` (#3872)
I frequently notice that the fuzz build of `cranelift-codegen` takes an
extremely long time and recently realized that one issue is that when
fuzzers are built we enable all of the backends in `cranelift-codegen`
but AFAIK only the native backend is actually fu... | diff --git a/cranelift/interpreter/Cargo.toml b/cranelift/interpreter/Cargo.toml
index 7e09f4dd8..cea2946f6 100644
--- a/cranelift/interpreter/Cargo.toml
+++ b/cranelift/interpreter/Cargo.toml
@@ -11,7 +11,7 @@ readme = "README.md"
edition = "2018"
[dependencies]
-cranelift-codegen = { path = "../codegen", version ... | 1 | 1 | 1 |
15940d071f2acd4bbebf370d2c706f6922205837 | Alex Crichton | 2022-03-02T17:17:14 | Force enable multi-value for spec tests in fuzzing (#3869)
Spec tests require multi-value to be enabled and wasm-smith recently
made this a fuzz-input option, so override the fuzz input as we do for
other features and force-enable multi-value. | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index b84f2d1bb..87aa46ab1 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -341,6 +341,7 @@ impl Config {
config.simd_enabled = false;
config.bulk_memory_enabled = true;
co... | 1 | 1 | 0 |
f0fa01d5527689c1833ac7d285bbf64ba262ba1f | Alex Crichton | 2022-03-02T16:54:05 | Pin spec interpreter to a specific revision (#3868)
This commit updates the build script which clones the spec interpreter
for fuzzing to specifically pin at a hardcoded revision. This is
intended at improving reproducibility if we hit any issues while fuzzing
to ensure that the same wasmtime revision is always usi... | diff --git a/crates/fuzzing/wasm-spec-interpreter/build.rs b/crates/fuzzing/wasm-spec-interpreter/build.rs
index 38bef6120..61d5986c7 100644
--- a/crates/fuzzing/wasm-spec-interpreter/build.rs
+++ b/crates/fuzzing/wasm-spec-interpreter/build.rs
@@ -12,6 +12,7 @@ const OCAML_DIR: &'static str = "ocaml";
const SPEC_DIR:... | 1 | 14 | 7 |
e8ae3c0afdc7347d3de80c554353257efda2bbaa | Harald Hoyer | 2022-03-01T18:19:04 | feat: remove the limitation of either R or W polls (#3866)
Allow polls on read _and_ write.
Signed-off-by: Harald Hoyer <harald@profian.com> | diff --git a/crates/wasi-common/src/snapshots/preview_1.rs b/crates/wasi-common/src/snapshots/preview_1.rs
index 8a5dcbb41..0279bcbb4 100644
--- a/crates/wasi-common/src/snapshots/preview_1.rs
+++ b/crates/wasi-common/src/snapshots/preview_1.rs
@@ -12,7 +12,6 @@ use crate::{
};
use anyhow::Context;
use cap_std::time... | 1 | 0 | 14 |
29ebfa4d937d8833adfb11eaed4498014dcb0fc6 | Alex Crichton | 2022-02-28T23:18:37 | Fix a nightly warning (#3863)
Looks like this `unsafe` block is not necessary, even on stable, and
nightly linting has picked it up now. | diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs
index 47a50e204..ac8272088 100644
--- a/crates/wasmtime/src/func.rs
+++ b/crates/wasmtime/src/func.rs
@@ -2049,7 +2049,7 @@ impl HostFunc {
ty: FuncType,
func: impl Fn(Caller<'_, T>, *mut ValRaw) -> Result<(), Trap> + Send + Sync +... | 1 | 1 | 1 |
aeaca2062fd0b997483597280bfdb5dff8cb545d | Alex Crichton | 2022-02-28T18:18:11 | Decrease default wasm stack to 512k from 1M (#3861)
This commit aims to achieve the goal of being able to run the test suite
on Windows with `--test-threads 1`, or more notably allowing Wasmtime's
defaults to work better with the main thread on Windows which appears to
have a smaller stack by default than Linux by ... | diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs
index 29edbbbea..4acfaac4c 100644
--- a/crates/wasmtime/src/config.rs
+++ b/crates/wasmtime/src/config.rs
@@ -115,7 +115,15 @@ impl Config {
profiler: Arc::new(NullProfilerAgent),
mem_creator: None,
allocat... | 2 | 12 | 4 |
2a6969d2bd9652d4c0f4992dc78664d6ff840fcd | Alex Crichton | 2022-02-28T16:11:04 | Shrink the size of the anyfunc table in `VMContext` (#3850)
* Shrink the size of the anyfunc table in `VMContext`
This commit shrinks the size of the `VMCallerCheckedAnyfunc` table
allocated into a `VMContext` to be the size of the number of "escaped"
functions in a module rather than the number of functions in a... | diff --git a/crates/cranelift/src/lib.rs b/crates/cranelift/src/lib.rs
index f288252dd..693014bf2 100644
--- a/crates/cranelift/src/lib.rs
+++ b/crates/cranelift/src/lib.rs
@@ -256,12 +256,13 @@ fn func_signature(
types: &TypeTables,
index: FuncIndex,
) -> ir::Signature {
+ let func = &translation.module.... | 8 | 126 | 58 |
49c2b1e60a87623796046176500bed6afa956d2f | Alex Crichton | 2022-02-23T22:41:38 | Fix image reuse with multi-memory images (#3846)
This commit fixes a potential issue where the fast-path instantiate in
`MemoryImageSlot` where when the previous image is compared against the
new image it only performed file descriptor equality, but nowadays with
loading images from `*.cwasm` files there might be m... | diff --git a/crates/runtime/src/cow.rs b/crates/runtime/src/cow.rs
index b81a18478..7cd2987d1 100644
--- a/crates/runtime/src/cow.rs
+++ b/crates/runtime/src/cow.rs
@@ -27,7 +27,7 @@ impl ModuleMemoryImages {
}
/// One backing image for one memory.
-#[derive(Debug)]
+#[derive(Debug, PartialEq)]
pub struct MemoryIm... | 1 | 8 | 9 |
4e26c13bbee28d41c33e3c6d6966906c34e80db8 | Chris Fallin | 2022-02-23T20:40:52 | Add basic epoch-interruption config to fuzzing options. (#3844)
Without async fuzzing, we won't be able to test the most interesting
aspects of epoch interruption, namely the
interrupt/update-deadline/resume flow. However, the "trap on epoch
change" behavior works even for synchronous stores, so we can fuzz with
t... | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index 8ab95c7b0..b946235cf 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -253,6 +253,7 @@ pub struct WasmtimeConfig {
canonicalize_nans: bool,
interruptable: bool,
pub(crate) consume... | 2 | 44 | 7 |
434e35c490cf174cfdd48c6d8010b5ad5f401ac5 | Alex Crichton | 2022-02-23T20:00:06 | Panic on resetting image slots back to anonymous memory (#3841)
* Panic on resetting image slots back to anonymous memory
This commit updates `Drop for MemoryImageSlot` to panic instead of
ignoring errors when resetting memory back to a clean slate. On reading
some of this code again for a different change I real... | diff --git a/crates/runtime/src/cow.rs b/crates/runtime/src/cow.rs
index 4a08ff662..b81a18478 100644
--- a/crates/runtime/src/cow.rs
+++ b/crates/runtime/src/cow.rs
@@ -566,17 +566,18 @@ impl Drop for MemoryImageSlot {
// over by the next MemoryImageSlot later.
//
// Since we're in drop(), we... | 1 | 7 | 6 |
141af7523af5eab9af843504b1742709af456526 | bjorn3 | 2022-02-23T18:19:54 | Allow cloning DataDescriptor (#3377) | diff --git a/cranelift/module/src/data_context.rs b/cranelift/module/src/data_context.rs
index d872819b9..6c9ab04db 100644
--- a/cranelift/module/src/data_context.rs
+++ b/cranelift/module/src/data_context.rs
@@ -10,7 +10,7 @@ use std::string::String;
use std::vec::Vec;
/// This specifies how data is to be initiali... | 1 | 2 | 1 |
01e567ca05c73a20aa9cad53f605697ed9a3f19b | Alex Crichton | 2022-02-23T18:06:52 | Downgrade a cpu feature log message (#3842)
It looks like `error!` is printed by default as it's showing up in
oss-fuzz logs, so downgrade this to `warn!` to avoid printing while fuzzing. | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index cc1059d09..8ab95c7b0 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -724,7 +724,7 @@ impl<'a> Arbitrary<'a> for CodegenSettings {
// input must be discarded.
... | 1 | 1 | 1 |
5a5e401a9c79bb659900176e9df0401daa3a2b46 | Andrew Brown | 2022-02-23T06:30:32 | doc: fix typo (#3838) | diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs
index 1dc312686..47a50e204 100644
--- a/crates/wasmtime/src/func.rs
+++ b/crates/wasmtime/src/func.rs
@@ -189,7 +189,7 @@ pub(crate) struct FuncData {
// only needed rarely. To handle that this is an optionally-contained field
// which is ... | 1 | 1 | 1 |
593f8d96aa514a3f5f98869e5978bc42c4f9a06f | Alex Crichton | 2022-02-22T21:04:13 | Update wasm-{smith,encoder} (#3835)
Ended up being a routine update but seemed good to go ahead and hook up
updates. While I was at it I went ahead and hooked up multi-value
swarm fuzzing as well now that wasm-smith implements it. | diff --git a/Cargo.lock b/Cargo.lock
index db3415e18..bb9c59a7a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1186,6 +1186,12 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "flagset"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cda653ca797810c02f7ca4b804b40... | 4 | 86 | 79 |
709f7e0c8aa59f7338c930f1d626ced27fb1e973 | Alex Crichton | 2022-02-22T19:23:51 | Enable SSE 4.2 unconditionally (#3833)
* Enable SSE 4.2 unconditionally
Fuzzing over the weekend found that `i64x2` comparison operators
require `pcmpgtq` which is an SSE 4.2 instruction. Along the lines of #3816
this commit unconditionally enables and requires SSE 4.2 for compilation
and fuzzing. It will no lon... | diff --git a/cranelift/codegen/meta/src/isa/x86.rs b/cranelift/codegen/meta/src/isa/x86.rs
index 67d84ae76..b850c1911 100644
--- a/cranelift/codegen/meta/src/isa/x86.rs
+++ b/cranelift/codegen/meta/src/isa/x86.rs
@@ -38,7 +38,7 @@ fn define_settings(shared: &SettingGroup) -> SettingGroup {
"has_sse42",
... | 4 | 14 | 5 |
43d31c5bf7c8050bb9c3037a7699def51f0566f4 | Chris Fallin | 2022-02-22T18:40:43 | memfd: make "dense image" heuristic limit configurable. (#3831)
In #3820 we see an issue with the new heuristics that control use of
memfd: it's entirely possible for a reasonable Wasm module produced by a
snapshotting system to have a relatively sparse heap (less than 50%
filled). A system that avoids memfd becaus... | diff --git a/crates/environ/src/module.rs b/crates/environ/src/module.rs
index 70be73f56..52a7a4563 100644
--- a/crates/environ/src/module.rs
+++ b/crates/environ/src/module.rs
@@ -322,7 +322,31 @@ impl ModuleTranslation<'_> {
///
/// Note that the constraints for `Paged` are the same as those for
/// `S... | 4 | 79 | 10 |
bbd52772de76d0f5ab4cf9a0ab8744c4ed59571d | bjorn3 | 2022-02-22T15:48:53 | Make VMOffset calculation more readable (#3793)
* Fix typo
* Move vmoffset field size and field name together
The previous code was quite confusing about what applied to which field.
The new code also makes it easier to move fields around and insert and
delete fields.
* Move builtin_functions before all var... | diff --git a/crates/cranelift/src/func_environ.rs b/crates/cranelift/src/func_environ.rs
index ee0b15b76..b6565bdef 100644
--- a/crates/cranelift/src/func_environ.rs
+++ b/crates/cranelift/src/func_environ.rs
@@ -299,7 +299,7 @@ impl<'module_environment> FuncEnvironment<'module_environment> {
/// reference count.
... | 2 | 65 | 100 |
084452acab145b676b54d3f6f16d5779c6ce3e0a | Peter Huene | 2022-02-22T15:03:50 | Fix max memory pages for spectests fuzz target. (#3829)
This commit fixes the spectests fuzz target to set a lower bound on the
arbitrary pooling allocator configurations of 10 memory pages so that the limit
doesn't interfere with what's required in the spec tests. | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index 1feab9729..1a5ca37ff 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -405,10 +405,22 @@ impl Config {
config.reference_types_enabled = true;
config.max_memories = 1;
- ... | 1 | 15 | 3 |
2ca01ae9478f199337cf743a6ab543e8c3f3b238 | bjorn3 | 2022-02-19T16:33:39 | Add a way to define a symbol lookup fn for the JIT (#2745)
* Couple of cranelift-jit cleanups
* Add a way to define a symbol lookup fn for the JIT | diff --git a/cranelift/jit/src/backend.rs b/cranelift/jit/src/backend.rs
index 82a38ec0d..3e0cc7368 100644
--- a/cranelift/jit/src/backend.rs
+++ b/cranelift/jit/src/backend.rs
@@ -14,6 +14,7 @@ use cranelift_module::{
ModuleDeclarations, ModuleError, ModuleResult,
};
use log::info;
+use std::cell::RefCell;
use... | 1 | 38 | 15 |
f425eb7ea58e6eccf20a58a808d4495cfed81508 | Alex Crichton | 2022-02-17T18:26:23 | Limit total memory usage in instantiate-many fuzzer (#3823)
Per-`Store` allocations are already limited with the `StoreLimits`
structure while fuzzing to ensure fuzz targets don't allocate more than
1GB of memory, but the `instantiate-many` fuzzer created many separate
stores which each had their own limit, meaning... | diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs
index 55a18ad69..4bf0b54c7 100644
--- a/crates/fuzzing/src/oracles.rs
+++ b/crates/fuzzing/src/oracles.rs
@@ -16,6 +16,8 @@ use crate::generators;
use anyhow::Context;
use arbitrary::Arbitrary;
use log::{debug, warn};
+use std::cell::Cell;
+u... | 1 | 26 | 14 |
37b0fd482d5ba2fafa3c8f73ab366e739116c58d | Alex Crichton | 2022-02-17T18:07:02 | Improve platform compatibility of fuzz test cases (#3824)
In #3800 I added support to consume fuzz input as selection of whether
or not target features should be enabled. This was done in a
platform-specific manner, however, which means that I can no longer
reliably take the fuzz reproducer cases from oss-fuzz and ... | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index de7da193e..1feab9729 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -671,33 +671,62 @@ impl<'a> Arbitrary<'a> for CodegenSettings {
// Helper macro to enable clif features based on wh... | 1 | 54 | 25 |
b62fe21914fca2f19416270996bf0c9841a68d73 | Alex Crichton | 2022-02-17T16:37:17 | Update memfd image construction to avoid excessively large images (#3819)
* Update memfd image construction to avoid excessively large images
Previously memfd-based image construction had a hard limit of a 1GB
memory image but this mean that tiny wasm modules could allocate up to
1GB of memory which became a bit ... | diff --git a/crates/environ/src/module.rs b/crates/environ/src/module.rs
index d46442cf3..70be73f56 100644
--- a/crates/environ/src/module.rs
+++ b/crates/environ/src/module.rs
@@ -6,6 +6,7 @@ use indexmap::IndexMap;
use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;
use std::convert::TryFrom;
+use... | 1 | 115 | 131 |
498c592b19020b42a223c23677788dd36528c5c1 | Alex Crichton | 2022-02-16T20:53:52 | Unconditionally enable sse3, ssse3, and sse4.1 when fuzzing (#3814)
* Unconditionally enable sse3, ssse3, and sse4.1 when fuzzing
This commit unconditionally enables some x86_64 instructions when
fuzzing because the cranelift backend is known to not work if these
features are disabled. From discussion on the wasm... | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index e4d110f50..de7da193e 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -699,9 +699,16 @@ impl<'a> Arbitrary<'a> for CodegenSettings {
if u.ratio(1, 10)? {
let flags ... | 1 | 10 | 3 |
6ffcd4ead9935dc4e5470babe12da6dfe258a3ba | Peter Huene | 2022-02-15T20:59:04 | Improve stability for fuzz targets. (#3804)
This commit improves the stability of the fuzz targets by ensuring the
generated configs and modules are congruent, especially when the pooling
allocator is being used.
For the `differential` target, this means both configurations must use the same
allocation strategy ... | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index bf8b647e6..e4d110f50 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -185,7 +185,7 @@ impl InstanceAllocationStrategy {
/// This configuration guides what modules are generated, how wasmtime
... | 9 | 198 | 113 |
0b4263333b72e090d3ee62e3685e0a63103ef505 | Alex Crichton | 2022-02-15T20:27:55 | Fuzz cranelift cpu flag settings with Wasmtime (#3800)
* Fuzz cranelift cpu flag settings with Wasmtime
This commit updates the `Config` fuzz-generator to consume some of the
input as configuration settings for codegen flags we pass to cranelift.
This should allow for ideally some more coverage where settings are... | diff --git a/Cargo.lock b/Cargo.lock
index 531c3d4e4..ea52ae6ae 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -99,9 +99,9 @@ checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b"
[[package]]
name = "arbitrary"
-version = "1.0.1"
+version = "1.1.0"
source = "registry+https://github.com/rust-la... | 3 | 99 | 5 |
85cf4b042a67706669a1f1edea582d885b787a93 | Cameron Harris | 2022-02-15T18:23:02 | Added 'add_fuel' command line option (#3792)
* Added 'add_fuel' command line option
* Added default value to 'add_fuel' config option
* Added 'add_fuel' to run command Store instantiation
* Added comment
* Added warning for add-fuel without consume-fuel
* Formatting
* Changed out --add-fuel and --con... | diff --git a/src/commands/run.rs b/src/commands/run.rs
index ae228d480..abd1e59a1 100644
--- a/src/commands/run.rs
+++ b/src/commands/run.rs
@@ -164,6 +164,12 @@ impl RunCommand {
let engine = Engine::new(&config)?;
let mut store = Store::new(&engine, Host::default());
+ // If fuel has been c... | 2 | 12 | 3 |
da539255a54b5c60492520ba81469ea2a6e9400a | Peter Huene | 2022-02-14T16:18:29 | Use a much lower memory page limit for pooling allocator fuzzing. (#3795)
This commit makes it such that the pooling allocator will be configured with a
much lower upper bound for memory pages, which will greatly reduce the
likelihood that the fuzzer memory limits will be hit from having too many
memories from too ... | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index d92f10ad3..7988cacea 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -105,7 +105,7 @@ impl<'a> Arbitrary<'a> for ModuleLimits {
const MAX_MEMORIES: u32 = 10;
const MAX_GLOBALS... | 1 | 1 | 1 |
05ace6c0e24f4fd8e256edab7de841a5b28c5735 | wackbyte | 2022-02-13T19:08:19 | Fix a typo in `cranelift-frontend`'s docs (#3796)
Specifically that of `Variable`. | diff --git a/cranelift/frontend/src/variable.rs b/cranelift/frontend/src/variable.rs
index 9a40b9dfe..8ddd1f616 100644
--- a/cranelift/frontend/src/variable.rs
+++ b/cranelift/frontend/src/variable.rs
@@ -11,7 +11,7 @@
use core::u32;
use cranelift_codegen::entity::EntityRef;
-///! An opaque reference to a variable.... | 1 | 1 | 1 |
b438617e1238bec01ebc804c0087e4849df0dc87 | Alex Crichton | 2022-02-11T15:55:08 | Further minor optimizations to instantiation (#3791)
* Shrink the size of `FuncData`
Before this commit on a 64-bit system the `FuncData` type had a size of
88 bytes and after this commit it has a size of 32 bytes. A `FuncData`
is required for all host functions in a store, including those inserted
from a `Linke... | diff --git a/crates/cranelift/src/func_environ.rs b/crates/cranelift/src/func_environ.rs
index a6da44d06..ee0b15b76 100644
--- a/crates/cranelift/src/func_environ.rs
+++ b/crates/cranelift/src/func_environ.rs
@@ -1556,13 +1556,26 @@ impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'m
... | 10 | 85 | 56 |
1cb08d4e679ec6c251b5a57c262b8d16d8509e0b | Alex Crichton | 2022-02-10T21:40:30 | Minor instantiation benchmark updates (#3790)
This commit has a few minor updates and some improvements to the
instantiation benchmark harness:
* A `once_cell::unsync::Lazy` type is now used to guard creation of
modules/engines/etc. This enables running singular benchmarks to be
much faster since the benchma... | diff --git a/Cargo.lock b/Cargo.lock
index 2a5133dfc..531c3d4e4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3496,6 +3496,7 @@ dependencies = [
"memchr",
"more-asserts",
"num_cpus",
+ "once_cell",
"pretty_env_logger",
"rayon",
"rustix",
diff --git a/Cargo.toml b/Cargo.toml
index a72bf6943..1938792fb 100644
... | 3 | 121 | 98 |
520a7f26d78980cb4014831366d759869b4910cd | Alex Crichton | 2022-02-10T20:34:48 | Move function names out of `Module` (#3789)
* Move function names out of `Module`
This commit moves function names in a module out of the
`wasmtime_environ::Module` type and into separate sections stored in the
final compiled artifact. Spurred on by #3787 to look at module load
times I noticed that a huge amount... | diff --git a/crates/cranelift/src/debug/transform/simulate.rs b/crates/cranelift/src/debug/transform/simulate.rs
index b27b78a01..de023a8db 100644
--- a/crates/cranelift/src/debug/transform/simulate.rs
+++ b/crates/cranelift/src/debug/transform/simulate.rs
@@ -13,7 +13,7 @@ use std::path::PathBuf;
use std::sync::atomi... | 8 | 109 | 33 |
41eb2257659b2bc12be6fe7bfa61f796f8605c1e | Peter Huene | 2022-02-10T19:55:44 | Add the instance allocation strategy to generated fuzzing configs. (#3780)
* Add the instance allocation strategy to generated fuzzing configs.
This commit adds support for generating configs with arbitrary instance
allocation strategies.
With this, the pooling allocator will be fuzzed as part of the existing ... | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index e91d3f3f9..d92f10ad3 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -36,13 +36,156 @@ impl OptLevel {
}
}
+/// Configuration for `wasmtime::PoolingAllocationStrategy`.
+#[derive(Arbitr... | 5 | 406 | 30 |
027dea549a6b02fdd00c87100438c65e424f0730 | Alex Crichton | 2022-02-10T17:55:18 | Fuzz using precompiled modules on CI (#3788)
In working on #3787 I see now that our coverage of loading precompiled
files specifically is somewhat lacking, so this adds a config option to
the fuzzers where, if enabled, will round-trip all compiled modules
through the filesystem to test out the mmapped-file case. | diff --git a/Cargo.lock b/Cargo.lock
index 38a575a17..2a5133dfc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1135,6 +1135,15 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
+[[package]]
+name = "fastr... | 4 | 44 | 10 |
f2bf254a79cb6f1603630e31099f9a5b01b49253 | Dan Gohman | 2022-02-10T00:22:05 | Update to cap-std 0.24.1, fixing compilation on Right nightly. (#3786)
Other than doc updates, this just contains bytecodealliance/cap-std#235,
a fix for compilation errors on Rust nightly that look like this:
```
error[E0308]: mismatched types
--> cap-primitives/src/fs/via_parent/rename.rs:22:58
|
22 | ... | diff --git a/Cargo.lock b/Cargo.lock
index a4f522ac6..38a575a17 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -269,9 +269,9 @@ checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040"
[[package]]
name = "cap-fs-ext"
-version = "0.24.0"
+version = "0.24.1"
source = "registry+https://github.com/ru... | 7 | 23 | 23 |
1b27508a420e42eb5277975de6b3267490abedb5 | Peter Huene | 2022-02-09T15:39:29 | Fix incorrect use of `MemoryIndex` in the pooling allocator. (#3782)
This commit corrects a few places where `MemoryIndex` was used and treated like
a `DefinedMemoryIndex` in the pooling instance allocator.
When the unstable `multi-memory` proposal is enabled, it is possible to cause a
newly allocated instance to... | diff --git a/crates/runtime/src/instance/allocator/pooling.rs b/crates/runtime/src/instance/allocator/pooling.rs
index 46d96ecfa..95ac304a2 100644
--- a/crates/runtime/src/instance/allocator/pooling.rs
+++ b/crates/runtime/src/instance/allocator/pooling.rs
@@ -20,8 +20,8 @@ use std::mem;
use std::sync::Arc;
use std::... | 3 | 79 | 33 |
5cd97c054d61689e3bf5f92cf9f08d6cd74e6ef5 | Alex Crichton | 2022-02-08T21:47:13 | Update memfd support with a runtime toggle (#3778)
This commit updates the `memfd` support in Wasmtime to have a runtime
toggle as to whether it's used or not. The compile-time feature gating
`memfd` support is now also re-enabled by default, but the new runtime
switch is still disabled-by-default.
Additionally ... | diff --git a/Cargo.toml b/Cargo.toml
index 1f655c40b..a72bf6943 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -96,6 +96,7 @@ default = [
"wasmtime/parallel-compilation",
"wasi-nn",
"pooling-allocator",
+ "memfd",
]
jitdump = ["wasmtime/jitdump"]
vtune = ["wasmtime/vtune"]
diff --git a/crates/fuzzing/src/gene... | 6 | 62 | 2 |
4f01711d42906c34ae566f0d8eaafd824b711587 | Chris Fallin | 2022-02-08T18:29:45 | Pooling allocator: Default for allocation policy should use memfd feature, not memfd-allocator. (#3777)
Thanks to @peterheune for noticing this! | diff --git a/crates/runtime/src/instance/allocator/pooling.rs b/crates/runtime/src/instance/allocator/pooling.rs
index bab7a47f3..46d96ecfa 100644
--- a/crates/runtime/src/instance/allocator/pooling.rs
+++ b/crates/runtime/src/instance/allocator/pooling.rs
@@ -259,14 +259,12 @@ pub enum PoolingAllocationStrategy {
}
... | 1 | 5 | 7 |
43b37944ff70e718d917a1b93100f733962d67fd | Alex Crichton | 2022-02-07T23:55:38 | Tweak parallelism and the instantiation benchmark (#3775)
Currently the "sequential" and "parallel" benchmarks reports somewhat
different timings. For sequential it's time-to-instantiate, but for
parallel it's time-to-instantiate-10k instances. The parallelism in the
parallel benchmark can also theoretically be aff... | diff --git a/benches/instantiation.rs b/benches/instantiation.rs
index 8236fbd02..ada6f22c8 100644
--- a/benches/instantiation.rs
+++ b/benches/instantiation.rs
@@ -1,14 +1,21 @@
use anyhow::Result;
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
-use rayon::{prelude::*, ThreadPoolBuilder};
... | 1 | 114 | 65 |
fa889b4fd2e507b4f7e6c7004544e432436aade6 | Harald Hoyer | 2022-02-07T22:26:38 | wasmtime: add CLI options for pre-opened TCP listen sockets (#3729)
This patch implements CLI options to insert pre-opened sockets.
`--listenfd` : Inherit environment variables and file descriptors following
the systemd listen fd specification (UNIX only).
`--tcplisten <SOCKET ADDRESS>`: Grant a... | diff --git a/Cargo.lock b/Cargo.lock
index aed5982ce..4b6f61585 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1585,6 +1585,17 @@ version = "0.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95f5690fef754d905294c56f7ac815836f2513af966aa47f2e07ac79be07827f"
+[[package]]
+name = "list... | 3 | 93 | 1 |
88b53b12aaa67f4258ff48336e0e0b9aa21b8b19 | Chris Fallin | 2022-02-07T21:44:53 | Turn off memfd by default, at least for this upcoming release. (#3774)
Since memfd support just landed, and has had only ~0.5 weeks to bake
with fuzzing, we want to make release 0.34.0 of Wasmtime without it
enabled by default. This PR disables memfd by default; it can be enabled
by specifying the `memfd` feature f... | diff --git a/Cargo.toml b/Cargo.toml
index 71667869a..22c28772f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -94,7 +94,6 @@ default = [
"wasmtime/wat",
"wasmtime/parallel-compilation",
"wasi-nn",
- "memfd",
"pooling-allocator",
]
jitdump = ["wasmtime/jitdump"]
diff --git a/crates/wasmtime/Cargo.toml b/cra... | 2 | 1 | 2 |
79af8cd9ce426736a9199fad8e68ee945a4012e6 | Jonas Kruckenberg | 2022-02-07T15:38:12 | chore: update zstd (#3771) | diff --git a/Cargo.lock b/Cargo.lock
index c93855058..aed5982ce 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3881,18 +3881,18 @@ dependencies = [
[[package]]
name = "zstd"
-version = "0.9.0+zstd.1.5.0"
+version = "0.10.0+zstd.1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0774... | 2 | 7 | 7 |
2cf3069b6b05ffe26393c29643d917ba9ebe62a9 | Chris Fallin | 2022-02-05T07:11:25 | Extend cold-blocks test to test debuginfo as well. | diff --git a/cranelift/codegen/src/isa/x64/mod.rs b/cranelift/codegen/src/isa/x64/mod.rs
index fbd7dad61..6063c03ec 100644
--- a/cranelift/codegen/src/isa/x64/mod.rs
+++ b/cranelift/codegen/src/isa/x64/mod.rs
@@ -184,12 +184,13 @@ fn isa_constructor(
mod test {
use super::*;
use crate::cursor::{Cursor, FuncC... | 1 | 52 | 1 |
d9d64694223f30ed1160e7c46e112a68f863a2cf | Chris Fallin | 2022-02-05T03:51:17 | Cranelift: fix debuginfo wrt cold blocks and non-monotonic layout.
The debuginfo analyses are written with the assumption that the order of
instructions in the VCode is the order of instructions in the final
machine ocde. This was previously a strong invariant, until we
introduced support for cold blocks. Cold blocks ... | diff --git a/cranelift/codegen/src/machinst/debug.rs b/cranelift/codegen/src/machinst/debug.rs
index 4768b8d06..e2eafe50b 100644
--- a/cranelift/codegen/src/machinst/debug.rs
+++ b/cranelift/codegen/src/machinst/debug.rs
@@ -378,16 +378,26 @@ where
/// which that label is bound.
pub(crate) fn compute<I: VCodeInst>(... | 2 | 68 | 25 |
04d2caea7b89a3a795494c47086303a9c47c9ab0 | Alex Crichton | 2022-02-04T19:17:25 | Consolidate methods of memory initialization (#3766)
* Consolidate methods of memory initialization
This commit consolidates the few locations that we have which are
performing memory initialization. Namely the uffd logic for creating
paged memory as well as the memfd logic for creating a memory image now
share ... | diff --git a/crates/environ/src/module.rs b/crates/environ/src/module.rs
index d94180165..204a64c35 100644
--- a/crates/environ/src/module.rs
+++ b/crates/environ/src/module.rs
@@ -95,19 +95,6 @@ impl MemoryPlan {
},
}
}
-
- /// Determine whether a data segment (memory initializer) is
- ... | 6 | 426 | 330 |
2a24a0fbde84d179cbcf646fdcbb823bc9c5201d | Chris Fallin | 2022-02-02T23:55:36 | Make memfd image creation lazy (on first instantiation).
As a followup to the recent memfd allocator work, this PR makes the
memfd image creation occur on the first instantiation, rather than
immediately when the `Module` is loaded.
This shaves off a potentially surprising cost spike that would have
otherwise occurre... | diff --git a/Cargo.lock b/Cargo.lock
index d95912d78..1b2ce6bd7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1890,9 +1890,9 @@ dependencies = [
[[package]]
name = "once_cell"
-version = "1.8.0"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "692fcb63b64b1758029e0a96... | 4 | 25 | 14 |
4ba3404ca3422f3acd2c0f9084aa7d7cfcf261a7 | Alex Crichton | 2022-02-03T17:56:16 | Fix MemFd's allocated memory for dynamic memories (#3763)
This fixes a bug in the memfd-related management of a linear memory
where for dynamic memories memfd wasn't informed of the extra room that
the dynamic memory could grow into, only the actual size of linear
memory, which ended up tripping an assert once the ... | diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs
index c1feba550..b351516d9 100644
--- a/crates/fuzzing/src/oracles.rs
+++ b/crates/fuzzing/src/oracles.rs
@@ -405,6 +405,7 @@ pub fn make_api_calls(api: generators::api::ApiCalls) {
///
/// Ensures that spec tests pass regardless of the `Confi... | 3 | 61 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.