Commit Graph

2032 Commits

Author SHA1 Message Date
Alex Crichton
6bcee7f5f7 Add a configuration option to force "static" memories (#3503)
* Add a configuration option to force "static" memories

In poking around at some things earlier today I realized that one
configuration option for memories we haven't exposed from embeddings
like the CLI is to forcibly limit the size of memory growth and force
using a static memory style. This means that the CLI, for example, can't
limit memory growth by default and memories are only limited in size by
what the OS can give and the wasm's own memory type. This configuration
option means that the CLI can artificially limit the size of wasm linear
memories.

Additionally another motivation for this is for testing out various
codegen ramifications of static/dynamic memories. This is the only way
to force a static memory, by default, for wasm64 memories with no
maximum size listed for example.

* Review feedback
2021-11-03 16:50:49 -05:00
Benjamin Bouvier
c952969389 Remove unused dependencies (#3490)
* Remove unused dependencies in Cranelift

* add serde to the current workspace

* remove more unused dependencies in wasmtime?
2021-11-02 12:08:30 -05:00
Alex Crichton
9a27fdad86 Update v8 used during fuzzing (#3493)
This commit updates the crate name from `rusty_v8` to `v8` as well since
the upstream bindings have sinced moved. I originally wanted to do this
to see if a fix for one of our fuzz bugs was pulled in but I don't think
the fix has been pulled in yet. Despite that it seems reasonable to go
ahead and update.
2021-11-01 09:18:11 -05:00
Philipp Oppermann
795e381be4 Fix typo: profilng -> profiling (#3492) 2021-10-29 14:01:41 -05:00
Philipp Oppermann
d49b83fcc4 Small comma fix in crate docs (#3491) 2021-10-29 13:36:10 -05:00
wasmtime-publish
c1a6a0523d Release Wasmtime 0.31.0 (#3489)
* Bump Wasmtime to 0.31.0

[automatically-tag-and-release-this-commit]

* Update 0.31.0 release notes

Co-authored-by: Wasmtime Publish <wasmtime-publish@users.noreply.github.com>
Co-authored-by: Alex Crichton <alex@alexcrichton.com>
2021-10-29 09:09:35 -05:00
Pat Hickey
7962fe3f43 update tracing-subscriber (#3473)
which gets rid of the transitive dep on `chrono` that was affected by
`RUSTSEC-2020-0159`.
2021-10-26 09:06:45 -05:00
Alex Crichton
490d49a768 Adjust dependency directives between crates (#3420)
* Adjust dependency directives between crates

This commit is a preparation for the release process for Wasmtime. The
specific changes here are to delineate which crates are "public", and
all version requirements on non-public crates will now be done with
`=A.B.C` version requirements instead of today's `A.B.C` version
requirements.

The purpose for doing this is to assist with patch releases that might
happen in the future. Patch releases of wasmtime are already required to
not break the APIs of "public" crates, but no such guarantee is given
about "internal" crates. This means that a patch release runs the risk,
for example, of breaking an internal API. In doing so though we would
also need to release a new major version of the internal crate, but we
wouldn't have a great hole in the number scheme of major versions to do
so. By using `=A.B.C` requirements for internal crates it means we can
safely ignore strict semver-compatibility between releases of internal
crates for patch releases, since the only consumers of the crate will be
the corresponding patch release of the `wasmtime` crate itself (or other
public crates).

The `publish.rs` script has been updated with a check to verify that
dependencies on internal crates are all specified with an `=`
dependency, and dependnecies on all public crates are without a `=`
dependency. This will hopefully make it so we don't have to worry about
what to use where, we just let CI tell us what to do. Using this
modification all version dependency declarations have been updated.

Note that some crates were adjusted to simply remove their `version`
requirement in cases such as the crate wasn't published anyway (`publish
= false` was specified) or it's in the `dev-dependencies` section which
doesn't need version specifiers for path dependencies.

* Switch to normal sever deps for cranelift dependencies

These crates will now all be considered "public" where in patch releases
they will be guaranteed to not have breaking changes.
2021-10-26 09:06:03 -05:00
Pat Hickey
06a93d3346 Merge pull request #3393 from bytecodealliance/pch/async_limiting
Add ResourceLimiterAsync, which can yield until resource is available
2021-10-25 11:47:48 -07:00
Alex Crichton
2f2c5231b4 Add Alex's solution for null handling in TlsRestore 2021-10-25 10:04:31 -07:00
Anton Kirilov
e9c4164b94 Call membarrier() after making JIT mappings executable on AArch64 Linux
The membarrier() system call ensures that no processor has fetched
a stale instruction stream.

Copyright (c) 2021, Arm Limited.
2021-10-25 13:25:35 +01:00
Pat Hickey
5f978dbfdd make feature requirement render in rustdoc for new apis 2021-10-22 14:03:04 -07:00
Pat Hickey
6819459082 fix all docs links 2021-10-22 12:00:56 -07:00
Pat Hickey
996289725d docs 2021-10-22 11:44:54 -07:00
Pat Hickey
b00d811e83 code review 2021-10-22 10:43:46 -07:00
Pat Hickey
52542b6c01 mock enough of the store to pass the uffd test 2021-10-22 08:56:13 -07:00
Pat Hickey
efef0769fe make uffd test compile, but not pass 2021-10-22 08:39:00 -07:00
Pat Hickey
0370d5c1a2 code review suggestion 2021-10-21 16:46:31 -07:00
Pat Hickey
3fd674c6bc async memory_grow_failed can have a default impl
idk why this didnt work in the old factoring! but im glad it does
2021-10-21 16:38:46 -07:00
Pat Hickey
a1301f8dae add table_grow_failed 2021-10-21 15:07:40 -07:00
Pat Hickey
c0a1af94cf fix trap behavior 2021-10-21 15:07:32 -07:00
Pat Hickey
351a51cce6 docs 2021-10-21 14:28:40 -07:00
Pat Hickey
252ba39c27 implement table _async methods, test passes now 2021-10-21 14:15:53 -07:00
Pat Hickey
5aef8f47c8 catch panic in libcalls for memory and table grow 2021-10-21 12:15:00 -07:00
Pat Hickey
d3deaae99d collapse some common code 2021-10-21 12:10:03 -07:00
Pat Hickey
6c70b81ff5 review feedback 2021-10-21 12:10:03 -07:00
Pat Hickey
abbe28d833 propogate changes to use anyhow::Error instead of Box<dyn Error...> 2021-10-21 12:10:03 -07:00
Pat Hickey
a5007f318f runtime: use anyhow::Error instead of Box<dyn std::error::Error...> 2021-10-21 12:10:03 -07:00
Pat Hickey
2225722373 Memory::new_async, grow_async now work! 2021-10-21 12:10:03 -07:00
Pat Hickey
67a6c27e22 pooling needs the store earlier 2021-10-21 12:10:03 -07:00
Pat Hickey
9d1b24632e fix 2021-10-21 12:10:03 -07:00
Pat Hickey
147c8f8ed7 rename 2021-10-21 12:10:03 -07:00
Pat Hickey
18a355e092 give sychronous ResourceLimiter an async alternative 2021-10-21 12:10:03 -07:00
Adam Bratschi-Kaye
afd10646c9 List exports of an instance in linking error (#3456)
When there is a linking error caused by an undefined instance, list all
the instances exports in the error message. This will clarify errors for
undefined two-level imports that get desugared to one-level instance
imports under the module-linking proposal.
2021-10-20 16:31:53 -05:00
Alex Crichton
fb585fde40 Update the wast crate dependency (#3464)
Pulls in a few minor fixes for stack overflows with module linking as
well as some updates to other various wasm proposals.
2021-10-20 11:25:52 -05:00
Alex Crichton
e2a724ce18 Update the object crate to 0.27.0 (#3465)
Mostly just keeping us up to date with changes there since we somewhat
heavily rely on it now.
2021-10-20 10:52:06 -05:00
Alex Crichton
1a5fa3ed3f Enable stable wasm features for spectest fuzzing (#3454)
These are now required for the general suite of spec tests we're running
by default.
2021-10-15 10:40:42 -05:00
Alex Crichton
9c6884e28d Update the spec reference testsuite submodule (#3450)
* Update the spec reference testsuite submodule

This commit brings in recent updates to the spec test suite. Most of the
changes here were already fixed in `wasmparser` with some tweaks to
esoteric modules, but Wasmtime also gets a bug fix where where import
matching for the size of tables/memories is based on the current runtime
size of the table/memory rather than the original type of the
table/memory. This means that during type matching the actual value is
consulted for its size rather than using the minimum size listed in its
type.

* Fix now-missing directories in build script
2021-10-13 16:14:12 -05:00
Alex Crichton
f7543d3d10 Update docs of Module::serialize (#3448)
The docs hadn't been updated since `Module::deserialize` was added!
2021-10-12 09:47:12 -05:00
Chris Fallin
783bb1f759 Merge pull request #3443 from adv-sw/main
Fixes (indirectly) #3419 by providing debugger with ability to resolve sandbox pointers
2021-10-11 13:37:04 -07:00
Steve
807619a874 as requested: cargo fmt 2021-10-11 19:57:07 +01:00
Pat Hickey
8554d69e4b update userfaultfd to 0.4.1 (#3442)
which updates nix to 0.23.0, getting rid of the benign RUSTSEC-2021-0119
in our dep tree
2021-10-11 13:06:54 -05:00
Alex Crichton
713ce07d35 Add some debug logging for timing in module compiles (#3417)
* Add some debug logging for timing in module compiles

This is sometimes helpful when debugging slow compiles from fuzz bugs or
similar.

* Fix total duration calculation to not double-count
2021-10-11 12:50:15 -05:00
Steve
92a10d1ace Added resolve_vmctx_memory function to enable debuggers to resolve sandbox pointers - required because sandbox 'this' pointer cannot be resolved by lldb any other way as lldb expects "this" and "self" to be standard pointers, not sandbox handles. 2021-10-11 09:08:14 +01:00
Frank Denis
0ee1689e2f Update wasi-crypto crate
This pulls more recent versions of its dependencies.
2021-10-10 21:34:43 +02:00
bjorn3
d78f436daf Remove reloc_constant
It is no longer used by the new backends
2021-10-10 14:43:55 +02:00
Anton Kirilov
a986cf2438 Increase the default code section alignment to 64 KB for AArch64 targets (#3424)
Some platforms such as AArch64 Linux support different memory page
sizes, so we need to be conservative when choosing the code section
alignment (which is equal to the page size) by using the maximum.

Copyright (c) 2021, Arm Limited.
2021-10-07 12:49:40 -05:00
bjorn3
2db3b5b9df Remove code offsets from Function (#3412)
* Remove code offsets from Function

* Remove reloc_jt and fix wasmtime-cranelift
2021-10-07 15:54:00 +02:00
Alex Crichton
91482f39d0 Disable module linking in compilation fuzzer (#3416)
Module linking is otherwise covered by other fuzzers and by enabling
module linking it rejects more modules than necessary due to
restrictions on import strings.
2021-10-05 09:12:11 -05:00
Benjamin Bouvier
43a86f14d5 Remove more old backend ISA concepts (#3402)
This also paves the way for unifying TargetIsa and MachBackend, since now they map one to one. In theory the two traits could be merged, which would be nice to limit the number of total concepts. Also they have quite different responsibilities, so it might be fine to keep them separate.

Interestingly, this PR started as removing RegInfo from the TargetIsa trait since the adapter returned a dummy value there. From the fallout, noticed that all Display implementations didn't needed an ISA anymore (since these were only used to render ISA specific registers). Also the whole family of RegInfo / ValueLoc / RegUnit was exclusively used for the old backend, and these could be removed. Notably, some IR instructions needed to be removed, because they were using RegUnit too: this was the oddball of regfill / regmove / regspill / copy_special, which were IR instructions inserted by the old regalloc. Fare thee well!
2021-10-04 10:36:12 +02:00