Conversation
cfallin
left a comment
There was a problem hiding this comment.
Thanks for this! If I understand everything correctly, it looks like this mainly consists of (i) plumbing SourceLocs through everywhere to add_call_site on the CodeSink, and (ii) using udf instead of brk. The latter is perfectly fine. For the former: it's a somewhat intrusive API change, so I want to at least ask: what's the need that drives this, and what are the alternative options? Is this just enabling sensible stack-traces now, or does SpiderMonkey require the info for correctness? And in either case, would a full implementation of debug info provide the same benefit? (If so, given that we'll eventually do this, perhaps we could avoid changing the CodeSink API for now?)
* Add some basic sanity tests for Region This commit adds some basic sanity tests for `overlap` method of `Region`. * Refactor overlaps method of Region struct This commit refactors `Region::overlaps` method. * Add some docs * Assert Region's len is nonzero
Subscribe to Label ActionThis issue or pull request has been labeled: "cranelift", "cranelift:meta", "cranelift:module", "wasi" Users Subscribed to "cranelift"Users Subscribed to "wasi"To subscribe or unsubscribe from this label, edit the |
|
(Uh, we should disable the github actions on this fork, or empty the subscribe* JSON file.) Yeah, the sink change is actually an adaptation to make Spidermonkey integration easier in general: see also upstream PR and accompanying Spidermonkey patch (removes around 150 LOC and does things more smoothly!). No worries about rebasing, and I'll address your comments. Thanks for the quick look! |
|
One supplementary note: SourceLoc are needed for stack traces indeed, but |
|
(Sorry, this is not meant to be merged anymore; this is basically my WIP branch for all the changes.) |
1523230 to
13c0164
Compare
|
cc @cfallin it's now ready again! Note it has a few breaking changes, in particular it now uses the direct instruction |
|
Will rebase and merge, before any other merge conflicts show up. |
- properly pass WasmTlsReg and WasmTableCallSigReg in the new backend. - optionally pass source locations and record trap locations of loads/stores so out-of-bounds can be properly caught and pretty-printed. No source location means the load/store can't trap (because it's not a user memory access, or it's known to be aligned, etc.). - pass the opcode to ARM64ABICall so we can pass it to the RelocSink, and record calls with add_call_site (so indirect calls work).
* Integrate experimental HTTP into wasmtime. * Reset Cargo.lock * Switch to bail!, plumb options partially. * Implement timeouts. * Remove generated files & wasm, add Makefile * Remove generated code textfile * Update crates/wasi-http/Cargo.toml Co-authored-by: Eduardo de Moura Rodrigues <16357187+eduardomourar@users.noreply.github.com> * Update crates/wasi-http/Cargo.toml Co-authored-by: Eduardo de Moura Rodrigues <16357187+eduardomourar@users.noreply.github.com> * Extract streams from request/response. * Fix read for len < buffer length. * Formatting. * types impl: swap todos for traps * streams_impl: idioms, and swap todos for traps * component impl: idioms, swap all unwraps for traps, swap all todos for traps * http impl: idiom * Remove an unnecessary mut. * Remove an unsupported function. * Switch to the tokio runtime for the HTTP request. * Add a rust example. * Update to latest wit definition * Remove example code. * wip: start writing a http test... * finish writing the outbound request example havent executed it yet * better debug output * wasi-http: some stubs required for rust rewrite of the example * add wasi_http tests to test-programs * CI: run the http tests * Fix some warnings. * bump new deps to latest releases (#3) * Add tests for wasi-http to test-programs (#2) * wip: start writing a http test... * finish writing the outbound request example havent executed it yet * better debug output * wasi-http: some stubs required for rust rewrite of the example * add wasi_http tests to test-programs * CI: run the http tests * bump new deps to latest releases h2 0.3.16 http 0.2.9 mio 0.8.6 openssl 0.10.48 openssl-sys 0.9.83 tokio 1.26.0 --------- Co-authored-by: Brendan Burns <bburns@microsoft.com> * Update crates/test-programs/tests/http_tests/runtime/wasi_http_tests.rs * Update crates/test-programs/tests/http_tests/runtime/wasi_http_tests.rs * Update crates/test-programs/tests/http_tests/runtime/wasi_http_tests.rs * wasi-http: fix cargo.toml file and publish script to work together (#4) unfortunately, the publish script doesn't use a proper toml parser (in order to not have any dependencies), so the whitespace has to be the trivial expected case. then, add wasi-http to the list of crates to publish. * Update crates/test-programs/build.rs * Switch to rustls * Cleanups. * Merge switch to rustls. * Formatting * Remove libssl install * Fix tests. * Rename wasi-http -> wasmtime-wasi-http * prtest:full Conditionalize TLS on riscv64gc. * prtest:full Fix formatting, also disable tls on s390x * prtest:full Add a path parameter to wit-bindgen, remove symlink. * prtest:full Fix tests for places where SSL isn't supported. * Update crates/wasi-http/Cargo.toml --------- Co-authored-by: Eduardo de Moura Rodrigues <16357187+eduardomourar@users.noreply.github.com> Co-authored-by: Pat Hickey <phickey@fastly.com> Co-authored-by: Pat Hickey <pat@moreproductive.org>
First two commits are extracted from bytecodealliance#1460.
There's a spurious Cargo.lock update that was reappearing all the time, so eventually I committed it.
Two following commits (add support for add_call_site in testing + new-isel support for passing sourceloc) fill in the pieces to support the machinery introduced by the two first commits.
Last commit passes the special VMContext register (called WasmTlsReg in Spidermonkey, on arm64 it's x23) value to callees when it sees it.