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 |
|---|---|---|---|---|---|---|---|
6368c6b1881462e500e4bed3d66631440afb63aa | Johnnie Birch | 2022-08-29T15:40:39 | Modifies fcvt_to_sint and fcvt_to_unit clif to make scalar only (#4794)
Closes #4693. | diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs
index 482664dc6..1d126f4ee 100644
--- a/cranelift/codegen/meta/src/shared/instructions.rs
+++ b/cranelift/codegen/meta/src/shared/instructions.rs
@@ -2159,7 +2159,7 @@ pub(crate) fn define(
"i... | 1 | 28 | 22 |
573ae0c60bb20e010d74ba7fd2e7e59247f3385d | Jamey Sharp | 2022-08-26T23:55:37 | cranelift-fuzzgen: use a different namespace (#4795)
Otherwise I get a panic with "Duplicate function with name u0:1 found!"
at fuzz/fuzz_targets/cranelift-fuzzgen.rs:76:10. | diff --git a/cranelift/fuzzgen/src/function_generator.rs b/cranelift/fuzzgen/src/function_generator.rs
index 0656d138a..6e9b80bcc 100644
--- a/cranelift/fuzzgen/src/function_generator.rs
+++ b/cranelift/fuzzgen/src/function_generator.rs
@@ -980,7 +980,8 @@ where
let sig = self.generate_signature()?;
... | 1 | 2 | 1 |
a68fa86aad7be732afbb9ec0960a6d3fdfee0c96 | Dan Gohman | 2022-08-26T18:39:00 | Make wasi-common-std-sync's dependency on system-interface private. (#4784)
* Make wasi-common-std-sync's dependency on system-interface private.
Change some `pub` functions which exposed system-interface types to be
non-`pub`.
And, change `from_sysif_fdflags` functions to `get_fd_flags` functions
that take `i... | diff --git a/crates/wasi-common/cap-std-sync/Cargo.toml b/crates/wasi-common/cap-std-sync/Cargo.toml
index d93b534ff..261f3be44 100644
--- a/crates/wasi-common/cap-std-sync/Cargo.toml
+++ b/crates/wasi-common/cap-std-sync/Cargo.toml
@@ -31,6 +31,7 @@ rustix = { version = "0.35.6", features = ["fs"] }
[target.'cfg(wind... | 3 | 69 | 20 |
05ffdc26ec08a7ec543dac6336c8bb4d3f031ba3 | Dan Gohman | 2022-08-25T17:18:48 | Implement I/O timeouts that specify the REALTIME clock. (#4777)
POSIX specifies that functions like `nanosleep` use the REALTIME clock,
so allow WASI `poll_oneoff` calls to use the REALTIME clock, at least
for non-absolute intervals. POSIX specifies that the timeouts should not
be affected by subsequent `clock_sett... | diff --git a/crates/wasi-common/src/snapshots/preview_1.rs b/crates/wasi-common/src/snapshots/preview_1.rs
index 6e2506480..7907be103 100644
--- a/crates/wasi-common/src/snapshots/preview_1.rs
+++ b/crates/wasi-common/src/snapshots/preview_1.rs
@@ -1090,6 +1090,33 @@ impl wasi_snapshot_preview1::WasiSnapshotPreview1 fo... | 1 | 27 | 0 |
d3c463aac05e9ee3fd19450b3f035c47b9e55616 | Andrew Brown | 2022-08-24T22:49:48 | [fuzz] Configure the `differential` target (#4773)
This change is a follow-on from #4515 to add the ability to configure
the `differential` fuzz target by limiting which engines and modules are
used for fuzzing. This is incredibly useful when troubleshooting, e.g.,
when an engine is more prone to failure, we can ta... | diff --git a/crates/fuzzing/src/oracles/engine.rs b/crates/fuzzing/src/oracles/engine.rs
index 686858ea6..bcb76b494 100644
--- a/crates/fuzzing/src/oracles/engine.rs
+++ b/crates/fuzzing/src/oracles/engine.rs
@@ -6,36 +6,52 @@ use anyhow::Error;
use arbitrary::Unstructured;
use wasmtime::Trap;
-/// Pick one of the ... | 2 | 157 | 34 |
b4c25ef63e004d55aa0dc1322c44789b01adefd7 | Andrew Brown | 2022-08-24T20:10:12 | [fuzz] Simplify macros used by single-instruction generator (#4774)
This removes the multiple macros used previously to describe the
WebAssembly instruction signatures and replaces them with a single
one--`inst!`. | diff --git a/crates/fuzzing/src/generators/single_inst_module.rs b/crates/fuzzing/src/generators/single_inst_module.rs
index 6e1c193d3..ee156610d 100644
--- a/crates/fuzzing/src/generators/single_inst_module.rs
+++ b/crates/fuzzing/src/generators/single_inst_module.rs
@@ -105,205 +105,168 @@ macro_rules! valtype {
... | 1 | 141 | 178 |
a41cc668af372bc6df83bf6ae988a8ba6e0bd92c | iximeow | 2022-08-22T15:57:10 | Cranelift: extend docs on Inst to discuss `call` instructions (#4630)
* Cranelift: extend docs on Inst to discuss `call` instructions
the docs on `Inst` note that the type is returned by non-resultful
instructions built from `InstBuilder`, but did _not_ note that it is
also returned by `call` and `call_indirect`.... | diff --git a/cranelift/codegen/src/ir/entities.rs b/cranelift/codegen/src/ir/entities.rs
index ea113397a..7418b8446 100644
--- a/cranelift/codegen/src/ir/entities.rs
+++ b/cranelift/codegen/src/ir/entities.rs
@@ -88,7 +88,10 @@ impl Value {
///
/// Most usage of `Inst` is internal. `Inst`ructions are returned by
///... | 1 | 4 | 1 |
d620705a323e3da59bd90473b4e627c8502b1255 | Afonso Bordado | 2022-08-20T00:49:54 | Fix Invalid Instruction format in fuzzgen (#4738)
* cranelift: Add assert to prevent wrong InstFormat being used for the wrong opcode
* cranelift: Use correct instruction format when inserting opcodes in fuzzgen (fixes #4733)
* cranelift: Use debug assert on InstFormat assert | diff --git a/cranelift/codegen/meta/src/gen_inst.rs b/cranelift/codegen/meta/src/gen_inst.rs
index d85f6dc69..819b553ce 100644
--- a/cranelift/codegen/meta/src/gen_inst.rs
+++ b/cranelift/codegen/meta/src/gen_inst.rs
@@ -902,6 +902,9 @@ fn gen_format_constructor(format: &InstructionFormat, fmt: &mut Formatter) {
... | 3 | 32 | 5 |
7d9a359f51fca167dce488a1039dded7096c7ac5 | Benjamin Bouvier | 2022-08-18T17:03:08 | Make the subtract lazy in the icache fuzz target (#4732)
This unchecked, always-performed subtract *could* be the cause of #4731,
if the immediate was 0 in the first place. | diff --git a/fuzz/fuzz_targets/cranelift-icache.rs b/fuzz/fuzz_targets/cranelift-icache.rs
index 1c6959a78..abc3800e8 100644
--- a/fuzz/fuzz_targets/cranelift-icache.rs
+++ b/fuzz/fuzz_targets/cranelift-icache.rs
@@ -96,7 +96,7 @@ fuzz_target!(|func: SingleFunction| {
let imm = imm.bits();
... | 1 | 1 | 1 |
2696462ccbeaa4350200842b46d2c83da9aa4e19 | Alex Crichton | 2022-08-17T15:56:27 | Limit the size of functions in the `stacks` fuzzer (#4727)
* Limit the size of functions in the `stacks` fuzzer
The fuzzers recently found a timeout in this fuzz test case related to
the compile time of the generated module. Inspecting the generated
module showed that it had 100k+ opcodes for one function, so thi... | diff --git a/crates/fuzzing/src/generators/stacks.rs b/crates/fuzzing/src/generators/stacks.rs
index ffb95158e..8b5544d00 100644
--- a/crates/fuzzing/src/generators/stacks.rs
+++ b/crates/fuzzing/src/generators/stacks.rs
@@ -11,6 +11,7 @@ use arbitrary::{Arbitrary, Result, Unstructured};
use wasm_encoder::Instruction;... | 1 | 5 | 1 |
5add267b87b5e711c91efedb38cff2a208e8bfcf | Alex Crichton | 2022-08-16T22:33:24 | Fix a soundness issue with lowering variants (#4723)
* Fix a compile error on nightly Rust
It looks like Rust nightly has gotten a bit more strict about
attributes-on-expressions and previously accepted code is no longer
accepted. This commit updates the generated code for a macro to a form
which is accepted by ... | diff --git a/crates/component-macro/src/lib.rs b/crates/component-macro/src/lib.rs
index afef16477..9c801a270 100644
--- a/crates/component-macro/src/lib.rs
+++ b/crates/component-macro/src/lib.rs
@@ -618,7 +618,7 @@ impl Expander for LowerExpander {
if ty.is_some() {
pattern = quote!(Se... | 11 | 211 | 77 |
83e37f933478de23a903a4725e4336df62636ab5 | Alex Crichton | 2022-08-16T21:44:16 | Fix a compile error on nightly Rust (#4724)
It looks like Rust nightly has gotten a bit more strict about
attributes-on-expressions and previously accepted code is no longer
accepted. This commit updates the generated code for a macro to a form
which is accepted by rustc. | diff --git a/crates/wasmtime/src/component/func.rs b/crates/wasmtime/src/component/func.rs
index 396d6d83c..fceab79a9 100644
--- a/crates/wasmtime/src/component/func.rs
+++ b/crates/wasmtime/src/component/func.rs
@@ -37,15 +37,20 @@ use wasmtime_runtime::{Export, ExportFunction, VMTrampoline};
#[doc(hidden)]
#[macro_... | 1 | 14 | 9 |
2ce03cce0826410e500eaad8a95c30c1366c92cc | Benjamin Bouvier | 2022-08-16T15:42:40 | [cranelift] Re-add missing blanket implementations for `&mut Module` (#4719) | diff --git a/cranelift/module/src/module.rs b/cranelift/module/src/module.rs
index 1312f4880..187fed318 100644
--- a/cranelift/module/src/module.rs
+++ b/cranelift/module/src/module.rs
@@ -716,6 +716,14 @@ impl<M: Module> Module for &mut M {
(**self).declare_data_in_func(data, func)
}
+ fn declare_fu... | 1 | 8 | 0 |
1e12645ab198776100cd865af77ab3541e33d0ac | Alex Crichton | 2022-08-16T14:20:45 | Fix a bad bounds check in component trampolines (#4716)
A `GtU` condition needed to actually be `GeU`, as the comment right
above it stated but apparently I forgot to translate the comment to
actual code. This fixes a fuzz bug that arose from oss-fuzz over the
weekend. | diff --git a/crates/environ/src/fact/trampoline.rs b/crates/environ/src/fact/trampoline.rs
index f41699ed7..faaf32d3e 100644
--- a/crates/environ/src/fact/trampoline.rs
+++ b/crates/environ/src/fact/trampoline.rs
@@ -1574,7 +1574,7 @@ impl Compiler<'_, '_> {
// If the byte size of memory is greater than the fi... | 2 | 28 | 4 |
0f944937c0c3d90946eaa6199f0baa5ed991c80d | Afonso Bordado | 2022-08-15T23:16:50 | cranelift: Fuzz `icmp` and `fcmp` (#4713)
* cranelift: Add `fcmp` to fuzzer
* cranelift: Add IntCC::all()
* cranelift: Add `icmp` to fuzzer | diff --git a/cranelift/codegen/src/ir/condcodes.rs b/cranelift/codegen/src/ir/condcodes.rs
index 00e9717ca..8954867a4 100644
--- a/cranelift/codegen/src/ir/condcodes.rs
+++ b/cranelift/codegen/src/ir/condcodes.rs
@@ -100,6 +100,24 @@ impl CondCode for IntCC {
}
impl IntCC {
+ /// Returns a slice with all possibl... | 2 | 86 | 59 |
498e7156b4d4daab7867e0800c8733663ae72fab | Trevor Elliott | 2022-08-15T22:48:01 | Remove the handling of `cmpps` in `produces_const` (#4714)
https://github.com/bytecodealliance/wasmtime/pull/4714 | diff --git a/cranelift/codegen/src/isa/x64/inst/mod.rs b/cranelift/codegen/src/isa/x64/inst/mod.rs
index 6e730d74a..5a51424a4 100644
--- a/cranelift/codegen/src/isa/x64/inst/mod.rs
+++ b/cranelift/codegen/src/isa/x64/inst/mod.rs
@@ -782,18 +782,6 @@ impl Inst {
|| *op == SseOpcode::Pcmpeqq)
... | 1 | 0 | 12 |
cc955e4e7e4d197ae198e068de4aae10775a989e | Alex Crichton | 2022-08-15T21:00:12 | Rename `MmapVec::drain` to `split_off` (#4673)
* Rename `MmapVec::drain` to `split_off`
As suggested on #4609
* Fix tests
* Make MmapVec::split_off work like Vec::split_off
Co-authored-by: Jamey Sharp <jsharp@fastly.com> | diff --git a/crates/runtime/src/mmap_vec.rs b/crates/runtime/src/mmap_vec.rs
index 2779668b2..2eaedc5a3 100644
--- a/crates/runtime/src/mmap_vec.rs
+++ b/crates/runtime/src/mmap_vec.rs
@@ -1,7 +1,7 @@
use crate::Mmap;
use anyhow::{Context, Result};
use std::fs::File;
-use std::ops::{Deref, DerefMut, Range, RangeTo};... | 2 | 34 | 50 |
e0d4934ef4dd61a80f29bb6b917f1e0bc83b9438 | Nick Fitzgerald | 2022-08-15T20:41:08 | Cranelift: Remove the `ABICaller` trait (#4711)
* Cranelift: Remove the `ABICaller` trait
It has only one implementation: the `ABICallerImpl` struct. We can just use that
directly rather than having extra, unnecessary layers of generics and abstractions.
* Cranelift: Rename `ABICallerImpl` to `Caller` | diff --git a/cranelift/codegen/src/isa/aarch64/abi.rs b/cranelift/codegen/src/isa/aarch64/abi.rs
index 4004ae50b..b30c4e5cb 100644
--- a/cranelift/codegen/src/isa/aarch64/abi.rs
+++ b/cranelift/codegen/src/isa/aarch64/abi.rs
@@ -24,7 +24,7 @@ use smallvec::{smallvec, SmallVec};
pub(crate) type AArch64Callee = Callee<A... | 7 | 53 | 112 |
1d0f6fa4fbe4b9a89dc3f417492afc2465f1aece | Trevor Elliott | 2022-08-15T19:00:33 | Fix a bug in produces_const (#4709)
https://github.com/bytecodealliance/wasmtime/pull/4709 | diff --git a/cranelift/codegen/src/isa/x64/inst/mod.rs b/cranelift/codegen/src/isa/x64/inst/mod.rs
index 7019d1187..6e730d74a 100644
--- a/cranelift/codegen/src/isa/x64/inst/mod.rs
+++ b/cranelift/codegen/src/isa/x64/inst/mod.rs
@@ -766,13 +766,13 @@ impl Inst {
/// same as the first register (already handled).
... | 1 | 10 | 6 |
f0c60f46a8f9c590431f4954f94ae04b5bc85c99 | Nick Fitzgerald | 2022-08-15T18:27:05 | Cranelift: Remove `ABICallee` trait (#4701)
* Cranelift: Remove `ABICallee` trait
It has only one implementation: the `ABICalleeImpl` struct. By using that
directly we can avoid unnecessary layers of generics and abstractions as well as
a couple `Box`es that were previously putting the single implementation into ... | diff --git a/cranelift/codegen/src/isa/aarch64/abi.rs b/cranelift/codegen/src/isa/aarch64/abi.rs
index e5e6961a8..4004ae50b 100644
--- a/cranelift/codegen/src/isa/aarch64/abi.rs
+++ b/cranelift/codegen/src/isa/aarch64/abi.rs
@@ -21,7 +21,7 @@ use smallvec::{smallvec, SmallVec};
// these ABIs are very similar.
/// S... | 17 | 142 | 262 |
c6d2a3f94e733dddb7a7dedbcef81eb0252a9d0c | Afonso Bordado | 2022-08-15T16:18:08 | cranelift: Add `ireduce`/`iconcat`/`isplit` to the clif fuzzer (#4703)
* cranelift: Add ireduce to fuzzer
* cranelift: Add iconcat/isplit to fuzzer | diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs
index a80a26951..dbfb54eba 100644
--- a/cranelift/codegen/src/isa/x64/lower.rs
+++ b/cranelift/codegen/src/isa/x64/lower.rs
@@ -1942,7 +1942,7 @@ fn lower_insn_to_regs(
assert_eq!(
ty,
... | 2 | 28 | 3 |
7ddb90d990a6801b21ce0446ea8a744e63f354d5 | Alex Crichton | 2022-08-15T14:55:34 | Remove recursion building types in `component_api` fuzzer (#4694)
* Remove recursion building types in `component_api` fuzzer
Sure enough the fuzzers found an input that blows the stack, so the
type-building here was rewritten to use a heap-based stack instead of a
stack-based-stack.
* Review comments | diff --git a/crates/misc/component-fuzz-util/src/lib.rs b/crates/misc/component-fuzz-util/src/lib.rs
index 8c3813442..e011b4888 100644
--- a/crates/misc/component-fuzz-util/src/lib.rs
+++ b/crates/misc/component-fuzz-util/src/lib.rs
@@ -554,112 +554,136 @@ pub fn rust_type(ty: &Type, name_counter: &mut u32, declaration... | 1 | 147 | 118 |
a83c50321fad140e252bf6adb628be8114cbf740 | Andrew Brown | 2022-08-11T23:52:00 | cranelift: fix build warning (#4698)
In #4375 we introduced a code pattern that appears as a warning when
building the `cranelift-interpreter` crate:
```
warning: cannot borrow `*state` as mutable because it is also borrowed as immutable
--> cranelift/interpreter/src/step.rs:412:13
|
47 | let arg =... | diff --git a/cranelift/interpreter/src/step.rs b/cranelift/interpreter/src/step.rs
index 87c86409d..8860c924e 100644
--- a/cranelift/interpreter/src/step.rs
+++ b/cranelift/interpreter/src/step.rs
@@ -423,7 +423,8 @@ where
}
Opcode::GetPinnedReg => assign(state.get_pinned_reg()),
Opcode::SetP... | 1 | 2 | 1 |
2be15ab814abbac7bf1ead4f9983402ae59395ba | Afonso Bordado | 2022-08-11T23:12:54 | cranelift: Add Rotates to fuzzer (#4696) | diff --git a/cranelift/fuzzgen/src/function_generator.rs b/cranelift/fuzzgen/src/function_generator.rs
index d8e6f78d6..829c46365 100644
--- a/cranelift/fuzzgen/src/function_generator.rs
+++ b/cranelift/fuzzgen/src/function_generator.rs
@@ -141,6 +141,58 @@ const OPCODE_SIGNATURES: &'static [(
(Opcode::Sdiv, &[I32... | 1 | 52 | 0 |
755cd4311ec74eaf843147dfc02b053a06ab0241 | Alex Crichton | 2022-08-11T20:24:48 | Update max tuple size in component api fuzzing (#4675)
Fixes a build failure on #4673 where tuples of length 16 don't implement
`Debug` from the standard library. | diff --git a/crates/misc/component-fuzz-util/src/lib.rs b/crates/misc/component-fuzz-util/src/lib.rs
index da4e2de78..8c3813442 100644
--- a/crates/misc/component-fuzz-util/src/lib.rs
+++ b/crates/misc/component-fuzz-util/src/lib.rs
@@ -123,8 +123,9 @@ pub enum Type {
Record(VecInRange<Type, 0, 200>),
// Tu... | 1 | 3 | 2 |
380db48ce6b7a754025e33bde02a8d14897376f3 | Alex Crichton | 2022-08-11T20:09:46 | Enable the `memory-init-cow` feature building the C API (#4690)
This feature was accidentally disabled by default when building the C API. | diff --git a/crates/c-api/Cargo.toml b/crates/c-api/Cargo.toml
index 12a39a586..249a4b86d 100644
--- a/crates/c-api/Cargo.toml
+++ b/crates/c-api/Cargo.toml
@@ -32,8 +32,9 @@ wasmtime-wasi = { path = "../wasi", optional = true }
cap-std = { version = "0.25.0", optional = true }
[features]
-default = ['jitdump', 'wa... | 1 | 2 | 1 |
c4fd6a95da582a4a21802d981062c9202746ef19 | Andrew Brown | 2022-08-11T19:26:33 | [fuzz] Remove unnecessary allocation (#4689)
This resolves a comment @jameysharp made in a previous PR. | diff --git a/crates/fuzzing/src/generators/single_inst_module.rs b/crates/fuzzing/src/generators/single_inst_module.rs
index 5f619ca16..fda251835 100644
--- a/crates/fuzzing/src/generators/single_inst_module.rs
+++ b/crates/fuzzing/src/generators/single_inst_module.rs
@@ -47,8 +47,7 @@ impl<'a> SingleInstModule<'a> {
... | 1 | 1 | 2 |
c1c48b4386edc17268c1acd66c3c22c67896ae4c | Alex Crichton | 2022-08-11T18:16:28 | Don't be clever about representing non-CoW images (#4691)
This commit fixes a build warning on Rust 1.63 when the `memory-init-cow`
feature is disabled in the `wasmtime-runtime` crate. Some "tricks" were
used prior to have the `MemoryImage` type be an empty `enum {}` but that
wreaks havoc with warnings so this comm... | diff --git a/crates/runtime/src/cow_disabled.rs b/crates/runtime/src/cow_disabled.rs
index a62ba7fca..be06a9f4a 100644
--- a/crates/runtime/src/cow_disabled.rs
+++ b/crates/runtime/src/cow_disabled.rs
@@ -35,7 +35,9 @@ impl ModuleMemoryImages {
/// places (e.g. a `Memory`), we define a zero-sized type when memory is
... | 2 | 9 | 8 |
a40b2537927a72eb6f8cff92339a8a732b68154b | Benjamin Bouvier | 2022-08-11T15:09:04 | Uncomment unwind stack frame tests that now pass on aarch64 (#4687)
Thanks to #4431 and @fitzgen who implemented it! | diff --git a/tests/all/traps.rs b/tests/all/traps.rs
index 884c934e1..d80221a38 100644
--- a/tests/all/traps.rs
+++ b/tests/all/traps.rs
@@ -30,7 +30,6 @@ fn test_trap_return() -> Result<()> {
}
#[test]
-#[cfg_attr(all(target_os = "macos", target_arch = "aarch64"), ignore)] // TODO #2808 system libunwind is broken ... | 1 | 0 | 11 |
c3e31c99461f7f109637528d805dbaa349cf4a22 | Andrew Brown | 2022-08-10T23:43:43 | [fuzz] Document Wasm-JS conversions (#4683)
During differential execution against V8, Wasm values need to be
converted back and forth from JS values. This change documents the
location in the specification where this is defined. | diff --git a/crates/fuzzing/src/oracles/v8.rs b/crates/fuzzing/src/oracles/v8.rs
index bf8b683ab..984b70693 100644
--- a/crates/fuzzing/src/oracles/v8.rs
+++ b/crates/fuzzing/src/oracles/v8.rs
@@ -83,6 +83,8 @@ pub fn differential_v8_execution(wasm: &[u8], config: &crate::generators::Config
ValType::Extern... | 1 | 5 | 0 |
11f0b003eb8b7ebf88c82ed7f63b6d0c21cdfc5b | Afonso Bordado | 2022-08-10T21:17:11 | cranelift: Build a runtest case from fuzzer TestCase's (#4590)
* cranelift: Build a runtest case from fuzzer TestCase's
* cranelift: Add a default expected output for a fuzzgen case | diff --git a/cranelift/fuzzgen/src/lib.rs b/cranelift/fuzzgen/src/lib.rs
index 6e5b138dc..26151697a 100644
--- a/cranelift/fuzzgen/src/lib.rs
+++ b/cranelift/fuzzgen/src/lib.rs
@@ -8,13 +8,13 @@ use cranelift::codegen::ir::Function;
use cranelift::codegen::Context;
use cranelift::prelude::*;
use cranelift_native::bu... | 1 | 54 | 1 |
597eb6f4ce69cce196704fcc20cfc4d0768568e8 | Alex Crichton | 2022-08-10T20:49:51 | Limit the type hierarchies in component fuzzing (#4668)
* Limit the type hierarchies in component fuzzing
For now `wasmparser` has a hard limit on the size of tuples and such at
1000 recursive types within the tuple itself. Respect this limit by
limiting the width of recursive types generated for the `component_a... | diff --git a/crates/misc/component-fuzz-util/src/lib.rs b/crates/misc/component-fuzz-util/src/lib.rs
index 2d5b75fd9..da4e2de78 100644
--- a/crates/misc/component-fuzz-util/src/lib.rs
+++ b/crates/misc/component-fuzz-util/src/lib.rs
@@ -25,10 +25,6 @@ pub const IMPORT_FUNCTION: &str = "echo";
/// The name of the expor... | 1 | 28 | 39 |
54f9587569f80c5899d1e75482197d87d2406e15 | bjorn3 | 2022-08-10T20:48:15 | Don't use libtest harness for filetests (#4655)
We are using our own test harness for filetests and embedding it in
libtest isn't useful. It only hides test output until the end and
results in unnecessary noise. | diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml
index d4b728392..e01c54371 100644
--- a/cranelift/Cargo.toml
+++ b/cranelift/Cargo.toml
@@ -13,6 +13,11 @@ edition = "2021"
name = "clif-util"
path = "src/clif-util.rs"
+[[test]]
+name = "filetests"
+path = "tests/filetests.rs"
+harness = false
+
[dependenci... | 2 | 8 | 4 |
918debfe59d3bf4b13b6f76fe32debbe1393a7ad | Dan Gohman | 2022-08-10T20:44:23 | Stop returning `NOTCAPABLE` errors from WASI calls. (#4666)
* Stop returning `NOTCAPABLE` errors from WASI calls.
`ENOTCAPABLE` was an error code that is used as part of the rights
system, from CloudABI. There is a set of flags associated with each file
descriptor listing which operations can be performed with th... | diff --git a/crates/test-programs/wasi-tests/src/bin/path_open_read_without_rights.rs b/crates/test-programs/wasi-tests/src/bin/path_open_read_without_rights.rs
index c67fbe128..0adceee9a 100644
--- a/crates/test-programs/wasi-tests/src/bin/path_open_read_without_rights.rs
+++ b/crates/test-programs/wasi-tests/src/bin/... | 6 | 30 | 9 |
be36dd6b1ec519ef7698112379a9818e7c1ff234 | Ulrich Weigand | 2022-08-10T20:07:54 | s390x: Enable object backend (#4680)
This enables the object backend for s390x, in particular the
processing of all required relocations.
This uncovered a bug: we need to use PLT relocations for the
target of calls, which we currently do not. Fixed by adding
a new S390xPLTRel32Dbl reloc type and using it where ... | diff --git a/cranelift/codegen/src/binemit/mod.rs b/cranelift/codegen/src/binemit/mod.rs
index 9a1bfe015..90cff8bf5 100644
--- a/cranelift/codegen/src/binemit/mod.rs
+++ b/cranelift/codegen/src/binemit/mod.rs
@@ -43,6 +43,8 @@ pub enum Reloc {
Arm64Call,
/// s390x PC-relative 4-byte offset
S390xPCRel32Db... | 5 | 37 | 2 |
ecb91c0b06d8f123f94e898878cb129372ef5a15 | Jamey Sharp | 2022-08-10T19:56:23 | List preset's settings in generated comment (#4679)
Figuring out which boolean settings go into each preset is not easy by
inspecting the DSL source (e.g. meta/src/isa/x86.rs). This patch extends
the comments in the Rust that's generated by that DSL to list the names
of the settings together with the name of the pr... | diff --git a/cranelift/codegen/meta/src/cdsl/settings.rs b/cranelift/codegen/meta/src/cdsl/settings.rs
index c4e76b760..6b4179034 100644
--- a/cranelift/codegen/meta/src/cdsl/settings.rs
+++ b/cranelift/codegen/meta/src/cdsl/settings.rs
@@ -110,6 +110,15 @@ impl Preset {
}
layout
}
+
+ pub fn ... | 2 | 14 | 1 |
354daf5b932319398a9671a9e86bd4606e71a651 | Andrew Brown | 2022-08-10T16:47:02 | [fuzz] Fix issues with single-inst module generator (#4674)
* [fuzz] Fix signature of `i64.extend32_s` single-instruction test
This single-instruction test incorrectly attempted to convert an `i32`
to an `i64`; the correct signature is `i64 -> i64`. See the [WebAssembly
specification](https://webassembly.github.i... | diff --git a/crates/fuzzing/src/generators/single_inst_module.rs b/crates/fuzzing/src/generators/single_inst_module.rs
index 1d860d7ac..5f619ca16 100644
--- a/crates/fuzzing/src/generators/single_inst_module.rs
+++ b/crates/fuzzing/src/generators/single_inst_module.rs
@@ -111,7 +111,7 @@ macro_rules! compare {
macro... | 1 | 2 | 2 |
fd28d94352725ce65610aa7e7a11d4a39f8f4c2a | Alex Crichton | 2022-08-10T14:58:34 | Shield compiled modules from their appended metadata (#4609)
This commit fixes #4600 in a somewhat roundabout fashion. Currently the
`main` branch of Wasmtime exhibits unusual behavior:
* If `./ci/run-tests.sh` is run then the `cache_accounts_for_opt_level`
test does not fail.
* If `cargo test -p wasmtime --li... | diff --git a/crates/wasmtime/src/module/serialization.rs b/crates/wasmtime/src/module/serialization.rs
index 23c83e4d4..4dac54b39 100644
--- a/crates/wasmtime/src/module/serialization.rs
+++ b/crates/wasmtime/src/module/serialization.rs
@@ -264,15 +264,15 @@ impl<'a> SerializedModule<'a> {
)
}
- pub ... | 1 | 7 | 6 |
97b2680f20c34b8e0c2986392f9025ebbef875af | Afonso Bordado | 2022-08-09T21:47:26 | cranelift: Remove legalized_to_pointer from function generator (#4665) | diff --git a/cranelift/fuzzgen/src/function_generator.rs b/cranelift/fuzzgen/src/function_generator.rs
index 4672b0f0d..6fed1c4b2 100644
--- a/cranelift/fuzzgen/src/function_generator.rs
+++ b/cranelift/fuzzgen/src/function_generator.rs
@@ -300,7 +300,6 @@ where
value_type,
purpose,
... | 1 | 0 | 1 |
b17a734a5722a8cb9205b14575ca13eb13a59677 | Nick Fitzgerald | 2022-08-09T20:17:43 | Fix unused result that is `#[must_use]` (#4663)
Fixes this compiler warning:
```
warning: unused return value of `Box::<T>::from_raw` that must be used
--> crates/bench-api/src/lib.rs:351:9
|
351 | Box::from_raw(state as *mut BenchState);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... | diff --git a/crates/bench-api/src/lib.rs b/crates/bench-api/src/lib.rs
index 0806f43bb..72b27116f 100644
--- a/crates/bench-api/src/lib.rs
+++ b/crates/bench-api/src/lib.rs
@@ -348,7 +348,7 @@ pub extern "C" fn wasm_bench_create(
pub extern "C" fn wasm_bench_free(state: *mut c_void) {
assert!(!state.is_null());
... | 1 | 1 | 1 |
d5de91b953e2816af7b1076a55be7423a685c27f | Afonso Bordado | 2022-08-09T19:43:08 | cranelift: Fuzz cold blocks (#4654) | diff --git a/cranelift/fuzzgen/src/function_generator.rs b/cranelift/fuzzgen/src/function_generator.rs
index 60823e306..4672b0f0d 100644
--- a/cranelift/fuzzgen/src/function_generator.rs
+++ b/cranelift/fuzzgen/src/function_generator.rs
@@ -639,11 +639,19 @@ where
let blocks = (0..block_count)
.... | 1 | 9 | 1 |
66025636fd6bef4b3f717a75640f6c2bfca9eade | Alex Crichton | 2022-08-09T17:59:53 | Remove a layer of recursion in adapter compilation (#4657)
In #4640 a feature was added to adapter modules that whenever
translation goes through memory it instead goes through a helper
function as opposed to inlining it directly. The generation of the
helper function happened recursively at compile time, however, ... | diff --git a/crates/environ/src/fact.rs b/crates/environ/src/fact.rs
index 19f8a899b..895db3ea5 100644
--- a/crates/environ/src/fact.rs
+++ b/crates/environ/src/fact.rs
@@ -66,6 +66,7 @@ pub struct Module<'a> {
funcs: PrimaryMap<FunctionId, Function>,
translate_mem_funcs: HashMap<(InterfaceType, InterfaceTy... | 2 | 35 | 20 |
de8d44d0e580d6fb90cdf893882f7b8ffb82314e | Chris Fallin | 2022-08-09T17:38:48 | Cranelift: MachBuffer: apply branch peephole opts one last time at buffer tail. (#4652)
The `MachBuffer` applies a set of peephole-optimization rules to do
branch threading, leverage fallthrough paths, eliminate empty blocks,
and flip conditional branches where needed to make branches more
efficient starting from n... | diff --git a/cranelift/codegen/src/isa/x64/mod.rs b/cranelift/codegen/src/isa/x64/mod.rs
index 9a16a757a..8c7415d88 100644
--- a/cranelift/codegen/src/isa/x64/mod.rs
+++ b/cranelift/codegen/src/isa/x64/mod.rs
@@ -329,7 +329,7 @@ mod test {
// 00000018 81E834120000 sub eax,0x1234
// 0000001E 440... | 2 | 7 | 4 |
a36a52a0175c9bc230694cbc26960c9272edc071 | Afonso Bordado | 2022-08-09T16:28:41 | cranelift: Print error message when basic blocks are invalid (#4591) | diff --git a/cranelift/frontend/src/frontend.rs b/cranelift/frontend/src/frontend.rs
index a5792214d..644c38e72 100644
--- a/cranelift/frontend/src/frontend.rs
+++ b/cranelift/frontend/src/frontend.rs
@@ -619,9 +619,12 @@ impl<'a> FunctionBuilder<'a> {
{
// Iterate manually to provide more helpful... | 1 | 5 | 2 |
dd6e790090a36983077589754a10f8b3165c81ac | Afonso Bordado | 2022-08-09T16:03:38 | cranelift: Fuzz Argument Extensions in clif-fuzzer (#4589) | diff --git a/cranelift/fuzzgen/src/function_generator.rs b/cranelift/fuzzgen/src/function_generator.rs
index e0eb43602..60823e306 100644
--- a/cranelift/fuzzgen/src/function_generator.rs
+++ b/cranelift/fuzzgen/src/function_generator.rs
@@ -1,4 +1,4 @@
-use crate::codegen::ir::ValueList;
+use crate::codegen::ir::{Argum... | 1 | 16 | 4 |
8aee85ebaa99695ca0a2c77081ee227402539fa2 | Michael Chesser | 2022-08-09T05:05:57 | Propagate cold annotations to edge blocks (#4636)
Update the lowering stage to mark edge blocks as cold if either the
predecessor or successor block is cold. | diff --git a/cranelift/codegen/src/isa/x64/mod.rs b/cranelift/codegen/src/isa/x64/mod.rs
index 8c7415d88..9a16a757a 100644
--- a/cranelift/codegen/src/isa/x64/mod.rs
+++ b/cranelift/codegen/src/isa/x64/mod.rs
@@ -329,7 +329,7 @@ mod test {
// 00000018 81E834120000 sub eax,0x1234
// 0000001E 440... | 2 | 17 | 9 |
0b1f51f80427a79fbd7d77849f7e2301a1d128f5 | Nick Fitzgerald | 2022-08-08T22:48:03 | Remove unnecessary parens around expression (#4647)
Fixes a compiler warning. | diff --git a/crates/runtime/src/table.rs b/crates/runtime/src/table.rs
index ca13a846b..70bea7014 100644
--- a/crates/runtime/src/table.rs
+++ b/crates/runtime/src/table.rs
@@ -103,7 +103,7 @@ impl TableElement {
/// The same warnings as for `into_table_values()` apply.
pub(crate) unsafe fn into_ref_asserting... | 1 | 1 | 1 |
e81ad3c7eb5d6dee6acf6197bad3b495452ac9e2 | Nick Fitzgerald | 2022-08-08T22:25:15 | cli-flags: Don't ignore the first flag in `CommonOptions::parse_from_str` (#4642) | diff --git a/crates/cli-flags/src/lib.rs b/crates/cli-flags/src/lib.rs
index 49ad0ce06..5f57363f1 100644
--- a/crates/cli-flags/src/lib.rs
+++ b/crates/cli-flags/src/lib.rs
@@ -229,7 +229,11 @@ pub struct CommonOptions {
impl CommonOptions {
pub fn parse_from_str(s: &str) -> Result<Self> {
- let parts = ... | 1 | 7 | 3 |
863659e04f61f3085f095c91e8e684cf9da86e07 | Chris Fallin | 2022-08-08T20:57:18 | VCode emission: account for RA spill/reload/moves in worst-case block size. (#4644)
To determine whether we need to insert a "veneer island" of
branch-range extension veneers, we need to know ahead of emitting a
basic block the worst-case size of that block. This is because veneers
only go between blocks (we could ... | diff --git a/cranelift/codegen/src/machinst/vcode.rs b/cranelift/codegen/src/machinst/vcode.rs
index 7f8e8075f..1db50be4d 100644
--- a/cranelift/codegen/src/machinst/vcode.rs
+++ b/cranelift/codegen/src/machinst/vcode.rs
@@ -806,7 +806,23 @@ impl<I: VCodeInst> VCode<I> {
inst_offsets.resize(self.insts.len(... | 1 | 25 | 6 |
ec47335b9c1706f40571941cd6dea3ca65236ed9 | Nick Fitzgerald | 2022-08-08T20:54:51 | wasmtime: Add a `Config::native_unwind_info` method (#4643)
This method configures whether native unwind information (e.g. `.eh_frame` on
Linux) is generated or not.
This helps integrate with third-party stack capturing tools, such as the system
unwinder or the `backtrace` crate. It does not affect whether Wasmti... | diff --git a/crates/fuzzing/src/generators/config.rs b/crates/fuzzing/src/generators/config.rs
index 0358d7075..a2bd2dc2f 100644
--- a/crates/fuzzing/src/generators/config.rs
+++ b/crates/fuzzing/src/generators/config.rs
@@ -172,7 +172,7 @@ impl Config {
.wasm_simd(self.module_config.config.simd_enabled)
... | 4 | 45 | 34 |
c5e3c0cafbc21d9181b4105034c50b5164b1bfc5 | Chris Fallin | 2022-08-06T00:27:56 | AArch64: don't assert inst within worst-case size when island emitted. (#4627)
We assert after emitting each instruction that its size was less than
the "worst-case size", which is used to determine when we need to
proactively emit an island so pending branch fixups don't go out of
bounds. However, the `EmitIsland`... | diff --git a/cranelift/codegen/src/isa/aarch64/inst/emit.rs b/cranelift/codegen/src/isa/aarch64/inst/emit.rs
index ab210acda..4ebf4de99 100644
--- a/cranelift/codegen/src/isa/aarch64/inst/emit.rs
+++ b/cranelift/codegen/src/isa/aarch64/inst/emit.rs
@@ -3140,7 +3140,13 @@ impl MachInstEmit for Inst {
}
... | 1 | 7 | 1 |
95e72db458787cfe78169c56e64004e22aa0e45b | Nick Fitzgerald | 2022-08-05T20:25:24 | Some little Cranelift logging things (#4624)
* Cranelift: Don't print "skipped TEST can't run aarch64" on x64, etc
It's way too noisy. Move it to the logs.
* Cranelift: Enable Cranelift trace logs in `clif-util` by default
* cranelift-filetest: use `log::warn!` for warnings
Instead of `println!`
* rustf... | diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml
index a783ff58b..d4b728392 100644
--- a/cranelift/Cargo.toml
+++ b/cranelift/Cargo.toml
@@ -43,7 +43,7 @@ anyhow = "1.0.32"
clap = { version = "3.2.0", features = ["derive"] }
[features]
-default = ["disas", "wasm", "cranelift-codegen/all-arch", "souper-harve... | 3 | 6 | 4 |
1ed7b43e62c4071835029c005393c4aa17400cdd | Nick Fitzgerald | 2022-08-05T16:46:46 | Cranelift: Remove unused `ABICaller::signature` method (#4621)
And the `ABICallerImpl::ir_sig` field that was used to implement that
method. This removes 56 bytes from the size of `ABICallerImpl` and gives us
speed ups to compilation of about 7% on all benchmarks.
```
compilation :: nanoseconds :: benchmarks/pul... | diff --git a/cranelift/codegen/src/machinst/abi.rs b/cranelift/codegen/src/machinst/abi.rs
index 26c1e9a59..dd4b95d2b 100644
--- a/cranelift/codegen/src/machinst/abi.rs
+++ b/cranelift/codegen/src/machinst/abi.rs
@@ -191,9 +191,6 @@ pub trait ABICaller {
/// Get the number of arguments expected.
fn num_args(&... | 2 | 0 | 11 |
ad223c523450e8102318e2bb4926516be9c5d3ab | Teymour Aldridge | 2022-08-04T16:19:15 | Add `try_use_var` method to `cranelift-frontend`. (#4588)
* Add `try_use_var` method to `cranelift-frontend`.
- Unlike `use_var`, this method does not panic if the variable has not been defined
before use
* Add `try_declare_var` and `try_def_var`.
- Also implement Error for error enums.
* Use `write!` macro.
... | diff --git a/cranelift/frontend/src/frontend.rs b/cranelift/frontend/src/frontend.rs
index 5441bf03a..a5792214d 100644
--- a/cranelift/frontend/src/frontend.rs
+++ b/cranelift/frontend/src/frontend.rs
@@ -1,8 +1,9 @@
//! A frontend for building Cranelift IR from other languages.
use crate::ssa::{SSABuilder, SideEffec... | 1 | 194 | 31 |
70ce288dc793f83836403f3dac35bbba2b7ec3e9 | Nick Fitzgerald | 2022-08-04T15:27:30 | Save exit Wasm FP and PC in component-to-host trampolines (#4601)
* Wasmtime: Add a pointer to `VMRuntimeLimits` in component contexts
* Save exit Wasm FP and PC in component-to-host trampolines
Fixes #4535
* Add comment about why we deref the trampoline's FP
* Update some tests to use new `vmruntime_limi... | diff --git a/cranelift/codegen/src/ir/immediates.rs b/cranelift/codegen/src/ir/immediates.rs
index ae7c5f20f..3dba40645 100644
--- a/cranelift/codegen/src/ir/immediates.rs
+++ b/cranelift/codegen/src/ir/immediates.rs
@@ -426,6 +426,12 @@ impl From<i32> for Offset32 {
}
}
+impl From<u8> for Offset32 {
+ fn fr... | 16 | 212 | 155 |
ff6082c0afb2a76b3808018939e2cd536daf0614 | Alex Crichton | 2022-08-03T17:12:00 | Improve readability of memory64 compat in `fact` (#4581)
This commit aims to improve the readability of supporting the memory64
proposal in the `fact` adapter trampoline compiler. Previously there
were a few sprinkled blocks that used `if` to generate different
instructions inline, but as I've worked on support for... | diff --git a/crates/environ/src/fact/trampoline.rs b/crates/environ/src/fact/trampoline.rs
index 1ad9c2c9a..16e528dd1 100644
--- a/crates/environ/src/fact/trampoline.rs
+++ b/crates/environ/src/fact/trampoline.rs
@@ -825,16 +825,6 @@ impl Compiler<'_, '_> {
let cur_src_ptr = self.gen_local(src_opts.ptr());... | 1 | 78 | 70 |
9f82644cc3244815675944815aedf7ce0483a95d | Alex Crichton | 2022-08-03T16:21:55 | Some minor cleanups/refactorings in components (#4582)
This is a collection of some minor renamings, refactorings, sharing of
code, etc. This was all discovered during my addition of string support
to adapter functions and I figured it'd be best to frontload this and
land it ahead of the full patch since it's getti... | diff --git a/crates/cranelift/src/compiler/component.rs b/crates/cranelift/src/compiler/component.rs
index f45862f0c..803a5629a 100644
--- a/crates/cranelift/src/compiler/component.rs
+++ b/crates/cranelift/src/compiler/component.rs
@@ -8,9 +8,10 @@ use cranelift_codegen::ir::{self, InstBuilder, MemFlags};
use craneli... | 5 | 67 | 77 |
0a6baeddf4685ffe78300dfdd2a0b65c3fa2c14b | Alex Crichton | 2022-08-03T16:21:30 | Improve some support in `factc`: (#4580)
* Support CLI parameters for string encoding
* Fix `--skip-validate`
* Fix printing binary to stdout | diff --git a/crates/environ/examples/factc.rs b/crates/environ/examples/factc.rs
index 763b0cdf0..98e7c6868 100644
--- a/crates/environ/examples/factc.rs
+++ b/crates/environ/examples/factc.rs
@@ -1,7 +1,7 @@
use anyhow::{bail, Context, Result};
use clap::Parser;
+use std::io::Write;
use std::path::PathBuf;
-use std... | 1 | 32 | 12 |
f587b10eb9e9874c9aa82c7dff02ec0833e1d175 | Alex Crichton | 2022-08-03T16:08:36 | Reduce wasm invocations in the `stacks` fuzzer (#4595)
On oss-fuzz a test case has been found that executes 30k iterations of a
wasm trap which with a 60s timeout leaves 2ms for each invocation which
under fuzzing instrumentation is a bit of a stretch with a ~20x
slowdown. This commit places a limit on the number o... | diff --git a/crates/fuzzing/src/generators/stacks.rs b/crates/fuzzing/src/generators/stacks.rs
index de0bd94e9..ffb95158e 100644
--- a/crates/fuzzing/src/generators/stacks.rs
+++ b/crates/fuzzing/src/generators/stacks.rs
@@ -35,7 +35,7 @@ enum Op {
impl<'a> Arbitrary<'a> for Stacks {
fn arbitrary(u: &mut Unstruct... | 1 | 1 | 1 |
55215bbd1e03303de10f128fe3c4db3cd9ec5171 | Nick Fitzgerald | 2022-08-03T00:40:36 | Use a `SmallVec` for `ABIArgSlot`s (#4586)
These are always length 1 for Wasm benchmarks.
<h3>Sightglass Benchmark Results</h3>
```
compilation :: nanoseconds :: benchmarks/spidermonkey/benchmark.wasm
Δ = 328624015.86 ± 40274677.93 (confidence = 99%)
main.so is 0.88x to 0.91x faster than slots-smallve... | diff --git a/cranelift/codegen/src/isa/aarch64/abi.rs b/cranelift/codegen/src/isa/aarch64/abi.rs
index e57866c30..524740d45 100644
--- a/cranelift/codegen/src/isa/aarch64/abi.rs
+++ b/cranelift/codegen/src/isa/aarch64/abi.rs
@@ -212,7 +212,7 @@ impl ABIMachineSpec for AArch64MachineDeps {
let upper... | 3 | 10 | 5 |
ab1cf3df2da2544fb55ada5541f69efb4ca613bd | Nick Fitzgerald | 2022-08-02T22:53:44 | Use a `SmallVec` for `ABIArg`s (#4584)
Instead of a regular `Vec`.
These vectors are usually very small, for example here is the histogram of sizes
when running Sightglass's `pulldown-cmark` benchmark:
```
;; Number of samples = 10332
;; Min = 0
;; Max = 11
;;
;; Mean = 2.496128532713901
;; Standard devia... | diff --git a/cranelift/codegen/src/isa/aarch64/abi.rs b/cranelift/codegen/src/isa/aarch64/abi.rs
index 0fcc181aa..e57866c30 100644
--- a/cranelift/codegen/src/isa/aarch64/abi.rs
+++ b/cranelift/codegen/src/isa/aarch64/abi.rs
@@ -85,7 +85,7 @@ impl ABIMachineSpec for AArch64MachineDeps {
params: &[ir::AbiParam]... | 4 | 12 | 9 |
edf7f9f2bbbfb5f9db80665a36cee56a7269aea8 | Nick Fitzgerald | 2022-08-02T22:06:44 | wasmtime: Add lots of logging for `externref`s and `table_ops` fuzz target (#4583)
I essentially add these same logs back in every time I'm debugging something
related to this fuzz target or `externref`s in general. Probably like 5 times
I've added roughly these logs. We should just make them available whenever we
... | diff --git a/cranelift/codegen/src/machinst/buffer.rs b/cranelift/codegen/src/machinst/buffer.rs
index 44a7b9be3..0f915a96d 100644
--- a/cranelift/codegen/src/machinst/buffer.rs
+++ b/cranelift/codegen/src/machinst/buffer.rs
@@ -1338,6 +1338,7 @@ impl<I: VCodeInst> MachBuffer<I> {
(start_offset, end_of... | 4 | 95 | 41 |
ee5b192d35918adf2b390fac558336955935b96a | Alex Crichton | 2022-08-02T20:43:33 | Re-enable component model `*.wast` tests (#4577)
* Re-enable component model `*.wast` tests
These accidentally stopped running as part of #4556 on CI since I forgot
one more location to touch a feature gate.
* Enable logging in component tests
This is a small convenience to get log messages during testing fo... | diff --git a/Cargo.toml b/Cargo.toml
index e50cd24b4..76484a280 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -60,6 +60,7 @@ wat = "1.0.47"
once_cell = "1.9.0"
rayon = "1.5.0"
component-macro-test = { path = "crates/misc/component-macro-test" }
+wasmtime-wast = { path = "crates/wast", version = "=0.40.0", features = [... | 3 | 4 | 3 |
43125aa994438b2692e2407d410d3b6b81c2cbd5 | Peter Huene | 2022-08-02T20:28:43 | components: fix trampoline compilation for lists. (#4579)
This commit fixes trampoline compilation for lists where the loop condition
would only branch if the amount remaining was 0 instead of not 0.
It resulted in only the first element of the list being copied. | diff --git a/crates/environ/src/fact/trampoline.rs b/crates/environ/src/fact/trampoline.rs
index 405e8489c..1ad9c2c9a 100644
--- a/crates/environ/src/fact/trampoline.rs
+++ b/crates/environ/src/fact/trampoline.rs
@@ -833,6 +833,7 @@ impl Compiler<'_, '_> {
let src_add = if src_opts.memory64 { I64Add } else... | 1 | 3 | 1 |
ff37c9d8a4cc276adc2903ace4aafad520ba592d | Benjamin Bouvier | 2022-08-02T19:05:40 | [cranelift] Rejigger the `compile` API (#4540)
* Move `emit_to_memory` to `MachCompileResult`
This small refactoring makes it clearer to me that emitting to memory
doesn't require anything else from the compilation `Context`. While it's
a trivial change, it's a small public API change that shouldn't cause
too mu... | diff --git a/cranelift/codegen/src/context.rs b/cranelift/codegen/src/context.rs
index 5cc50f5c5..fb7b8bb37 100644
--- a/cranelift/codegen/src/context.rs
+++ b/cranelift/codegen/src/context.rs
@@ -10,7 +10,6 @@
//! single ISA instance.
use crate::alias_analysis::AliasAnalysis;
-use crate::binemit::CodeInfo;
use cr... | 17 | 159 | 201 |
05e6abf2f64820a0f3a7903cfe196f04bffd7832 | Alex Crichton | 2022-08-01T16:03:23 | Fix the `stacks` fuzzer in the face of stack overflow (#4557)
When the `stacks` fuzzer hits a stack overflow the trace generated by
Wasmtime will have one more frame than the trace generated by the wasm
itself. This comes about due to the wasm not actually pushing the final
frame when it stack overflows. The host, ... | diff --git a/crates/fuzzing/src/oracles/stacks.rs b/crates/fuzzing/src/oracles/stacks.rs
index 3a289a97f..54dde5801 100644
--- a/crates/fuzzing/src/oracles/stacks.rs
+++ b/crates/fuzzing/src/oracles/stacks.rs
@@ -57,7 +57,9 @@ pub fn check_stacks(stacks: Stacks) -> usize {
let mut max_stack_depth = 0;
for i... | 1 | 17 | 1 |
8d0224341c3336330b548c9c9e845da42a883080 | Benjamin Bouvier | 2022-08-01T09:19:15 | cranelift: Introduce a feature to enable `trace` logs (#4484)
* Don't use `log::trace` directly but a feature-enabled `trace` macro
* Don't emit disassembly based on the log level | diff --git a/cranelift/codegen/Cargo.toml b/cranelift/codegen/Cargo.toml
index 0d055afda..02d11eeb1 100644
--- a/cranelift/codegen/Cargo.toml
+++ b/cranelift/codegen/Cargo.toml
@@ -54,6 +54,9 @@ core = ["hashbrown"]
# can significantly increase the size of the library.
testing_hooks = []
+# Enables detailed logging... | 20 | 95 | 80 |
ce7bbef24df39ee7060bf786a7c95888d291b53a | Alex Crichton | 2022-07-28T16:47:15 | Implement other variant-like types in adapter fusion (#4547)
This commit fills out the adapter fusion compiler for the `union`,
`enum`, `option,` and `result` types. The preexisting support for
`variant` types was refactored slightly to be extensible to all of these
other types and they all now call into the same c... | diff --git a/crates/environ/fuzz/fuzz_targets/fact-valid-module.rs b/crates/environ/fuzz/fuzz_targets/fact-valid-module.rs
index f00b27b6a..ba5c820ea 100644
--- a/crates/environ/fuzz/fuzz_targets/fact-valid-module.rs
+++ b/crates/environ/fuzz/fuzz_targets/fact-valid-module.rs
@@ -16,6 +16,9 @@ use wasmparser::{Validato... | 3 | 258 | 36 |
8137432e67c920b73a3bbcc4eb72ae5095d31f41 | Andrew Brown | 2022-07-28T14:22:27 | x64: only enable VTune dependencies on x86_64 targets (#4533)
As described in #4523, the `ittapi` dependency necessary for Wasmtime's
VTune support does not compile on `aarch64-linux-android`. There are
several incompatible parts here: though `ittapi` supports all OS
combinations that Wasmtime does and builds on al... | diff --git a/crates/jit/Cargo.toml b/crates/jit/Cargo.toml
index da683d794..74ae56c0a 100644
--- a/crates/jit/Cargo.toml
+++ b/crates/jit/Cargo.toml
@@ -22,7 +22,6 @@ gimli = { version = "0.26.0", default-features = false, features = ["std", "read
object = { version = "0.29.0", default-features = false, features = ["s... | 1 | 3 | 1 |
ad050e6fb260ba149eaab51329c40078abe60477 | Jamey Sharp | 2022-07-27T23:41:30 | cranelift-wasm: Only allocate if vectors need bitcasts (#4543)
For wasm programs using SIMD vector types, the type known at function
entry or exit may not match the type used within the body of the
function, so we have to bitcast them. We have to check all calls and
returns for this condition, which involves compar... | diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs
index 6a808c4d4..9c1e7360b 100644
--- a/cranelift/wasm/src/code_translator.rs
+++ b/cranelift/wasm/src/code_translator.rs
@@ -89,6 +89,7 @@ use cranelift_codegen::ir::{
};
use cranelift_codegen::packed_option::ReservedValue;
u... | 2 | 75 | 49 |
799e8919fec15554d821821fe139c534e009bb7a | Jamey Sharp | 2022-07-27T01:59:18 | Don't allocate in DataFlowGraph::block_param_types (#4538)
DHAT reports that when compiling the Spidermonkey Sightglass benchmark,
there are over 100k of these Vec allocations, averaging less than 4
bytes, and with an average lifetime of only about 500 instructions.
This function is only called from one place, wh... | diff --git a/cranelift/codegen/src/ir/dfg.rs b/cranelift/codegen/src/ir/dfg.rs
index e1f159576..65b97cbb7 100644
--- a/cranelift/codegen/src/ir/dfg.rs
+++ b/cranelift/codegen/src/ir/dfg.rs
@@ -14,7 +14,6 @@ use crate::ir::{
use crate::packed_option::ReservedValue;
use crate::write::write_operands;
use crate::HashMap... | 1 | 2 | 6 |
50b919588294f918aa61f030f05115bfc797ab86 | Nick Fitzgerald | 2022-07-27T01:38:24 | cranelift-frontend: Reuse visited block sets in `SSABuilder::can_optimize_var_lookup` (#4536)
First, we switch from a `BTreeSet` to a `HashSet` because clearing a `BTreeSet`
will deallocate the btree's nodes but clearing a `HashSet` will not deallocate
the backing hash table, saving the space to reuse for future ins... | diff --git a/cranelift/frontend/src/ssa.rs b/cranelift/frontend/src/ssa.rs
index ce0310317..086a44cc2 100644
--- a/cranelift/frontend/src/ssa.rs
+++ b/cranelift/frontend/src/ssa.rs
@@ -8,7 +8,6 @@
//! <https://link.springer.com/content/pdf/10.1007/978-3-642-37051-9_6.pdf>
use crate::Variable;
-use alloc::collection... | 1 | 11 | 6 |
0e6ffd024307563cb8f2bff3e7a44e4293b263d5 | Dan Gohman | 2022-07-26T22:53:17 | Don't try to report file size or timestamps for stdio streams. (#4531)
* Don't try to report file size or timestamps for stdio streams.
Calling `File::metadata()` on a stdio stream handle fails on Windows, where
the stdio streams are not files.
This `File::metadata()` call was effectively only being used to add... | diff --git a/crates/test-programs/wasi-tests/src/bin/fd_filestat_get.rs b/crates/test-programs/wasi-tests/src/bin/fd_filestat_get.rs
new file mode 100644
index 000000000..d2ba27a1d
--- /dev/null
+++ b/crates/test-programs/wasi-tests/src/bin/fd_filestat_get.rs
@@ -0,0 +1,25 @@
+unsafe fn test_fd_filestat_get() {
+
+ ... | 2 | 26 | 14 |
1183191d7d24572c73b8c34bd1cc61efeeae5cac | Afonso Bordado | 2022-07-26T16:40:12 | fuzzgen: Add i128 support (#4529) | diff --git a/cranelift/fuzzgen/src/function_generator.rs b/cranelift/fuzzgen/src/function_generator.rs
index 13a10367a..ee9eb7274 100644
--- a/cranelift/fuzzgen/src/function_generator.rs
+++ b/cranelift/fuzzgen/src/function_generator.rs
@@ -116,26 +116,31 @@ const OPCODE_SIGNATURES: &'static [(
(Opcode::Iadd, &[I1... | 3 | 32 | 13 |
81bff71d11103db08e112865f9fdd80c2d7593f9 | Nick Fitzgerald | 2022-07-25T23:38:04 | wasmtime: let serialization mismatch tests pass with `RUST_BACKTRACE=1` set (#4525) | diff --git a/crates/wasmtime/src/module/serialization.rs b/crates/wasmtime/src/module/serialization.rs
index 4666763ea..23c83e4d4 100644
--- a/crates/wasmtime/src/module/serialization.rs
+++ b/crates/wasmtime/src/module/serialization.rs
@@ -610,14 +610,13 @@ mod test {
match serialized.into_module(&engine) {... | 1 | 4 | 6 |
78d3e0b69342d3d08d530ed9ad827f7cf02a24e8 | Afonso Bordado | 2022-07-25T22:26:29 | fuzzgen: Fuzz Switch API (#4502)
* fuzzgen: Use Switch interface
Turns out this is an interface that the frontend provides.
We should fuzz it.
* cranelift: Restrict index range in Switch emission on fuzzgen | diff --git a/cranelift/fuzzgen/src/config.rs b/cranelift/fuzzgen/src/config.rs
index 2217ced1a..0ea0ae140 100644
--- a/cranelift/fuzzgen/src/config.rs
+++ b/cranelift/fuzzgen/src/config.rs
@@ -16,8 +16,16 @@ pub struct Config {
/// This value does not apply to block0 which takes the function params
/// and is... | 2 | 59 | 1 |
4720d09651681547fd01bb2dce21b13467a64df4 | Afonso Bordado | 2022-07-22T17:55:36 | cranelift: Fix Switch bug when emitting indexes larger than val type (#4507)
In #4502 we discovered a bug in the switch api where it would emit
`icmp_imm`'s with types that were not able to fully represent the
destination index.
We now reject these inputs. The index val must always have a
type that is capable of... | diff --git a/cranelift/frontend/src/switch.rs b/cranelift/frontend/src/switch.rs
index 7be8c8d0a..4ff852c5d 100644
--- a/cranelift/frontend/src/switch.rs
+++ b/cranelift/frontend/src/switch.rs
@@ -293,11 +293,16 @@ impl Switch {
/// * The value to switch on
/// * The default block
pub fn emit(self, bx: &... | 1 | 54 | 45 |
35b750ab9a9c4e70e80c4a795e9f51d9f83ee6fc | Nick Fitzgerald | 2022-07-21T23:16:23 | Implement `std::fmt::Pointer` for `ExternRef` (#4504) | diff --git a/crates/runtime/src/externref.rs b/crates/runtime/src/externref.rs
index 9477acd4f..4da7cc55d 100644
--- a/crates/runtime/src/externref.rs
+++ b/crates/runtime/src/externref.rs
@@ -165,6 +165,12 @@ use wasmtime_environ::StackMap;
#[repr(transparent)]
pub struct VMExternRef(NonNull<VMExternData>);
+impl ... | 2 | 12 | 0 |
b24c561cebf05b365cb70d722ce845273a61d5d0 | Nick Fitzgerald | 2022-07-21T22:31:05 | cranelift: Don't log CLIF and assembly at debug level (#4503)
Too verbose. Only log them at trace level. | diff --git a/cranelift/codegen/src/context.rs b/cranelift/codegen/src/context.rs
index 9216de8d1..5cc50f5c5 100644
--- a/cranelift/codegen/src/context.rs
+++ b/cranelift/codegen/src/context.rs
@@ -133,7 +133,7 @@ impl Context {
self.verify_if(isa)?;
let opt_level = isa.flags().opt_level();
- ... | 2 | 2 | 2 |
ca36ce57c2e7903fe2410aae95d564bb7d792cb5 | Afonso Bordado | 2022-07-21T19:01:44 | fuzzgen: Generate const's (#4500)
We already have const support, but currently only use it when building
the pool of variables but never in the main instruction selection. | diff --git a/cranelift/fuzzgen/src/function_generator.rs b/cranelift/fuzzgen/src/function_generator.rs
index 524aa57d3..7da0381b4 100644
--- a/cranelift/fuzzgen/src/function_generator.rs
+++ b/cranelift/fuzzgen/src/function_generator.rs
@@ -80,6 +80,20 @@ fn insert_stack_store(
Ok(())
}
+fn insert_const(
+ f... | 1 | 24 | 0 |
7c3cc90c895ebe7702d823db674584655ef7507a | Jamey Sharp | 2022-07-21T19:01:00 | wiggle's atoms_async test requires wasmtime_async (#4499) | diff --git a/crates/wiggle/Cargo.toml b/crates/wiggle/Cargo.toml
index c7e2d9056..bcb699c15 100644
--- a/crates/wiggle/Cargo.toml
+++ b/crates/wiggle/Cargo.toml
@@ -29,6 +29,11 @@ anyhow = "1"
proptest = "1.0.0"
tokio = { version = "1", features = ["rt-multi-thread","time", "macros"] }
+[[test]]
+name = "atoms_asyn... | 1 | 5 | 0 |
02477988dd12716f16ac045f296356c72942f431 | Jamey Sharp | 2022-07-21T18:25:23 | table_ops: allow 0-sized tables, locals, globals (#4495)
I noticed that `TableOp::insert` had assertions that `num_params` and
`table_size` were greater than 0, but no assert for `num_globals`. These
asserts couldn't be hit because the `*_RANGE` constants were all set to
a minimum of 1.
But the only reason I can... | diff --git a/crates/fuzzing/src/generators/table_ops.rs b/crates/fuzzing/src/generators/table_ops.rs
index 012eeade8..07f19e38c 100644
--- a/crates/fuzzing/src/generators/table_ops.rs
+++ b/crates/fuzzing/src/generators/table_ops.rs
@@ -11,29 +11,29 @@ use wasm_encoder::{
/// operations.
#[derive(Debug)]
pub struct ... | 1 | 63 | 79 |
4ce329d1ebdd5a8556f58535b4cbeb698b5c03c4 | Benjamin Bouvier | 2022-07-21T09:12:13 | Add a cranelift flag to enable/disable verbose logs for regalloc2 (#4481) | diff --git a/cranelift/codegen/meta/src/shared/settings.rs b/cranelift/codegen/meta/src/shared/settings.rs
index 286a98be4..121c8fe74 100644
--- a/cranelift/codegen/meta/src/shared/settings.rs
+++ b/cranelift/codegen/meta/src/shared/settings.rs
@@ -18,6 +18,18 @@ pub(crate) fn define() -> SettingGroup {
false,... | 4 | 15 | 1 |
9c72a0566eaa66e95053593e4f15f99d140e4664 | Chris Fallin | 2022-07-21T01:22:39 | Upgrade to regalloc2 0.3.1. (#4483)
This includes some changes from @bnjbvr to the trace-logging/annotation
to reduce overhead when logging is enabled but only non-RA2 subsystems
are at `Trace` level. | diff --git a/Cargo.lock b/Cargo.lock
index b3bac8237..46e9074f0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2363,9 +2363,9 @@ dependencies = [
[[package]]
name = "regalloc2"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd4159f16b35683a517cc031... | 2 | 3 | 3 |
a0a2fd1627162e1c680cf997cada0acb59ae3e37 | Afonso Bordado | 2022-07-21T00:33:49 | fuzzgen: Add scalar float support (#4467)
* fuzzgen: Add float support
Add support for generating floats and some float instructions.
* fuzzgen: Enable NaN Canonicalization
Both IEEE754 and the Wasm spec are somewhat loose about what is allowed
to be returned from NaN producing operations. And in practice th... | diff --git a/Cargo.lock b/Cargo.lock
index 2d1dab80c..b3bac8237 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -584,6 +584,7 @@ dependencies = [
"anyhow",
"arbitrary",
"cranelift",
+ "cranelift-native",
]
[[package]]
diff --git a/cranelift/fuzzgen/Cargo.toml b/cranelift/fuzzgen/Cargo.toml
index 139fed1b3..c461a1... | 4 | 135 | 45 |
06407dd337a501931076c3fa68d6503bd72532c6 | Trevor Elliott | 2022-07-21T00:01:33 | Add a test to prevent x64 Inst size slipping further (#4489)
* Add a test to prevent x64 Inst size slipping further
* Enable the test for 64-bit pointers only | diff --git a/cranelift/codegen/src/isa/x64/inst/mod.rs b/cranelift/codegen/src/isa/x64/inst/mod.rs
index a9d0a7914..f888bb9af 100644
--- a/cranelift/codegen/src/isa/x64/inst/mod.rs
+++ b/cranelift/codegen/src/isa/x64/inst/mod.rs
@@ -43,6 +43,14 @@ pub struct CallInfo {
pub opcode: Opcode,
}
+#[test]
+#[cfg(targ... | 1 | 8 | 0 |
2127c3a369d40529d3f7b558d2df1b5824a8a2f1 | Alex Crichton | 2022-07-20T21:39:59 | Fix CI for `main` (#4486)
* Skip new `table_ops` test under emulation
When emulating we already have to disable most pooling-allocator related
tests so this commit carries over that logic to the new fuzz test which
may run some configurations with the pooling allocator depending on the
random input.
* Fix pan... | diff --git a/cranelift/codegen/src/machinst/vcode.rs b/cranelift/codegen/src/machinst/vcode.rs
index f9ef6670f..aa73ae041 100644
--- a/cranelift/codegen/src/machinst/vcode.rs
+++ b/cranelift/codegen/src/machinst/vcode.rs
@@ -603,9 +603,14 @@ impl<I: VCodeInst> VCodeBuilder<I> {
// will be returned directly to ... | 2 | 11 | 0 |
2154c63de94e0372bca5a596c3eaf90147c922d1 | Alex Crichton | 2022-07-20T16:52:23 | Merge pull request from GHSA-5fhj-g3p3-pq9g
* Improve cranelift disassembly of stack maps
Print out extra information about stack maps such as their contents and
other related metadata available. Additionally also print out addresses
in hex to line up with the disassembly otherwise printed as well.
* Improve the `ta... | diff --git a/cranelift/codegen/src/machinst/vcode.rs b/cranelift/codegen/src/machinst/vcode.rs
index a29945383..f9ef6670f 100644
--- a/cranelift/codegen/src/machinst/vcode.rs
+++ b/cranelift/codegen/src/machinst/vcode.rs
@@ -598,6 +598,15 @@ impl<I: VCodeInst> VCodeBuilder<I> {
self.reverse_and_finalize();... | 4 | 143 | 26 |
6e099720af1a46601640a494998c57071dae0821 | Nick Fitzgerald | 2022-07-20T14:42:25 | wasmtime-runtime: Remove old libcalls that aren't used anymore (#4470)
These were for x86 (32-bit) where the ISA didn't have instructions for these
things, but now that we don't support that, and always have SSE2 for x86_64, we
never need or use these libcalls anymore. | diff --git a/crates/runtime/src/libcalls.rs b/crates/runtime/src/libcalls.rs
index 1a29a8195..51c6ba392 100644
--- a/crates/runtime/src/libcalls.rs
+++ b/crates/runtime/src/libcalls.rs
@@ -67,124 +67,6 @@ use wasmtime_environ::{
DataIndex, ElemIndex, FuncIndex, GlobalIndex, MemoryIndex, TableIndex, TrapCode,
};
... | 1 | 0 | 118 |
d55eb64b9ea3a75c90d7e34717d21947bb93b432 | Jeffrey Charles | 2022-07-19T19:12:07 | Enable generating debug symbols on AArch64 (#4468) | diff --git a/cranelift/codegen/src/isa/aarch64/mod.rs b/cranelift/codegen/src/isa/aarch64/mod.rs
index e4cfd78f9..8a425d309 100644
--- a/cranelift/codegen/src/isa/aarch64/mod.rs
+++ b/cranelift/codegen/src/isa/aarch64/mod.rs
@@ -3,9 +3,11 @@
use crate::ir::condcodes::IntCC;
use crate::ir::{Function, Type};
use crate... | 1 | 8 | 1 |
b18c9bee15bd983e538be215fb4cffd96b1e3fcc | Ulrich Weigand | 2022-07-19T18:59:30 | s390x: Small refactoring of ABI code (#4465)
Remove a bit of duplicated code and eliminate some
unnecessary allocations. | diff --git a/cranelift/codegen/src/isa/s390x/abi.rs b/cranelift/codegen/src/isa/s390x/abi.rs
index 52db56de4..2f5bda046 100644
--- a/cranelift/codegen/src/isa/s390x/abi.rs
+++ b/cranelift/codegen/src/isa/s390x/abi.rs
@@ -71,7 +71,7 @@ use crate::machinst::{RealReg, Reg, RegClass, Writable};
use crate::settings;
use c... | 1 | 41 | 56 |
f0337c9c7627c52c59df349e0663d9b6124c35e5 | Benjamin Bouvier | 2022-07-18T15:13:09 | Upgrade to the high-level `ittapi` v0.3.0 crate (#4003)
* Upgrade to the high-level ittapi v0.3.0 crate
* Add exclusion for windows mingw | diff --git a/Cargo.lock b/Cargo.lock
index 367d13e9a..2d1dab80c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1485,10 +1485,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
[[package]]
-name = "ittapi-rs"
-version = "... | 4 | 47 | 72 |
3032e3fcfbb818dd567f85561fce7813f5979747 | Alex Crichton | 2022-07-18T14:21:40 | Track type information during component translation (#4448)
This commit augments the current translation phase of components with
extra machinery to track the type information of component items such as
instances, components, and functions. The end goal of this commit is to
enable the `Lower` instruction to know th... | diff --git a/crates/environ/src/component/translate.rs b/crates/environ/src/component/translate.rs
index 51459d70b..f0542e1ec 100644
--- a/crates/environ/src/component/translate.rs
+++ b/crates/environ/src/component/translate.rs
@@ -3,6 +3,7 @@ use crate::{
EntityIndex, ModuleEnvironment, ModuleTranslation, Primar... | 2 | 187 | 19 |
439f566f3f73d991644b446503b5407684187ee0 | Nick Fitzgerald | 2022-07-15T21:10:27 | Split `global_asm!` helper macros out from `wasmtime-fibers` (#4454)
This moves them into a new `wasmtime-asm-macros` crate that can be used not just
from the `wasmtime-fibers` crate but also from other crates (e.g. we will need
them in https://github.com/bytecodealliance/wasmtime/pull/4431). | diff --git a/Cargo.lock b/Cargo.lock
index cf4e6122a..367d13e9a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3339,6 +3339,13 @@ dependencies = [
"windows-sys",
]
+[[package]]
+name = "wasmtime-asm-macros"
+version = "0.40.0"
+dependencies = [
+ "cfg-if",
+]
+
[[package]]
name = "wasmtime-bench-api"
version = "0... | 10 | 97 | 57 |
33312c5380be71195b0666808d43461946fcb522 | Alex Crichton | 2022-07-15T20:14:53 | Fix a possible panic with null-containing element segments (#4455)
This commit fixes an issue with the initialization of element segments
when one of the elements in the element segment is `ref.func null`.
Previously the contents of a table were accidentally initialized with
the raw value of the `*mut VMCallerCheck... | diff --git a/crates/runtime/src/table.rs b/crates/runtime/src/table.rs
index b71d21ffc..ca13a846b 100644
--- a/crates/runtime/src/table.rs
+++ b/crates/runtime/src/table.rs
@@ -280,7 +280,9 @@ impl Table {
};
for (item, slot) in items.zip(elements) {
- *slot = item as usize;
+ ... | 2 | 28 | 1 |
fc72b7ccd3562f6e9b2b8c401174dc7b036525c2 | Afonso Bordado | 2022-07-14T20:07:58 | cranelift: Correctly recover from parsing unknown values (#4447)
When parsing isa specific values we were accidentally discarding the
value of the flag, and treating it always as a boolean flag.
This would cause a `clif-util` invocation such as
`cargo run -- compile -D --set has_sse41=false --target x86_64 test.c... | diff --git a/cranelift/reader/src/isaspec.rs b/cranelift/reader/src/isaspec.rs
index be05f3511..6c1058c59 100644
--- a/cranelift/reader/src/isaspec.rs
+++ b/cranelift/reader/src/isaspec.rs
@@ -46,6 +46,16 @@ pub enum ParseOptionError {
/// Name of the unknown flag.
name: String,
},
+
+ /// An ... | 2 | 23 | 1 |
f7767eb3526fb6e7d7e42c77c11a21f70fb84720 | Nick Fitzgerald | 2022-07-13T20:43:12 | clif-util: always use `pretty-env-logger` (#4443)
Rather than sometimes using `file-per-thread-logger`.
Also remove the debug CLI flags, so that we can always just define
`RUST_LOG=...` to get logging and don't need to also do other things. | diff --git a/Cargo.lock b/Cargo.lock
index 7b1471bbe..cf4e6122a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -706,7 +706,6 @@ dependencies = [
"cranelift-preopt",
"cranelift-reader",
"cranelift-wasm",
- "file-per-thread-logger",
"filecheck",
"indicatif",
"log",
diff --git a/cranelift/Cargo.toml b/cranelift/C... | 9 | 2 | 54 |
03ece34cbbf429dcc67184351a1c12648254f573 | Afonso Bordado | 2022-07-13T18:47:54 | fuzzgen: Generate stack load/store instructions (#4438)
* fuzzgen: Generate static stack slots
* fuzzgen: Generate stack manipulation instructions | diff --git a/cranelift/fuzzgen/src/config.rs b/cranelift/fuzzgen/src/config.rs
index 458a6fd33..2217ced1a 100644
--- a/cranelift/fuzzgen/src/config.rs
+++ b/cranelift/fuzzgen/src/config.rs
@@ -18,6 +18,12 @@ pub struct Config {
pub block_signature_params: RangeInclusive<usize>,
pub jump_tables_per_function: R... | 2 | 119 | 3 |
08a60a0f082a68149218f4c82da04b39fac59611 | Alex Crichton | 2022-07-13T16:02:06 | Fix fuel configuration in fuzzers (#4440)
Previously fuel configuration in our fuzzers ran afoul of #4439 so this
commit fixes how fuel is managed to avoid that issue. | diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs
index 443b33984..c4b6edbd7 100644
--- a/crates/fuzzing/src/oracles.rs
+++ b/crates/fuzzing/src/oracles.rs
@@ -124,13 +124,8 @@ pub fn instantiate(wasm: &[u8], known_valid: bool, config: &generators::Config,
let mut timeout_state = SignalO... | 1 | 16 | 13 |
18d9685eb3bb3cd6e642a28412d69e5939ee7732 | Alex Crichton | 2022-07-13T15:51:07 | Fix pretty print of `atomic_rmw` clif ops (#4441)
A comma was accidentally placed after the operation itself when no comma
is necessary (only after operands, not the operation itself). | diff --git a/cranelift/codegen/src/write.rs b/cranelift/codegen/src/write.rs
index 51b2235db..d0b6ad813 100644
--- a/cranelift/codegen/src/write.rs
+++ b/cranelift/codegen/src/write.rs
@@ -380,7 +380,7 @@ pub fn write_operands(w: &mut dyn Write, dfg: &DataFlowGraph, inst: Inst) -> fmt
let pool = &dfg.value_lists;
... | 1 | 1 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.