Andrew Brown
31165d0e9b
Print more information about types that cannot be generated by wiggle
2020-09-21 10:26:26 -07:00
Andrew Brown
97e0f4864c
Fix typo
2020-09-21 10:26:26 -07:00
Pat Hickey
7bfc4597a0
Merge pull request #2201 from bytecodealliance/pch/wasi_common_move_type_imports
...
wasi-common: code motion around type imports
2020-09-16 14:48:25 -07:00
Joshua Nelson
d28abad441
Upgrade to target-lexicon 0.11
...
This allows downstream library users to use `CDataModel` without having
to install two different versions of target-lexicon.
2020-09-15 11:40:09 -07:00
Pat Hickey
b72d5de86c
virtfs: import types from handle, drop types:: prefix
2020-09-14 16:42:20 -07:00
Pat Hickey
4763678be2
sys: import types from handle or sched, not wasi. drop types:: prefix.
2020-09-14 16:42:20 -07:00
Pat Hickey
e5129b39cb
path: import types from handle rather than wasi
2020-09-14 16:42:20 -07:00
Pat Hickey
e47927f0fd
fs: only import wasi Fd type in one place
2020-09-14 16:42:20 -07:00
Pat Hickey
83c1fa1b8b
entry: import types from handle
2020-09-14 16:42:20 -07:00
Pat Hickey
5639881519
ctx: import Fd without any types:: prefix
2020-09-14 16:42:20 -07:00
Pat Hickey
66ba582bba
sched: re-export the wasi types used for times and events
2020-09-14 16:42:20 -07:00
Pat Hickey
6db24fd08f
handle: re-export all of the wasi types used by handles
2020-09-14 16:42:20 -07:00
Nick Fitzgerald
89f1e02f1f
Remove executable bits from a few Rust source files
2020-09-14 16:27:47 -07:00
Alex Crichton
b189321d61
Actually add instantiate-maybe-invalid fuzz target ( #2190 )
...
Forgot to add it to the manifest so it didn't actually get built!
2020-09-09 12:09:04 -05:00
Nick Fitzgerald
3a602994e6
Merge pull request #2185 from alexcrichton/fuzz-maybe-invalid
...
Expand modules instantiated in instantiate-wasm-smith
2020-09-08 17:05:46 -07:00
Alex Crichton
38428e1fbb
Expand modules instantiated in instantiate-wasm-smith
...
This commit uses the new `MaybeInvalidModule` type in `wasm-smith` to
try to explore more points in the fuzz target space in the
`instantiate-maybe-invalid` fuzz target. The goal here is to use the raw
fuzz input as the body of a function to stress the validator/decoder a
bit more, and try to get inputs we might not otherwise generate.
2020-09-08 14:29:27 -07:00
bjorn3
ba9908dd0f
Don't substract 1 from end_addr in line program writing ( #2174 )
...
* Don't substract 1 from end_addr in line program writing
Fixes #2173
* add testcase for end_sequence having offset past retq (#1 )
* Update tests/all/debug/translate.rs
Co-authored-by: Gabor Greif <ggreif@gmail.com >
Co-authored-by: Gabor Greif <ggreif@gmail.com >
2020-09-07 08:41:44 -05:00
Pat Hickey
776f12ae3c
tests: exercise array getters
2020-09-03 16:41:10 -07:00
Pat Hickey
580c236dee
wiggle: implement array get/get_range in terms of ptr/add/as_array
...
hard to get it wrong when you use the safe primitives i already made!
2020-09-03 16:40:45 -07:00
Pat Hickey
1d410d6559
move more constructor stuff into stringarray
2020-09-02 17:16:39 -07:00
Pat Hickey
39f1c9716c
restructure StringArrayWriter trait into StringArray struct
2020-09-02 14:11:32 -07:00
Pat Hickey
b63e974014
code review fixes
2020-09-02 13:39:32 -07:00
Pat Hickey
ddd50f7443
fix error report
2020-09-02 13:13:13 -07:00
Pat Hickey
7eb607b076
bugfix!
2020-09-02 10:55:27 -07:00
Pat Hickey
51d88f7899
wasi-common: move implementation of args, env methods into StringArrayWriter
2020-09-01 13:50:31 -07:00
Pat Hickey
6213a05c85
wiggle: add array indexing methods to GuestPtr<[T]>
2020-09-01 13:50:31 -07:00
Pat Hickey
87222d6db0
wasi-common: move GuestPtr deref out of path::get
2020-09-01 13:50:30 -07:00
Pat Hickey
20ccc11564
Merge pull request #2140 from bytecodealliance/pch/wasi_error_handling
...
wasi-common: refactor error types
2020-09-01 13:01:26 -07:00
Pat Hickey
c9ec60dcce
Merge pull request #2169 from bytecodealliance/pch/fix_wasmtime_wiggle
...
wiggle-wasmtime: witx paths should be relative to CARGO_MANIFEST_DIR,…
2020-08-31 10:05:04 -07:00
MaxGraey
a8f7041296
new implementations for nearest lib calls
...
use approach with copysign for handling negative zero
format
refactor for better branch prediction
move copysign back to internal branch
format
fix
use abs instead branches
better comments
switch arms for better branch prediction
2020-08-31 09:39:20 -07:00
Pat Hickey
335886134c
fix test
2020-08-28 17:11:11 -07:00
Pat Hickey
edefbf7c73
fix tests
2020-08-28 15:58:16 -07:00
Pat Hickey
22b427baa0
use WASI_ROOT env var to specify witx paths to wiggle macros
2020-08-28 15:42:51 -07:00
Pat Hickey
91dac9c7e8
wiggle: witx paths use shell expansion
...
instead of always being relative to CARGO_MANIFEST_DIR, each use site is
responsible for either putting that variable or another one (set by a
build.rs) at the start of witx paths.
2020-08-28 15:42:48 -07:00
Max de Danschutter
f1a5e55b98
Increase into-func to accept 16 arguments ( #2170 )
2020-08-28 10:39:48 -05:00
Pat Hickey
5c6ed0c736
wip - didnt have time to finish this before quittin time
2020-08-27 18:19:53 -07:00
Pat Hickey
4dabe3fad6
wasmtime-wasi: fix invocation of wasmtime_integration!
...
should use path relative to this crates's root
2020-08-27 16:12:20 -07:00
Pat Hickey
82d2a48896
wiggle-wasmtime: witx paths should be relative to CARGO_MANIFEST_DIR, not WASI_ROOT
...
the WASI_ROOT was leftover from when this code was part of `wig`.
2020-08-27 16:03:05 -07:00
Pat Hickey
393581b2ae
Merge branch 'main' into pch/wasi_error_handling
2020-08-26 17:26:03 -07:00
Gabor Greif
2632848491
Relocation of DW_OP_{bra, skip} instructions ( #2143 )
...
The fundamental problem is that the target distance of jump-like operations may change in the DWARF expression translation process. Intervening DW_OP_deref will expand to about 10 bytes, for example.
So the jumps must be relocated. We approach this task by inserting artificial LandingPad markers (new CompiledExpressionParts constructors) into the parsed vector at actual Jump targets.
LandingPads are identified by JumpTargetMarker tokens which are generated on the fly.
Additionally we now parse the Jump instructions. These also get their corresponding JumpTargetMarker token.
We bail in two situations:
frame_base is too complicated (i.e. itself contains Jump)
some jump distance in the original expression is fishy.
2020-08-26 17:19:03 -05:00
Pat Hickey
7e750845cd
Remove unnecessary check - fixed in std since Rust 1.38
...
issue now closed: https://github.com/rust-lang/rust/issues/63326
fix landed in a rollup: https://github.com/rust-lang/rust/pull/63380 merged aug 8, 2019
rust 1.38 beta cut on aug 15, 2019: https://blog.rust-lang.org/2019/08/15/Rust-1.37.0.html
minimum supported rust version for this repo is currently 1.41.
2020-08-25 17:27:47 -07:00
Pat Hickey
02aba548e1
Merge remote-tracking branch 'origin/main' into pch/wasi_error_handling
2020-08-25 15:22:51 -07:00
Pat Hickey
f54685d0bc
Merge pull request #2139 from bytecodealliance/pch/wasi_common_tracing
...
wasi-common: switch all logs from `log` to `tracing`
2020-08-25 15:09:53 -07:00
Pat Hickey
5e0ca3c13b
tracing: some windows fixes
2020-08-25 11:32:24 -07:00
Pat Hickey
930912f783
tracing fixes in unix poll; add some missing debug impls
2020-08-25 11:29:34 -07:00
Pat Hickey
963fe37eea
Update crates/wasi-common/src/sys/windows/path.rs
...
Co-authored-by: iximeow <git@iximeow.net >
2020-08-25 11:17:08 -07:00
Pat Hickey
fceea4e7d2
Update crates/wasi-common/src/sys/unix/mod.rs
...
Co-authored-by: iximeow <git@iximeow.net >
2020-08-25 11:16:48 -07:00
Gabor Greif
ec87aee147
Revert #2137 , the extra (seemingly leftover) DW_OP_deref is in fact essential ( #2156 )
...
* Revert "don't leave Deref bytecode for Code chunk (#2137 )"
This reverts commit 30b9e69136 .
* add explanation that DW_OP_deref is needed
2020-08-21 13:12:30 -05:00
Gabor Greif
6513e90914
use the obvious DW_OP_const4u for 0xffff_ffff ( #2154 )
...
No point in resorting to LEB128 encoding for such constants,
using the native `u32` is faster and more compact.
Adds `write_u32` method to facilitate this.
2020-08-21 08:16:09 -05:00
Johnnie Birch
0b67b22eda
Update renamed document lint for broken links
...
Renames intra_doc_link_resolution_failure to broken_intra_doc_links
2020-08-20 14:24:06 -07:00