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 |
|---|---|---|---|---|---|---|---|
c1919259dcb321e6ad320364be9e6c5674ebdcb5 | Pat Hickey | 2020-12-19T00:13:29 | implement fd_readdir | diff --git a/crates/wasi-c2/src/dir.rs b/crates/wasi-c2/src/dir.rs
index 007dc5919..30902ae61 100644
--- a/crates/wasi-c2/src/dir.rs
+++ b/crates/wasi-c2/src/dir.rs
@@ -177,10 +177,11 @@ impl TableDirExt for crate::table::Table {
pub struct ReaddirEntity {
pub next: ReaddirCursor,
pub inode: u64,
- pub na... | 2 | 78 | 7 |
af0aa14ee8ffe9a2a5c7215b30530d97ae76d6ca | Pat Hickey | 2020-12-19T00:12:50 | get a FileStat of a Dir
and fill out some remaining DirCaps from Rights | diff --git a/crates/wasi-c2/src/dir.rs b/crates/wasi-c2/src/dir.rs
index 6f6d36114..007dc5919 100644
--- a/crates/wasi-c2/src/dir.rs
+++ b/crates/wasi-c2/src/dir.rs
@@ -1,5 +1,6 @@
use crate::error::Error;
-use crate::file::{FileCaps, FileType, OFlags, WasiFile};
+use crate::file::{FileCaps, FileType, Filestat, OFlags... | 2 | 94 | 27 |
8cc1ab7720f138bc33c7e2df4840193687464838 | Pat Hickey | 2020-12-18T20:30:40 | fixup filetype nonsense
tried to go my own way here, bad idea, stick to the design of wasi buddy | diff --git a/crates/wasi-c2/src/dir.rs b/crates/wasi-c2/src/dir.rs
index e6f7596c8..6f6d36114 100644
--- a/crates/wasi-c2/src/dir.rs
+++ b/crates/wasi-c2/src/dir.rs
@@ -1,7 +1,5 @@
-// this file is extremely wip
-#![allow(dead_code, unused_variables)]
use crate::error::Error;
-use crate::file::{FileCaps, OFlags, WasiF... | 5 | 72 | 71 |
82edae32b7e241f6692c356b52b50e736c039d18 | Pat Hickey | 2020-12-18T19:33:28 | readlink | diff --git a/crates/wasi-c2/src/dir.rs b/crates/wasi-c2/src/dir.rs
index e57a8aa4b..e6f7596c8 100644
--- a/crates/wasi-c2/src/dir.rs
+++ b/crates/wasi-c2/src/dir.rs
@@ -22,6 +22,7 @@ pub trait WasiDir {
fn symlink(&self, old_path: &str, new_path: &str) -> Result<(), Error>;
fn remove_dir(&self, path: &str) ->... | 2 | 24 | 1 |
f6afd4c41c5d48107d65317202590f3a61e144cc | Pat Hickey | 2020-12-18T02:12:29 | test-programs: sandbox escape is an EPERM now, not an ENOTCAPABLE | diff --git a/crates/test-programs/wasi-tests/src/bin/interesting_paths.rs b/crates/test-programs/wasi-tests/src/bin/interesting_paths.rs
index e05777828..4f8d9ce6c 100644
--- a/crates/test-programs/wasi-tests/src/bin/interesting_paths.rs
+++ b/crates/test-programs/wasi-tests/src/bin/interesting_paths.rs
@@ -17,8 +17,8 ... | 1 | 4 | 4 |
d8720cffe86c73f75364246356162c451a42655b | Pat Hickey | 2020-12-18T02:12:15 | unexpected io error: do our best based on e.kind() | diff --git a/crates/wasi-c2/src/error.rs b/crates/wasi-c2/src/error.rs
index 47920ce6b..cd896da1b 100644
--- a/crates/wasi-c2/src/error.rs
+++ b/crates/wasi-c2/src/error.rs
@@ -34,9 +34,6 @@ pub enum Error {
#[error("Unexpected IoError: {0}")]
UnexpectedIo(#[source] std::io::Error),
- #[error("Unsupporte... | 2 | 22 | 5 |
f9ff97aac154451658fe29844b3aa48253737076 | Pat Hickey | 2020-12-18T01:30:04 | virt pipes: return concrete errors, best effort at flags and filestat | diff --git a/crates/wasi-c2/src/virt/pipe.rs b/crates/wasi-c2/src/virt/pipe.rs
index 2ae7edaed..d8b1b4f8d 100644
--- a/crates/wasi-c2/src/virt/pipe.rs
+++ b/crates/wasi-c2/src/virt/pipe.rs
@@ -97,10 +97,10 @@ impl From<&str> for ReadPipe<io::Cursor<String>> {
impl<R: Read> FileIoExt for ReadPipe<R> {
fn advise(... | 1 | 61 | 43 |
4c3c9a9ecb9ad9c2690ace132c7643f4bae32461 | Pat Hickey | 2020-12-18T01:29:35 | Filestat: make times optional, default to 0 at wasi interface
this is DRY | diff --git a/crates/wasi-c2/src/file.rs b/crates/wasi-c2/src/file.rs
index 8c7a51e9d..38caf8d5d 100644
--- a/crates/wasi-c2/src/file.rs
+++ b/crates/wasi-c2/src/file.rs
@@ -92,9 +92,9 @@ pub struct Filestat {
pub filetype: Filetype,
pub nlink: u64,
pub size: u64,
- pub atim: std::time::SystemTime,
- ... | 2 | 12 | 25 |
8ac688287e2aa2dab53a820dd7aaa43bfdbe9d5f | Pat Hickey | 2020-12-18T01:29:00 | fixup dir/file caps into rights | diff --git a/crates/wasi-c2/src/snapshots/preview_1.rs b/crates/wasi-c2/src/snapshots/preview_1.rs
index f72e46633..87ffe7b60 100644
--- a/crates/wasi-c2/src/snapshots/preview_1.rs
+++ b/crates/wasi-c2/src/snapshots/preview_1.rs
@@ -593,8 +593,8 @@ impl<'a> wasi_snapshot_preview1::WasiSnapshotPreview1 for WasiCtx {
... | 1 | 6 | 4 |
fb78025e4148e7f768b0639e89cb27a32a6cb2c7 | Pat Hickey | 2020-12-17T22:48:40 | upgrade all wasmparser to 0.71
new simd instructions are left as ubsupported in cranelift-wasm | diff --git a/Cargo.lock b/Cargo.lock
index 630be83fc..0d202185e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -591,7 +591,7 @@ dependencies = [
"smallvec",
"target-lexicon",
"thiserror",
- "wasmparser 0.70.0",
+ "wasmparser",
"wat",
]
@@ -1149,7 +1149,7 @@ dependencies = [
"smallvec",
"thiserror",
"typem... | 11 | 33 | 26 |
02260b7cd09f6f4222855cfe3bd2e7ff2f970613 | David Haynes | 2020-12-17T21:47:18 | 2499: First pass on TableOps fuzzer generator wasm_encoder migration (#2501)
* 2499: First pass on TableOps fuzzer generator wasm_encoder migration
- wasm binary generated via sections and smushed together into a module
- test: compare generated wat against expected wat
- note: doesn't work
- Grouped instructi... | diff --git a/Cargo.lock b/Cargo.lock
index 4e200c31d..746672181 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2609,6 +2609,7 @@ dependencies = [
"env_logger 0.8.1",
"log",
"rayon",
+ "wasm-encoder",
"wasm-smith",
"wasmi",
"wasmparser 0.70.0",
diff --git a/crates/fuzzing/Cargo.toml b/crates/fuzzing/Cargo.toml... | 4 | 90 | 60 |
0833a92ddd0bf560afe76accd25c2acaa6617513 | Chris Fallin | 2020-12-17T20:14:53 | cranelift-native crate: add API variant allowing backend selection. | diff --git a/cranelift/native/src/lib.rs b/cranelift/native/src/lib.rs
index 668a1934b..3bd5716da 100644
--- a/cranelift/native/src/lib.rs
+++ b/cranelift/native/src/lib.rs
@@ -34,10 +34,26 @@ use raw_cpuid::CpuId;
/// machine, or `Err(())` if the host machine is not supported
/// in the current configuration.
pub f... | 1 | 20 | 4 |
4f5afe92dc80903c309153159a75292b6d575d75 | Pat Hickey | 2020-12-17T18:58:02 | wasmtime-debug: tune down features required from object
in order to eliminate a dep on an old wasmparser | diff --git a/Cargo.lock b/Cargo.lock
index b2e09c88e..630be83fc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1316,7 +1316,6 @@ checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397"
dependencies = [
"crc32fast",
"indexmap",
- "wasmparser 0.57.0",
]
[[package]]
@@ -2371,12 +2370,6 @@ depe... | 2 | 1 | 8 |
fe1ff02a80ba945d8bc7de1946253eb4840e09b3 | Pat Hickey | 2020-12-17T18:57:47 | cargo update | diff --git a/Cargo.lock b/Cargo.lock
index 4e200c31d..b2e09c88e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -17,9 +17,9 @@ checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e"
[[package]]
name = "ahash"
-version = "0.4.6"
+version = "0.4.7"
source = "registry+https://github.com/rust-lang/c... | 1 | 111 | 123 |
76fb9a08c7d4349e039891ac4542fc3ac3ea60a6 | Chris Fallin | 2020-12-17T02:50:05 | cranelift-object: reject symbol names with NUL byte without panic'ing.
Avoid a `panic!()`, and return a proper error, on a NUL byte. We hit a
null-byte check inside the `object` crate otherwise; this blocks fuzzing
when testing via a write-object-file-and-dlopen flow. | diff --git a/cranelift/object/src/backend.rs b/cranelift/object/src/backend.rs
index 81dd75c4c..98ab139a2 100644
--- a/cranelift/object/src/backend.rs
+++ b/cranelift/object/src/backend.rs
@@ -145,6 +145,18 @@ impl ObjectModule {
}
}
+fn validate_symbol(name: &str) -> ModuleResult<()> {
+ // null bytes are n... | 2 | 59 | 0 |
df0218c0864fe83d077c424b9da2fcbf1ff88c2a | Pat Hickey | 2020-12-17T01:54:17 | make get_filestat work
up to 16 tests passing! | diff --git a/crates/wasi-c2/src/file.rs b/crates/wasi-c2/src/file.rs
index c7530d3d9..8c7a51e9d 100644
--- a/crates/wasi-c2/src/file.rs
+++ b/crates/wasi-c2/src/file.rs
@@ -87,14 +87,14 @@ impl std::ops::BitOr for OFlags {
#[derive(Debug, Clone)]
pub struct Filestat {
- device_id: u64,
- inode: u64,
- file... | 2 | 44 | 13 |
23b5689a5f957cff8dd7cc82269457b3d2a1af74 | Pat Hickey | 2020-12-17T01:19:27 | fix file rights | diff --git a/crates/wasi-c2/src/ctx.rs b/crates/wasi-c2/src/ctx.rs
index a8b610849..7b0a366ae 100644
--- a/crates/wasi-c2/src/ctx.rs
+++ b/crates/wasi-c2/src/ctx.rs
@@ -101,7 +101,7 @@ impl WasiCtxBuilder {
path: impl AsRef<Path>,
) -> Result<&mut Self, Error> {
let caps = DirCaps::all();
- ... | 2 | 10 | 7 |
f705a72aebd5c9100e3515c789ff87011923e7a1 | Johnnie Birch | 2020-12-04T21:28:25 | Refactor packed moves to use xmm_mov instead of xmm_rm_r
Refactors previous packed move implementation to use xmm_mov
instead of xmm_rm_r which looks to simplify register accounting
during lowering. | diff --git a/cranelift/codegen/src/isa/x64/inst/emit.rs b/cranelift/codegen/src/isa/x64/inst/emit.rs
index bf1551366..b655178bd 100644
--- a/cranelift/codegen/src/isa/x64/inst/emit.rs
+++ b/cranelift/codegen/src/isa/x64/inst/emit.rs
@@ -1873,18 +1873,6 @@ pub(crate) fn emit(
SseOpcode::Pcmpgtw => (Lega... | 3 | 34 | 50 |
51973aefbb4cb9fd70b8038886919f4771cfa60e | Johnnie Birch | 2020-12-03T16:32:48 | Implements x64 SIMD loads for the new backend. | diff --git a/cranelift/codegen/src/isa/x64/inst/emit.rs b/cranelift/codegen/src/isa/x64/inst/emit.rs
index 401b8aad0..bf1551366 100644
--- a/cranelift/codegen/src/isa/x64/inst/emit.rs
+++ b/cranelift/codegen/src/isa/x64/inst/emit.rs
@@ -1764,6 +1764,18 @@ pub(crate) fn emit(
SseOpcode::Pabsb => (Legacy... | 2 | 81 | 8 |
8777194f0d8186051ddfa043d62ad7a4cff455e6 | Pat Hickey | 2020-12-16T23:57:08 | always open files read if not write
and if creating a file, open it write. | diff --git a/crates/wasi-c2/src/dir.rs b/crates/wasi-c2/src/dir.rs
index 052d0056e..e57a8aa4b 100644
--- a/crates/wasi-c2/src/dir.rs
+++ b/crates/wasi-c2/src/dir.rs
@@ -210,8 +210,10 @@ impl WasiDir for cap_std::fs::Dir {
if oflags.contains(&(OFlags::CREATE | OFlags::EXCLUSIVE)) {
opts.create_ne... | 1 | 9 | 0 |
af8bdf8933e7a15a4dd9c64c6a1a1e07c5487759 | Pat Hickey | 2020-12-16T23:55:30 | table: borrow entry immutably or mutably | diff --git a/crates/wasi-c2/src/dir.rs b/crates/wasi-c2/src/dir.rs
index 1d5e8d36d..052d0056e 100644
--- a/crates/wasi-c2/src/dir.rs
+++ b/crates/wasi-c2/src/dir.rs
@@ -13,18 +13,14 @@ pub trait WasiDir {
oflags: OFlags,
caps: FileCaps,
) -> Result<Box<dyn WasiFile>, Error>;
-
fn open_dir(&s... | 3 | 65 | 45 |
dbe0f4f28481aa84ae6010e442c3803704335630 | Pat Hickey | 2020-12-16T23:54:46 | Revert "dangling_fd test: open with either READ or CREAT|WRITE"
fix for behavior in wasi-c2 coming in next commit
This reverts commit 789eec382768d49c994a0d9c65a3e66d3bb2bac8. | diff --git a/crates/test-programs/wasi-tests/src/bin/dangling_fd.rs b/crates/test-programs/wasi-tests/src/bin/dangling_fd.rs
index b2ee63c4e..e63ecbc8d 100644
--- a/crates/test-programs/wasi-tests/src/bin/dangling_fd.rs
+++ b/crates/test-programs/wasi-tests/src/bin/dangling_fd.rs
@@ -5,35 +5,16 @@ use wasi_tests::open_... | 1 | 3 | 22 |
789eec382768d49c994a0d9c65a3e66d3bb2bac8 | Pat Hickey | 2020-12-16T23:16:14 | dangling_fd test: open with either READ or CREAT|WRITE
neither READ nor WRITE is an error | diff --git a/crates/test-programs/wasi-tests/src/bin/dangling_fd.rs b/crates/test-programs/wasi-tests/src/bin/dangling_fd.rs
index e63ecbc8d..b2ee63c4e 100644
--- a/crates/test-programs/wasi-tests/src/bin/dangling_fd.rs
+++ b/crates/test-programs/wasi-tests/src/bin/dangling_fd.rs
@@ -5,16 +5,35 @@ use wasi_tests::open_... | 1 | 22 | 3 |
27ddbda829795daa22057608304a66c99f2b8dfd | Pat Hickey | 2020-12-16T23:15:48 | preopens with Caps::all, implement create, remove dir, remove file | diff --git a/crates/wasi-c2/src/ctx.rs b/crates/wasi-c2/src/ctx.rs
index 7295382df..a8b610849 100644
--- a/crates/wasi-c2/src/ctx.rs
+++ b/crates/wasi-c2/src/ctx.rs
@@ -100,7 +100,7 @@ impl WasiCtxBuilder {
dir: Box<dyn WasiDir>,
path: impl AsRef<Path>,
) -> Result<&mut Self, Error> {
- le... | 5 | 80 | 20 |
e91987c43ccd080596a932a1147b702854f5655b | Chris Fallin | 2020-12-16T15:56:04 | Allow both x86 backends to be included, selected with a "variant" flag. (#2514)
This PR adds a new `isa::lookup_variant()` that takes a `BackendVariant`
(`Legacy`, `MachInst` or `Any`), and exposes both x86 backends as
separate variants if both are compiled into the build.
This will allow some new use-cases that ... | diff --git a/cranelift/codegen/src/isa/mod.rs b/cranelift/codegen/src/isa/mod.rs
index 1ce10a155..900dfd9dd 100644
--- a/cranelift/codegen/src/isa/mod.rs
+++ b/cranelift/codegen/src/isa/mod.rs
@@ -75,10 +75,13 @@ use thiserror::Error;
#[cfg(feature = "riscv")]
mod riscv;
-// Exclude the old x86 backend when the new... | 4 | 65 | 30 |
22ad43b43068f9944a042b2cfd6505f23d1b15b0 | Sakarias Johansson | 2020-12-16T13:30:08 | Add filestat_get for stdout, stdin and stderr
This makes fstat work for stdout, stdin and stderr as expected.
This seemed like the only reasonable functions to implement from the
filestat_* set, for stdout, stdin and stderr.
Fixes #2515 | diff --git a/crates/wasi-common/src/sys/stdio.rs b/crates/wasi-common/src/sys/stdio.rs
index 97005767d..9ac6d6c9c 100644
--- a/crates/wasi-common/src/sys/stdio.rs
+++ b/crates/wasi-common/src/sys/stdio.rs
@@ -17,7 +17,7 @@
// TODO it might worth re-investigating the suitability of this type on Windows.
use super::{... | 1 | 10 | 1 |
c0461ca170e331242cb61a64b9d50aaf71d54097 | Pat Hickey | 2020-12-16T02:09:36 | redesign how caps fit into entries! | diff --git a/crates/wasi-c2/src/ctx.rs b/crates/wasi-c2/src/ctx.rs
index e7156f12a..7295382df 100644
--- a/crates/wasi-c2/src/ctx.rs
+++ b/crates/wasi-c2/src/ctx.rs
@@ -26,36 +26,23 @@ impl WasiCtx {
}
}
- pub fn insert_file(
- &self,
- fd: u32,
- file: Box<dyn WasiFile>,
- ... | 5 | 134 | 97 |
b5852bf5ff8215c3566dfa35796d61e06c67ff0e | Pat Hickey | 2020-12-16T00:44:03 | open_dir can never create a dir | diff --git a/crates/wasi-c2/src/dir.rs b/crates/wasi-c2/src/dir.rs
index 8736f09fb..9a3b9e640 100644
--- a/crates/wasi-c2/src/dir.rs
+++ b/crates/wasi-c2/src/dir.rs
@@ -15,12 +15,7 @@ pub trait WasiDir {
caps: FileCaps,
) -> Result<Box<dyn WasiFile>, Error>;
- fn open_dir(
- &self,
- sy... | 3 | 26 | 24 |
cc81570a05a766a0c2fff6557ef36220268aab4e | Nick Fitzgerald | 2020-12-15T19:19:30 | bench-api: Clean up the benchmarking API
Mostly just tweaks to docs/naming/readability/tidying up.
The biggest thing is that the wasm bytes are passed in during compilation now,
rather than on initialization, which lets us remove the lifetime from our state
struct and makes wrangling unsafe conversions that much easi... | diff --git a/crates/bench-api/src/lib.rs b/crates/bench-api/src/lib.rs
index a12268e6d..a2958f09a 100644
--- a/crates/bench-api/src/lib.rs
+++ b/crates/bench-api/src/lib.rs
@@ -1,145 +1,189 @@
-//! Expose a C-compatible API for controlling the Wasmtime engine during benchmarking. The API expects very sequential
-//! us... | 1 | 173 | 123 |
fe10cc9d521b13a773755be8dc64fcb05a31f181 | Ulrich Weigand | 2020-12-15T14:44:43 | Fix jitdump header magic field on big-endian platforms (#2511)
The jitdump header contains a "magic" field that is defined to hold
the value 0x4A695444 as u32 in native endianness. (This allows
consumers of the file to detect the endianness of the platform
where the file was written, and apply it when reading othe... | diff --git a/crates/profiling/src/jitdump_linux.rs b/crates/profiling/src/jitdump_linux.rs
index e16978843..ef6684c95 100644
--- a/crates/profiling/src/jitdump_linux.rs
+++ b/crates/profiling/src/jitdump_linux.rs
@@ -249,11 +249,7 @@ impl State {
let header = FileHeader {
timestamp: self.get_time_... | 1 | 1 | 5 |
fc4eeae8961c56d2307e4f9ed895f06d3ff43887 | whitequark | 2020-12-12T06:38:55 | Alias `yanix::file::OFlags::RSYNC` to `SYNC` on Android.
Android defines O_RSYNC to be the same as O_SYNC:
https://github.com/aosp-mirror/platform_bionic/blob/35bb46188ce8dbbb8bde0702e6cc6bf1d0795980/libc/include/fcntl.h#L57 | diff --git a/crates/wasi-common/yanix/src/file.rs b/crates/wasi-common/yanix/src/file.rs
index 1764d2912..62af1c9d7 100644
--- a/crates/wasi-common/yanix/src/file.rs
+++ b/crates/wasi-common/yanix/src/file.rs
@@ -90,11 +90,26 @@ bitflags! {
const WRONLY = libc::O_WRONLY;
const RDWR = libc::O_RDWR;
... | 1 | 16 | 1 |
1ec1834d6e2e0ed5e527e2a3b52a1634abeedf11 | whitequark | 2020-12-12T06:36:09 | Treat Android like Linux in `wasi_common::sys::unix`.
Just like it happens in `yanix::sys`. | diff --git a/crates/wasi-common/src/sys/unix/mod.rs b/crates/wasi-common/src/sys/unix/mod.rs
index 7135486ec..84d8ec581 100644
--- a/crates/wasi-common/src/sys/unix/mod.rs
+++ b/crates/wasi-common/src/sys/unix/mod.rs
@@ -9,7 +9,8 @@ pub(crate) mod poll;
pub(crate) mod stdio;
cfg_if::cfg_if! {
- if #[cfg(target_o... | 1 | 2 | 1 |
476ee59774d27a19ea6ac653615acc2c89aa3a38 | whitequark | 2020-12-12T06:08:22 | Define local `seekdir` and `telldir` prototypes on Android.
These functions are not yet defined in the `libc` crate.
See https://github.com/rust-lang/libc/pull/1996. | diff --git a/crates/wasi-common/yanix/src/dir.rs b/crates/wasi-common/yanix/src/dir.rs
index 50166a35b..8e6c70a40 100644
--- a/crates/wasi-common/yanix/src/dir.rs
+++ b/crates/wasi-common/yanix/src/dir.rs
@@ -36,9 +36,15 @@ impl Dir {
}
/// Set the position of the directory stream, see `seekdir(3)`.
- #[... | 1 | 16 | 6 |
919600d10bb4e0d049e32ce88cd6aa3ab6628a4d | whitequark | 2020-12-12T05:57:25 | Stub out the utimesat emulation logic on Android.
Android always has `utimensat` available, so it is not necessary (or
possible, for that matter) to emulate it. Mark the fallback path as
`unreachable!()`. | diff --git a/crates/wasi-common/yanix/src/sys/linux/filetime.rs b/crates/wasi-common/yanix/src/sys/linux/filetime.rs
index 3c4cdfa9f..34faefc6d 100644
--- a/crates/wasi-common/yanix/src/sys/linux/filetime.rs
+++ b/crates/wasi-common/yanix/src/sys/linux/filetime.rs
@@ -53,5 +53,8 @@ pub fn utimensat(
return Err... | 2 | 5 | 1 |
04805fcc5f3428c53ce6346b2f89025e52e7d9e2 | Pat Hickey | 2020-12-15T03:46:09 | pass a test, dubiously | diff --git a/crates/test-programs/build.rs b/crates/test-programs/build.rs
index ff23b6f83..c953c5744 100644
--- a/crates/test-programs/build.rs
+++ b/crates/test-programs/build.rs
@@ -105,14 +105,7 @@ mod wasi_tests {
)?;
writeln!(out, " use super::{{runtime, utils, setup_log}};")?;
for d... | 9 | 398 | 132 |
c16e731455ca6244281b06bb6ae17c725040505d | Pat Hickey | 2020-12-15T01:15:03 | get rid of linker Rc cycle, and add debug info to test programs | diff --git a/crates/test-programs/build.rs b/crates/test-programs/build.rs
index d185be4ed..ff23b6f83 100644
--- a/crates/test-programs/build.rs
+++ b/crates/test-programs/build.rs
@@ -44,6 +44,7 @@ mod wasi_tests {
fn build_tests(testsuite: &str, out_dir: &Path) -> io::Result<()> {
let mut cmd = Comman... | 2 | 7 | 7 |
2d7c2fba5f832ffd0832b8c16b8b5d11db6d0ac7 | Alex Crichton | 2020-12-14T19:39:38 | Update wasm-smith (#2509)
Brings in a few bug fixes for generating module-linking modules | diff --git a/Cargo.lock b/Cargo.lock
index 64237674e..1de98625b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2365,9 +2365,9 @@ dependencies = [
[[package]]
name = "wasm-smith"
-version = "0.2.0"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cdd382e46cf44347f4d0c29... | 4 | 5 | 5 |
467a1af83ab633efb7af88f9e437397a280200f7 | Ulrich Weigand | 2020-12-09T15:23:10 | Support explicit endianness in Cranelift IR MemFlags
WebAssembly memory operations are by definition little-endian even on
big-endian target platforms. However, other memory accesses will require
native target endianness (e.g. to access parts of the VMContext that is
also accessed by VM native code). This means on b... | diff --git a/cranelift/codegen/src/ir/memflags.rs b/cranelift/codegen/src/ir/memflags.rs
index 87fd6bf3a..3c9c8c98b 100644
--- a/cranelift/codegen/src/ir/memflags.rs
+++ b/cranelift/codegen/src/ir/memflags.rs
@@ -6,15 +6,31 @@ enum FlagBit {
Notrap,
Aligned,
Readonly,
+ LittleEndian,
+ BigEndian,
... | 5 | 83 | 12 |
42adeba65dd064243c9f7b0c4d4e4858e29f1e47 | Alex Crichton | 2020-12-14T16:03:45 | Fix fuzzer expectation about valid modules
Recent changes to fuzzers made expectations more strict about handling
errors while fuzzing, but this erroneously changed a module compilation
step to always assume that the input wasm is valid. Instead a flag is
now passed through indicating whether the wasm blob is known va... | diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs
index 91e676c58..2d11255f5 100644
--- a/crates/fuzzing/src/oracles.rs
+++ b/crates/fuzzing/src/oracles.rs
@@ -57,8 +57,13 @@ fn log_wat(wat: &str) {
/// Performs initial validation, and returns early if the Wasm is invalid.
///
/// You can co... | 6 | 25 | 10 |
c83dee07b73f8c23e7054d27e86f7172e6fb3569 | Alex Crichton | 2020-12-14T15:57:47 | Fix a memory reservation bug in `reserve_modules`
This method attempted to reserve space in the `results` list of final
modules. Unfortunately `results.reserve(nmodules)` isn't enough here
because this can be called many times before a module is actually
finished and pushed onto the vector. The attempted logic to work... | diff --git a/crates/environ/src/module_environ.rs b/crates/environ/src/module_environ.rs
index 6d36b4e7a..7b2cca611 100644
--- a/crates/environ/src/module_environ.rs
+++ b/crates/environ/src/module_environ.rs
@@ -31,6 +31,10 @@ pub struct ModuleEnvironment<'data> {
/// the module linking proposal.
results: Ve... | 1 | 8 | 2 |
1b8f9fd377c42d31a2cad05a013187379be255bf | Pat Hickey | 2020-12-12T02:22:13 | use virtual stdio
which works except for the lifetime issues, i think the trap still holds
an Rc to the store? | diff --git a/crates/test-programs/tests/wasm_tests/runtime.rs b/crates/test-programs/tests/wasm_tests/runtime.rs
index e5234dd64..acf30476d 100644
--- a/crates/test-programs/tests/wasm_tests/runtime.rs
+++ b/crates/test-programs/tests/wasm_tests/runtime.rs
@@ -2,49 +2,71 @@ use anyhow::Context;
use std::convert::TryFr... | 2 | 82 | 43 |
0572b40f58ad8c1222e24991a53579181783be92 | Pat Hickey | 2020-12-12T01:54:32 | port read and write pipes in | diff --git a/crates/wasi-c2/src/lib.rs b/crates/wasi-c2/src/lib.rs
index 82aa0e263..eb581d06d 100644
--- a/crates/wasi-c2/src/lib.rs
+++ b/crates/wasi-c2/src/lib.rs
@@ -8,6 +8,7 @@ pub mod snapshots;
pub mod stdio;
mod string_array;
pub mod table;
+pub mod virt;
pub use ctx::WasiCtx;
pub use dir::{DirCaps, WasiD... | 3 | 351 | 0 |
759455192bf58838c3956e4c5a622236506ff3ba | Pat Hickey | 2020-12-12T00:38:55 | test-programs: learn how to preopen a dir again | diff --git a/Cargo.lock b/Cargo.lock
index f0026c5a3..8ba859643 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -207,12 +207,12 @@ checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
[[package]]
name = "cap-fs-ext"
-version = "0.7.0"
+version = "0.8.0"
source = "registry+https://github.com/ru... | 4 | 51 | 42 |
30d49d122cf70f1b6eca4bd4098bd9e3c169c7f0 | Pat Hickey | 2020-12-12T00:38:44 | add preopened_dir to builder | diff --git a/crates/wasi-c2/Cargo.toml b/crates/wasi-c2/Cargo.toml
index c2c59f7e7..45ddc7060 100644
--- a/crates/wasi-c2/Cargo.toml
+++ b/crates/wasi-c2/Cargo.toml
@@ -26,8 +26,8 @@ getrandom = { version = "0.2.0", features = ["std"] }
wiggle = { path = "../wiggle", default-features = false, version = "0.21.0" }
tra... | 2 | 18 | 3 |
dfcdbfd0fe63d6641f7f9ea92368213f07d9bd15 | Pat Hickey | 2020-12-11T23:50:35 | test-programs: no longer test virtfs separately
wasi-c2 does not have a virtfs yet, and when it does we'll design a
better test harness
also fix prestat get: i was reporting the wrong error | diff --git a/crates/test-programs/build.rs b/crates/test-programs/build.rs
index 93f60ae64..8260a77ae 100644
--- a/crates/test-programs/build.rs
+++ b/crates/test-programs/build.rs
@@ -16,14 +16,6 @@ mod wasi_tests {
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
- #[derive(Clone, Co... | 3 | 8 | 99 |
61f97a3e925c61a325a31227e94260bed6e55bdd | Pat Hickey | 2020-12-11T23:37:04 | trap on wasi_proc_exit | diff --git a/crates/wasi-c2/wasmtime/src/lib.rs b/crates/wasi-c2/wasmtime/src/lib.rs
index f7eb355d9..762e848d2 100644
--- a/crates/wasi-c2/wasmtime/src/lib.rs
+++ b/crates/wasi-c2/wasmtime/src/lib.rs
@@ -1,4 +1,5 @@
pub use wasi_c2::WasiCtx;
+use wasmtime::Trap;
// Defines a `struct Wasi` with member fields and ap... | 1 | 10 | 2 |
d586574b1f492dbe9ff0c37931520ebfcfe93d81 | Pat Hickey | 2020-12-11T23:33:15 | port in args and env. slightly different style
building up a bunch of deferred errors in the CtxBuilder sucks. so does
reporting errors right away. Idk what to do here? | diff --git a/crates/test-programs/tests/wasm_tests/runtime.rs b/crates/test-programs/tests/wasm_tests/runtime.rs
index 7b0cb05df..f1509a4f4 100644
--- a/crates/test-programs/tests/wasm_tests/runtime.rs
+++ b/crates/test-programs/tests/wasm_tests/runtime.rs
@@ -25,7 +25,7 @@ pub fn instantiate(
// Additionally regi... | 5 | 86 | 8 |
aef8be560ff16c04440bae51de3eb0a52ddd4d13 | Pat Hickey | 2020-12-11T23:00:58 | test-programs: use wasi-c2 instead of wasmtime | diff --git a/Cargo.lock b/Cargo.lock
index 15df8fcd6..f0026c5a3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2140,9 +2140,9 @@ dependencies = [
"pretty_env_logger",
"target-lexicon",
"tempfile",
- "wasi-common",
+ "wasi-c2",
+ "wasi-c2-wasmtime",
"wasmtime",
- "wasmtime-wasi",
"wat",
]
@@ -2389,6 +2389,18 ... | 4 | 44 | 28 |
22db10e6438175a418d8e3f3a02642a3854fe0b6 | Pat Hickey | 2020-12-11T23:00:19 | add wasmtime adapter and stdio wrappers
the stdio wrappers will not work on windows, but thats a whole other can
of worms anyway | diff --git a/crates/wasi-c2/Cargo.toml b/crates/wasi-c2/Cargo.toml
index 14324dd22..c2c59f7e7 100644
--- a/crates/wasi-c2/Cargo.toml
+++ b/crates/wasi-c2/Cargo.toml
@@ -13,6 +13,11 @@ include = ["src/**/*", "LICENSE", "build.rs"]
build = "build.rs"
publish = false
+# This doesn't actually link to a native library, ... | 8 | 238 | 0 |
73058658f426eadb22d6ca6c5d7a5ae8985b7764 | Pat Hickey | 2020-12-11T20:14:09 | switch to cap-fs-ext::MetadataExt | diff --git a/Cargo.lock b/Cargo.lock
index 84f3a3a0a..15df8fcd6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -205,27 +205,37 @@ version = "1.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
+[[package]]
+name = "cap-fs... | 4 | 27 | 53 |
1d90c329b40303437f8a4b14a7f8844a0822af5c | Dan Gohman | 2020-12-10T05:46:43 | Remove an unused variable. | diff --git a/crates/test-programs/wasi-tests/src/bin/fd_readdir.rs b/crates/test-programs/wasi-tests/src/bin/fd_readdir.rs
index 6e4345107..903329b74 100644
--- a/crates/test-programs/wasi-tests/src/bin/fd_readdir.rs
+++ b/crates/test-programs/wasi-tests/src/bin/fd_readdir.rs
@@ -149,8 +149,6 @@ unsafe fn test_fd_readd... | 1 | 0 | 2 |
c3f0471ff2421eb110ccba28b0609a4a1d0339eb | Dan Gohman | 2020-12-10T00:49:59 | Fix the return value from wasi-common's `fd_readdir`.
`fd_readdir` returns a "bufused" value, which indicates the number of
bytes read into the buffer. WASI libc expects this value to be equal
to the size of the buffer if the end of the directory has not yet
been scanned.
Previously, wasi-common's `fd_readdir` was wr... | diff --git a/crates/test-programs/wasi-tests/src/bin/fd_readdir.rs b/crates/test-programs/wasi-tests/src/bin/fd_readdir.rs
index 8790ea021..6e4345107 100644
--- a/crates/test-programs/wasi-tests/src/bin/fd_readdir.rs
+++ b/crates/test-programs/wasi-tests/src/bin/fd_readdir.rs
@@ -26,15 +26,20 @@ impl<'a> Iterator for R... | 2 | 91 | 15 |
25000afe69bd32ded541a41074b217defa03a912 | Alex Crichton | 2020-12-07T23:57:35 | Enable fuzzing the module linking implementation
This commit updates all the wasm-tools crates that we use and enables
fuzzing of the module linking proposal in our various fuzz targets. This
also refactors some of the dummy value generation logic to not be
fallible and to always succeed, the thinking being that we do... | diff --git a/Cargo.lock b/Cargo.lock
index 13c13d89c..64237674e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -394,7 +394,7 @@ dependencies = [
"souper-ir",
"target-lexicon",
"thiserror",
- "wast 28.0.0",
+ "wast 29.0.0",
]
[[package]]
@@ -597,7 +597,7 @@ dependencies = [
"smallvec",
"target-lexicon",
"th... | 22 | 378 | 153 |
47f3a6bcb96ccf3a24d6f6f6784e6de0ea005f72 | Pat Hickey | 2020-12-11T01:31:21 | sketchy implementation of readdir | diff --git a/crates/wasi-c2/src/dir.rs b/crates/wasi-c2/src/dir.rs
index 62bddebe2..68e0af539 100644
--- a/crates/wasi-c2/src/dir.rs
+++ b/crates/wasi-c2/src/dir.rs
@@ -20,6 +20,11 @@ pub trait WasiDir {
path: &str,
create: bool,
) -> Result<Box<dyn WasiDir>, Error>;
+
+ fn readdir(
+ &... | 3 | 113 | 12 |
03c92de5aa6a992246c2939229e0755b3f62db0d | Pat Hickey | 2020-12-10T23:37:02 | stub out set_oflags for unix i guess?
what do we do about unsupported stuff like that? silently return OK? | diff --git a/crates/wasi-c2/src/error.rs b/crates/wasi-c2/src/error.rs
index f4a940283..bb63ae6db 100644
--- a/crates/wasi-c2/src/error.rs
+++ b/crates/wasi-c2/src/error.rs
@@ -34,6 +34,9 @@ pub enum Error {
#[error("Unexpected IoError: {0}")]
UnexpectedIo(#[source] std::io::Error),
+ #[error("Unsupporte... | 3 | 19 | 4 |
cdb642b3d6f14e0fe0af40bb4270f23932fb71a2 | Pat Hickey | 2020-12-10T23:07:18 | do cfg right | diff --git a/crates/wasi-c2/src/file.rs b/crates/wasi-c2/src/file.rs
index 1aa4adce4..cbe5e2ccd 100644
--- a/crates/wasi-c2/src/file.rs
+++ b/crates/wasi-c2/src/file.rs
@@ -195,18 +195,20 @@ impl WasiFile for cap_std::fs::File {
}
fn get_filestat(&self) -> Result<Filestat, Error> {
let meta = self.me... | 2 | 16 | 12 |
41d668b4dad269c0f7c834c234c1a1ed9099061c | Andrew Brown | 2020-11-20T19:37:13 | Introduce benchmarking API
The new crate introduced here, `wasmtime-bench-api`, creates a shared library, e.g. `wasmtime_bench_api.so`, for executing Wasm benchmarks using Wasmtime. It allows us to measure several phases separately by exposing `engine_compile_module`, `engine_instantiate_module`, and `engine_execute_m... | diff --git a/Cargo.lock b/Cargo.lock
index 13c13d89c..80f890f6d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2449,6 +2449,17 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "wasmtime-bench-api"
+version = "0.19.0"
+dependencies = [
+ "anyhow",
+ "wasi-common",
+ "wasmtime",
+ "wasmtime-wasi",
+ "wat",
+]
+
[... | 4 | 235 | 0 |
4dd1836704326b029197c4145eb71c09e3fd383e | Pat Hickey | 2020-12-10T22:50:55 | windows nightly can give us filestat info | diff --git a/Cargo.lock b/Cargo.lock
index 4afcf7dca..84f3a3a0a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2368,9 +2368,11 @@ version = "0.21.0"
dependencies = [
"anyhow",
"cap-std",
+ "cfg-if 1.0.0",
"fs-set-times",
"getrandom 0.2.0",
"libc",
+ "rustc_version",
"system-interface",
"thiserror",
"trac... | 4 | 35 | 5 |
f9edab9547e285d8dae33c381458e7454e22bce5 | Pat Hickey | 2020-12-10T21:59:49 | cargo.lock | diff --git a/Cargo.lock b/Cargo.lock
index 6202b2949..4afcf7dca 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2061,7 +2061,9 @@ dependencies = [
[[package]]
name = "system-interface"
-version = "0.1.1-alpha.0"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95457b1e5... | 1 | 3 | 1 |
20eb66beab30bfea3f259c4ff7ff33698c47b90a | Pat Hickey | 2020-12-10T20:06:21 | fixes to system-interface, use fs-set-times | diff --git a/Cargo.lock b/Cargo.lock
index 019c8f7da..6202b2949 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -216,7 +216,7 @@ dependencies = [
"ipnet",
"libc",
"once_cell",
- "posish",
+ "posish 0.4.1",
"winapi",
"winx 0.20.0",
]
@@ -928,7 +928,7 @@ version = "0.2.1"
source = "registry+https://github.com/rus... | 4 | 44 | 51 |
e09b9400f8434907894949e37f791fbd507d57b3 | Alex Crichton | 2020-12-09T16:34:37 | Restrict threads spawned during fuzzing (#2485)
I was having limited success fuzzing locally because apparently the
fuzzer was spawning too many threads. Looking into it that indeed
appears to be the case! The threads which time out runtime of wasm only
exit after the sleep has completely finished, meaning that if ... | diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs
index 2fb6c5868..5a5ab3e68 100644
--- a/crates/fuzzing/src/oracles.rs
+++ b/crates/fuzzing/src/oracles.rs
@@ -18,7 +18,8 @@ use log::debug;
use std::cell::Cell;
use std::rc::Rc;
use std::sync::atomic::{AtomicUsize, Ordering::SeqCst};
-use std... | 1 | 68 | 5 |
229474d6e071aa54c179d1539b81e90205513f69 | Pat Hickey | 2020-12-08T02:21:09 | sketchy path_open | diff --git a/crates/wasi-c2/src/ctx.rs b/crates/wasi-c2/src/ctx.rs
index 3b823cbfe..b4febbb5a 100644
--- a/crates/wasi-c2/src/ctx.rs
+++ b/crates/wasi-c2/src/ctx.rs
@@ -1,4 +1,4 @@
-use crate::dir::{DirEntry, WasiDir};
+use crate::dir::{DirCaps, DirEntry, WasiDir};
use crate::file::{FileCaps, FileEntry, WasiFile};
us... | 5 | 157 | 13 |
5590b27fdf3761fb6e3c2643c2405e9f9ee57181 | Pat Hickey | 2020-12-08T01:12:08 | impl WasiFile for cap_std::fs::File | diff --git a/Cargo.lock b/Cargo.lock
index 88a1f4a69..019c8f7da 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -205,6 +205,31 @@ version = "1.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
+[[package]]
+name = "cap-pri... | 6 | 189 | 44 |
f1025322fa72acf3e48ff982b0706a7c007d4fd2 | Andrew Brown | 2020-12-07T17:20:06 | Update wasmparser to 0.69.2 | diff --git a/Cargo.lock b/Cargo.lock
index 844b60b4b..13c13d89c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -597,7 +597,7 @@ dependencies = [
"smallvec",
"target-lexicon",
"thiserror",
- "wasmparser 0.69.1",
+ "wasmparser 0.69.2",
"wat",
]
@@ -1167,7 +1167,7 @@ dependencies = [
"smallvec",
"thiserror",
... | 10 | 21 | 21 |
fc752efa89e1c0c13cc2de900adc945c4e319e93 | Andrew Brown | 2020-12-03T23:55:00 | Fix incorrect arithmetic NaN check and document | diff --git a/crates/wast/src/wast.rs b/crates/wast/src/wast.rs
index c0c5f61c1..47b38d13e 100644
--- a/crates/wast/src/wast.rs
+++ b/crates/wast/src/wast.rs
@@ -2,7 +2,7 @@ use crate::spectest::link_spectest;
use anyhow::{anyhow, bail, Context as _, Result};
use core::fmt;
use std::str;
-use std::{mem::size_of, path... | 1 | 34 | 13 |
651f405220ad146608b80a9f8feff72ca14044a4 | Andrew Brown | 2020-12-03T23:18:50 | Print WAST assertion failures in a hexadecimal pattern format
Fixes #1681. | diff --git a/crates/wast/src/wast.rs b/crates/wast/src/wast.rs
index 692e2f583..c0c5f61c1 100644
--- a/crates/wast/src/wast.rs
+++ b/crates/wast/src/wast.rs
@@ -1,7 +1,8 @@
use crate::spectest::link_spectest;
use anyhow::{anyhow, bail, Context as _, Result};
-use std::path::Path;
+use core::fmt;
use std::str;
+use s... | 1 | 185 | 2 |
05ecdbfa96cdd14ce633ff7cebe8db8bf11e593b | Pat Hickey | 2020-12-04T01:12:21 | change the preopen strategy again, implement more calls | diff --git a/crates/wasi-c2/src/ctx.rs b/crates/wasi-c2/src/ctx.rs
index 4951a0631..a10c2d09e 100644
--- a/crates/wasi-c2/src/ctx.rs
+++ b/crates/wasi-c2/src/ctx.rs
@@ -1,24 +1,22 @@
+use crate::dir::{DirEntry, WasiDir};
use crate::file::{FileCaps, FileEntry, WasiFile};
use crate::table::Table;
use std::cell::{RefCe... | 6 | 116 | 36 |
1efdf10ca79d7971e9c80603edb46777e2dd07f3 | Nick Fitzgerald | 2020-10-16T18:18:43 | souper-harvest: ensure that `select` conditions are of type `i1` | diff --git a/Cargo.lock b/Cargo.lock
index f177b974a..716f156bf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1989,9 +1989,9 @@ checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252"
[[package]]
name = "souper-ir"
-version = "2.0.0"
+version = "2.1.0"
source = "registry+https://github.com/rus... | 4 | 26 | 4 |
f7cf771ee674c0315b0602449e65959a0937066d | Nick Fitzgerald | 2020-10-16T00:00:02 | souper-harvest: Do not generate assignments of constants
It turns out that Souper does not allow a constant to be assigned to a variable,
they may only be used as operands. The 2.0.0 version of the `souper-ir` crate
correctly reflects this. In the `cranelift_codegen::souper_harvest` module, we
need to modify our Soupe... | diff --git a/Cargo.lock b/Cargo.lock
index b5e646f2a..f177b974a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1989,9 +1989,9 @@ checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252"
[[package]]
name = "souper-ir"
-version = "1.0.0"
+version = "2.0.0"
source = "registry+https://github.com/rus... | 5 | 60 | 35 |
937a3fde4000aa69e7f8c9bfff1261da4220d452 | bjorn3 | 2020-12-03T17:57:03 | Fix simplejit tests for x64 by disabling is_pic | diff --git a/cranelift/simplejit/examples/simplejit-minimal.rs b/cranelift/simplejit/examples/simplejit-minimal.rs
index ae06c07b9..7274c4d5e 100644
--- a/cranelift/simplejit/examples/simplejit-minimal.rs
+++ b/cranelift/simplejit/examples/simplejit-minimal.rs
@@ -1,12 +1,22 @@
use cranelift::prelude::*;
use cranelif... | 2 | 40 | 4 |
d2721064dfae09b1256c53e36be6193a66a153b3 | Chris Fallin | 2020-12-03T17:38:38 | Disable all x64 SIMD tests, as some seem to be nondeterministic.
We are seeing some repeated but nondeterministic failures of x64 SIMD
tests, as tracked in #2470. In order to err on the side of not
inadvertently breaking/blocking CI for others, we will disable all SIMD
tests for now while we investigate. | diff --git a/build.rs b/build.rs
index aa791aeda..c76652167 100644
--- a/build.rs
+++ b/build.rs
@@ -175,49 +175,10 @@ fn write_testsuite_tests(
/// For experimental_x64 backend features that are not supported yet, mark tests as panicking, so
/// they stop "passing" once the features are properly implemented.
-fn e... | 1 | 9 | 43 |
69d041faf17db7c396a928704388e5a557770e34 | bjorn3 | 2020-12-03T17:49:18 | Restore support for non-pic code in SimpleJIT | diff --git a/cranelift/simplejit/src/backend.rs b/cranelift/simplejit/src/backend.rs
index eb6610907..67ba0f8a3 100644
--- a/cranelift/simplejit/src/backend.rs
+++ b/cranelift/simplejit/src/backend.rs
@@ -36,6 +36,7 @@ pub struct SimpleJITBuilder {
isa: Box<dyn TargetIsa>,
symbols: HashMap<String, *const u8>,... | 1 | 116 | 41 |
bbdea06e2d22b85cdacf5406171bccf65166031b | Chris Fallin | 2020-12-02T22:52:44 | Add differential fuzzing against wasmi (a Wasm interpreter).
This PR adds a new fuzz target, `differential_wasmi`, that runs a
Cranelift-based Wasm backend alongside a simple third-party Wasm
interpeter crate (`wasmi`). The fuzzing runs the first function in a
given module to completion on each side, and then diffs t... | diff --git a/Cargo.lock b/Cargo.lock
index 40c4034ef..2044cd3a6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -766,6 +766,12 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "downcast-rs"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ea835d29036a4087793836fa93... | 6 | 293 | 22 |
a548516f97ce0e62fedcf7a22ebe9b0106343bc4 | Johnnie Birch | 2020-11-29T23:06:05 | Enable SIMD spec tests for f32x4_rounding and f64x4_rounding.
Also address some review comments pointing out minor issues. | diff --git a/build.rs b/build.rs
index 4937f6bf1..aa791aeda 100644
--- a/build.rs
+++ b/build.rs
@@ -212,6 +212,8 @@ fn experimental_x64_should_panic(testsuite: &str, testname: &str, strategy: &str
("simd", "simd_splat") => return false,
("simd", "simd_store") => return false,
("simd", "simd_... | 3 | 11 | 9 |
a33e755cb2db90e7ca7f4b093e008d10b1f2a86c | Johnnie Birch | 2020-11-29T03:57:03 | Adds x86 SIMD support for Ceil, Floor, Trunc, and Nearest | diff --git a/cranelift/codegen/src/isa/x64/inst/args.rs b/cranelift/codegen/src/isa/x64/inst/args.rs
index 4542f3386..817e7f830 100644
--- a/cranelift/codegen/src/isa/x64/inst/args.rs
+++ b/cranelift/codegen/src/isa/x64/inst/args.rs
@@ -550,6 +550,8 @@ pub enum SseOpcode {
Punpcklbw,
Pxor,
Rcpss,
+ Ro... | 4 | 82 | 16 |
60d7f7de0aed98618e14cb686fd6f5843d216100 | Chris Fallin | 2020-12-02T01:01:38 | Debug info: two fixes in x64 backend.
- Sort by generated-code offset to maintain invariant and avoid gimli
panic.
- Fix srcloc interaction with branch peephole optimization in
MachBuffer: if a srcloc range overlaps with a branch that is
truncated, remove that srcloc range.
These issues were found while fuzzing... | diff --git a/cranelift/codegen/src/machinst/buffer.rs b/cranelift/codegen/src/machinst/buffer.rs
index b2187a9b6..7d75dd46d 100644
--- a/cranelift/codegen/src/machinst/buffer.rs
+++ b/cranelift/codegen/src/machinst/buffer.rs
@@ -674,6 +674,12 @@ impl<I: VCodeInst> MachBuffer<I> {
// (end of buffer)
... | 1 | 10 | 1 |
40f8f69e030afd4dda38fd7e16b82f710005dd7c | Pat Hickey | 2020-12-02T02:26:45 | fill in more implementations, support preopens | diff --git a/crates/wasi-c2/src/ctx.rs b/crates/wasi-c2/src/ctx.rs
index d0cdfc1b5..4951a0631 100644
--- a/crates/wasi-c2/src/ctx.rs
+++ b/crates/wasi-c2/src/ctx.rs
@@ -1,18 +1,50 @@
+use crate::file::{FileCaps, FileEntry, WasiFile};
use crate::table::Table;
use std::cell::{RefCell, RefMut};
+use std::collections::Ha... | 4 | 165 | 17 |
51c1d4bbd6dc2985e8f2ad00731012df071d928b | Alex Crichton | 2020-12-01T22:56:23 | Provide filename/line number information in `Trap` (#2452)
* Provide filename/line number information in `Trap`
This commit extends the `Trap` type and `Store` to retain DWARF debug
information found in a wasm file unconditionally, if it's present. This
then enables us to print filenames and line numbers which po... | diff --git a/Cargo.lock b/Cargo.lock
index aabea2ee2..40c4034ef 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -331,6 +331,16 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
+[[package]]
+name = "cpp_dem... | 16 | 568 | 62 |
beaad53dc0afbf3794a9c328dceb1d539430a267 | Pat Hickey | 2020-12-01T19:57:24 | filestat ops | diff --git a/crates/wasi-c2/src/error.rs b/crates/wasi-c2/src/error.rs
index 20b0de9d0..e45e45950 100644
--- a/crates/wasi-c2/src/error.rs
+++ b/crates/wasi-c2/src/error.rs
@@ -104,6 +104,10 @@ pub enum Error {
/// Errno::Spipe: Invalid seek
#[error("Spipe: Invalid seek")]
Spipe,
+
+ /// Errno::NotCap... | 3 | 115 | 9 |
87b1a85cc645be0709d9cfcbf09e36dd162c8d41 | Andrew Brown | 2020-12-01T01:28:30 | Fix confusion caused by overloading of FuncRef
Prior to this change, the interpreter would use an incorrect `FuncRef` for accessing functions from the function store. This is now clarified and fixed by a new type--`FuncIndex`. | diff --git a/cranelift/interpreter/src/environment.rs b/cranelift/interpreter/src/environment.rs
index b3b9dade6..6c7a9a0b2 100644
--- a/cranelift/interpreter/src/environment.rs
+++ b/cranelift/interpreter/src/environment.rs
@@ -1,54 +1,76 @@
//! Implements the function environment (e.g. a name-to-function mapping) fo... | 2 | 95 | 37 |
26509cb080b2ec8b77cac816c385f6794e9fcff3 | Andrew Brown | 2020-11-30T04:38:02 | Optimize access to interpreter frame slots
Previously, getting or setting a value in a frame of the Cranelift interpreter involved a hash table lookup. Since the interpreter statically knows the number of slots necessary for each called frame, we can use a vector instead and save time on the hash lookup. This also has... | diff --git a/cranelift/interpreter/src/frame.rs b/cranelift/interpreter/src/frame.rs
index d6f3065c4..2a437a34f 100644
--- a/cranelift/interpreter/src/frame.rs
+++ b/cranelift/interpreter/src/frame.rs
@@ -2,41 +2,45 @@
use cranelift_codegen::data_value::DataValue;
use cranelift_codegen::ir::{Function, Value as Valu... | 1 | 137 | 30 |
52035f51ee7ce8d30577d0feb2671d687fbc1075 | Pat Hickey | 2020-11-19T02:32:37 | fill in some file methods, find missing pieces | diff --git a/crates/wasi-c2/src/file.rs b/crates/wasi-c2/src/file.rs
index 5f8116a84..853b7b7ef 100644
--- a/crates/wasi-c2/src/file.rs
+++ b/crates/wasi-c2/src/file.rs
@@ -2,7 +2,56 @@ use crate::Error;
use std::ops::Deref;
use system_interface::fs::FileIoExt;
-pub trait WasiFile: FileIoExt {}
+pub trait WasiFile:... | 2 | 124 | 7 |
b87908de9b3520a79ff936d21fa348ff83ef246d | Pat Hickey | 2020-11-17T23:23:26 | wasi-c2: rewrite wasi-common in terms of system-interface | diff --git a/Cargo.lock b/Cargo.lock
index aabea2ee2..88a1f4a69 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1458,6 +1458,19 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b"
+[[package]]
+name = "posi... | 11 | 801 | 1 |
09f3d4e3316114a4af1cddf90f6710801ebac590 | Johnnie Birch | 2020-11-24T02:27:23 | Refactor convert from float to unsigned int and add comments | diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs
index 826ed9b5b..09ded3c94 100644
--- a/cranelift/codegen/src/isa/x64/lower.rs
+++ b/cranelift/codegen/src/isa/x64/lower.rs
@@ -2722,6 +2722,7 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
} else {
... | 1 | 75 | 2 |
2ab83eec7aca4502f3b6e501fae3faf8ddc1a5ee | Ivan Enderlin | 2020-11-26T16:26:55 | feat(cranelift-codegen) Re-export `gimli` when `unwind` feature is enabled.
When one wants to manipulate the unwind information, the exact version
of `gimli` must be used both by the user and `cranelift-codegen`. It
makes the update procedure less obvious.
This patch proposes to re-export `gimli` when the `unwind` fe... | diff --git a/cranelift/codegen/src/lib.rs b/cranelift/codegen/src/lib.rs
index e3be3e0aa..f975e2806 100644
--- a/cranelift/codegen/src/lib.rs
+++ b/cranelift/codegen/src/lib.rs
@@ -66,6 +66,8 @@ pub use crate::write::write_function;
pub use cranelift_bforest as bforest;
pub use cranelift_entity as entity;
+#[cfg(fe... | 1 | 2 | 0 |
34d9931ed8791900cc71ed944a196daca21ec8ea | Chris Fallin | 2020-11-25T02:55:40 | Fix Wasm translator bug: end of toplevel frame is branched-to only for fallthrough returns.
This makes the value of `state.reachable()` inaccurate when observing at
the tail of functions (in the post-function hook) after an ordinary
return instruction. | diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs
index 16d68b69b..c522feb05 100644
--- a/cranelift/wasm/src/code_translator.rs
+++ b/cranelift/wasm/src/code_translator.rs
@@ -514,7 +514,9 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
Operator::Return => {... | 3 | 182 | 5 |
4300c2c075ab1eeb53b34bbffab581b2c0f0e1bc | Chris Fallin | 2020-11-25T00:22:29 | Add FuncEnvironment hooks to generate prologue and epilogue code.
In some cases, it is useful to do some work at entry to or exit from a
Cranelift function translated from WebAssembly. This PR adds two
optional methods to the `FuncEnvironment` trait to do just this,
analogous to the pre/post-hooks on operators that al... | diff --git a/cranelift/codegen/src/isa/aarch64/inst/unwind.rs b/cranelift/codegen/src/isa/aarch64/inst/unwind.rs
index 698e09479..33eabfb17 100644
--- a/cranelift/codegen/src/isa/aarch64/inst/unwind.rs
+++ b/cranelift/codegen/src/isa/aarch64/inst/unwind.rs
@@ -104,7 +104,7 @@ impl UnwindInfoGenerator<Inst> for AArch64U... | 3 | 23 | 2 |
b06ed39c1eb7e518c3558cb8b179c78c513104f7 | Tanya L. Crenshaw | 2020-11-24T20:06:57 | Fixes #2418: Enhance wiggle to generate its UserErrorConverstion trait with a function that returns Result<abi_err, String> (#2419)
* Enhance wiggle to generate its UserErrorConverstion trait with a function that returns
a Result<abi_err, String>. This enhancement allows hostcall implementations using wiggle
to ret... | diff --git a/crates/wasi-common/src/wasi.rs b/crates/wasi-common/src/wasi.rs
index 2ae7257e6..214057e76 100644
--- a/crates/wasi-common/src/wasi.rs
+++ b/crates/wasi-common/src/wasi.rs
@@ -23,9 +23,9 @@ impl types::GuestErrorConversion for WasiCtx {
}
impl types::UserErrorConversion for WasiCtx {
- fn errno_from... | 18 | 84 | 84 |
ba141ec6beb11127bcca293da39715835ffa2265 | Alex Crichton | 2020-11-24T15:07:08 | Fix doctests | diff --git a/crates/wasmtime/src/linker.rs b/crates/wasmtime/src/linker.rs
index 9fbcef6c2..e04052789 100644
--- a/crates/wasmtime/src/linker.rs
+++ b/crates/wasmtime/src/linker.rs
@@ -371,7 +371,7 @@ impl Linker {
/// "#;
/// let module = Module::new(store.engine(), wat)?;
/// linker.module("", &module)... | 2 | 2 | 2 |
ff8a4e4f9bd1d96fabf2cbcf4810eb4658156485 | Johnnie Birch | 2020-11-23T21:00:13 | Enable simd_conversions spec test | diff --git a/build.rs b/build.rs
index da9822e71..c4fcc1a96 100644
--- a/build.rs
+++ b/build.rs
@@ -210,6 +210,7 @@ fn experimental_x64_should_panic(testsuite: &str, testname: &str, strategy: &str
("simd", "simd_load_splat") => return false,
("simd", "simd_splat") => return false,
("simd", "... | 1 | 1 | 0 |
ade9f12c725e97a360df8b653272d5adae22de6b | Johnnie Birch | 2020-11-23T17:58:39 | Add support for X86_64 SIMD narrow instructions for vcode backend
Adds lowering support for:
i8x16.narrow_i16x8_s
i8x16.narrow_i16x8_u
i16x8.narrow_i32x4_s
i16x8.narrow_i32x4_u | diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs
index 488408b47..826ed9b5b 100644
--- a/cranelift/codegen/src/isa/x64/lower.rs
+++ b/cranelift/codegen/src/isa/x64/lower.rs
@@ -2911,7 +2911,40 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
}
}
... | 1 | 34 | 1 |
2cc501427eb7cca9c5cef4be4ec7b02c461b0278 | Johnnie Birch | 2020-11-23T07:14:29 | Add remaining X86_64 support for pack w/ signed/unsigned saturation
Adds lowering for packssdw, packusdw, packuswb | diff --git a/cranelift/codegen/src/isa/x64/inst/args.rs b/cranelift/codegen/src/isa/x64/inst/args.rs
index feede2e06..4542f3386 100644
--- a/cranelift/codegen/src/isa/x64/inst/args.rs
+++ b/cranelift/codegen/src/isa/x64/inst/args.rs
@@ -467,7 +467,10 @@ pub enum SseOpcode {
Pabsb,
Pabsw,
Pabsd,
+ Pack... | 3 | 30 | 0 |
258013cff1bd7e844a903b6543536db37ef9522c | Johnnie Birch | 2020-11-23T06:14:19 | Add support for SWidenHigh and UWidenHigh X86_64 for vcode backend
Support is based on SSE4.1 | diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs
index 8e3636acb..488408b47 100644
--- a/cranelift/codegen/src/isa/x64/lower.rs
+++ b/cranelift/codegen/src/isa/x64/lower.rs
@@ -2845,10 +2845,26 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
},
... | 1 | 36 | 4 |
124096735bba3072b02e319d92d66fc683d38b83 | Johnnie Birch | 2020-11-23T05:55:37 | Add support for palignr for X86_64 vcode backend | diff --git a/cranelift/codegen/src/isa/x64/inst/args.rs b/cranelift/codegen/src/isa/x64/inst/args.rs
index 2958dd56d..feede2e06 100644
--- a/cranelift/codegen/src/isa/x64/inst/args.rs
+++ b/cranelift/codegen/src/isa/x64/inst/args.rs
@@ -476,6 +476,7 @@ pub enum SseOpcode {
Paddsw,
Paddusb,
Paddusw,
+ ... | 3 | 13 | 1 |
f9937575d693a40cfacbebf1d1f3942b17eef96b | Johnnie Birch | 2020-11-23T04:58:13 | Add support for SwidenLow and UwidenLow for the X86_64 vcode backend
Adds support using lowerings compatible with SSE4.1 | diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs
index 2abff1a03..8e3636acb 100644
--- a/cranelift/codegen/src/isa/x64/lower.rs
+++ b/cranelift/codegen/src/isa/x64/lower.rs
@@ -2825,7 +2825,62 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
}
}
... | 1 | 56 | 1 |
615a575da11da798f0f58645584863bcb4c1a731 | Johnnie Birch | 2020-11-23T04:23:00 | Add support for x86_64 packed move lowering for the vcode backend | diff --git a/cranelift/codegen/src/isa/x64/inst/args.rs b/cranelift/codegen/src/isa/x64/inst/args.rs
index e99228856..2958dd56d 100644
--- a/cranelift/codegen/src/isa/x64/inst/args.rs
+++ b/cranelift/codegen/src/isa/x64/inst/args.rs
@@ -507,6 +507,18 @@ pub enum SseOpcode {
Pminuw,
Pminud,
Pmovmskb,
+ ... | 3 | 123 | 0 |
b6d783a1202fd45e3f6dbcc22635ce9d67b85f58 | Johnnie Birch | 2020-11-22T20:00:54 | Adds support for i32x4.trunc_sat_f32x4_u | diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs
index bbe886c24..2abff1a03 100644
--- a/cranelift/codegen/src/isa/x64/lower.rs
+++ b/cranelift/codegen/src/isa/x64/lower.rs
@@ -2776,7 +2776,46 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
dst,
... | 1 | 40 | 1 |
27f3307f24621a317fc73d1bb1d46fd55850288d | Matt | 2020-11-21T05:03:41 | Replace if + panic! with assert!
Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com> | diff --git a/cranelift/frontend/src/frontend.rs b/cranelift/frontend/src/frontend.rs
index c44f2d11b..07d8d7819 100644
--- a/cranelift/frontend/src/frontend.rs
+++ b/cranelift/frontend/src/frontend.rs
@@ -462,18 +462,16 @@ impl<'a> FunctionBuilder<'a> {
#[cfg(debug_assertions)]
{
for (blo... | 1 | 10 | 12 |
966b347faa112c84cf5b7b0af041adfbf7403235 | Pat Hickey | 2020-11-20T21:55:39 | fix wiggle-borrow publishing order | diff --git a/scripts/publish.rs b/scripts/publish.rs
index 979f282b6..5931fa7d1 100644
--- a/scripts/publish.rs
+++ b/scripts/publish.rs
@@ -42,10 +42,10 @@ const CRATES_TO_PUBLISH: &[&str] = &[
"cranelift-simplejit",
// wig/wiggle
"wig",
- "wiggle-borrow",
"wiggle-generate",
"wiggle-macro",... | 1 | 1 | 1 |
b40a983b298dfbb9e4349b76e5274646bec2fe90 | Pat Hickey | 2020-11-20T19:45:59 | wiggle-borrow gets published now | diff --git a/scripts/publish.rs b/scripts/publish.rs
index 5713b9f05..979f282b6 100644
--- a/scripts/publish.rs
+++ b/scripts/publish.rs
@@ -42,6 +42,7 @@ const CRATES_TO_PUBLISH: &[&str] = &[
"cranelift-simplejit",
// wig/wiggle
"wig",
+ "wiggle-borrow",
"wiggle-generate",
"wiggle-macro",
... | 1 | 1 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.