Commit Graph

1520 Commits

Author SHA1 Message Date
losfair
f81464142a Fix unused import error on Windows. 2019-06-26 12:56:37 +08:00
losfair
1bdf0d5ad7 Fix clippy error. 2019-06-26 12:50:34 +08:00
losfair
03e6311446 Require backend:singlepass for suspend/resume. 2019-06-26 12:46:01 +08:00
losfair
9b4343eac5 Fix compilation on Linux. 2019-06-26 12:33:50 +08:00
losfair
2373d371ae Optimize backtraces. 2019-06-26 11:28:46 +08:00
Nick Lewycky
70247a0c6e Simplify construction of floating point constants. 2019-06-25 16:05:22 -07:00
Nick Lewycky
55394b4f06 Void type in llvm may only be used as a function return type. You may not form a pointer to void or use it as a structure member.
Fixes assertion failure initializing llvm backend.
2019-06-25 16:05:22 -07:00
losfair
2730efcc6c Cargo fmt 2019-06-26 01:39:30 +08:00
losfair
0937e53801 Fully persist program state. 2019-06-26 01:38:39 +08:00
losfair
3f2aeec9bc Suspend & restore. 2019-06-25 20:01:56 +08:00
Syrus
d4634dfdb9 Removed unused llvm file 2019-06-25 01:40:15 -07:00
losfair
8303853227 Cargo fmt 2019-06-25 03:56:20 +08:00
losfair
fb7c3eee8a Improve stack trace collection and rendering. 2019-06-25 03:55:33 +08:00
Mark McCaskey
09177ac3ae update version numbers to 0.5.1, add changelog entry 2019-06-24 12:45:40 -07:00
losfair
73eb04d269 Merge remote-tracking branch 'origin/master' into feature/osr 2019-06-24 23:35:47 +08:00
Nick Lewycky
3e0a2a05e2 Fix typo in panic! 2019-06-18 15:15:49 -07:00
Nick Lewycky
e3af924391 Fix typo in comment. No functionality change. 2019-06-18 15:00:19 -07:00
Mark McCaskey
7bdfb2be51 update version numbers and changelog for 0.5.0 2019-06-17 12:56:28 -07:00
Syrus
5c64d8053f Merge branch 'master' into command/pyodide
# Conflicts:
#	CHANGELOG.md
2019-06-14 10:32:16 +02:00
Syrus
6467816ea8 Fixed asseertion of alignment 2019-06-14 10:27:06 +02:00
Syrus Akbary
13a2773372
Merge branch 'master' into command/pyodide 2019-06-14 10:09:53 +02:00
Ivan Enderlin
04c9d25194
Merge branch 'master' into fix-runtime-c-api-warnings 2019-06-14 10:07:53 +02:00
Syrus
95f39cedec Fixed last linting issues
(hopefully)
2019-06-14 09:53:07 +02:00
Syrus
b9fa698a73 Assert alignment 2019-06-13 21:53:37 +02:00
Syrus
4059562560 Updated nightly version 2019-06-13 21:37:55 +02:00
Syrus
86b78c6b14 Fixed clippy issues 2019-06-13 21:32:05 +02:00
Syrus
7ebb90527c Fixes remaining clippy issues 2019-06-13 21:23:41 +02:00
Syrus
675caf042c Various lint fixes 2019-06-13 21:01:37 +02:00
Syrus
1560849e40 Fix lint errors and windows build 2019-06-13 20:46:05 +02:00
Syrus
8829e1d901 Make Python running 🎉 2019-06-13 14:05:57 +02:00
Syrus
58d75868f4 Fixed syscall220 alignment 2019-06-13 12:17:17 +02:00
Jesús Leganés-Combarro 'piranna
f12d6f8dd2 Merge branch 'command/pyodide' of github.com:wasmerio/wasmer into command/pyodide 2019-06-12 23:26:02 +02:00
Jesús Leganés-Combarro 'piranna
cc740040d2 Merge branch 'master' into command/pyodide 2019-06-12 22:52:05 +02:00
losfair
9585b89705 Fix bugs in state reading. 2019-06-12 23:54:15 +08:00
losfair
32008eba88 Read stack values based on state map. 2019-06-12 22:02:15 +08:00
Ivan Enderlin
63ec73aacc fix(runtime-c-api) Remove deprecated types from libc.
Since https://github.com/rust-lang/libc/pull/1379, fixed width integer
type aliases are deprecated. Thus, this patch uses Rust types instead
of libc aliases.
2019-06-12 12:10:49 +02:00
Ivan Enderlin
81d8e4ee2e feat(runtime-c-api) Improve error message when compiling a module. 2019-06-12 11:35:29 +02:00
losfair
00b6bf632a Dumping stack through import. 2019-06-12 13:38:58 +08:00
Syrus
109acd2fa3 Trying to fix ___syscall220 2019-06-12 01:01:47 +02:00
Syrus
6ce4f5dca4 Minor fixes 2019-06-12 00:13:06 +02:00
losfair
ddd0653a25 Make singlepass backend emit state mapping information. 2019-06-12 00:21:43 +08:00
Syrus
0b416e14c3 Improved syscall220 debug 2019-06-11 17:38:16 +02:00
losfair
da9bf05218 Machine state diff 2019-06-11 20:49:30 +08:00
Mark McCaskey
b36783fc50 remove duplicated code, wrap WasmPtr on wasi side 2019-06-11 11:10:42 +02:00
Mark McCaskey
7965ed2746 fix newly introduced bug in wasmptr array access 2019-06-10 13:32:33 +02:00
Jesús Leganés-Combarro 'piranna
d165763b4d Merge branch 'master' into command/pyodide 2019-06-10 12:35:11 +02:00
Mark McCaskey
7a66a5285d
Merge branch 'master' into feature/better-memory-access-for-emscripten 2019-06-10 03:26:50 -07:00
Brandon Fish
c6786474a7 Add MiddlewareChain and StreamingCompiler to runtime 2019-06-09 23:24:10 -05:00
losfair
082b8376ae State representation. 2019-06-09 21:21:18 +08:00
Jesús Leganés-Combarro 'piranna
5d93d9a904 Added fb and gb symbols 2019-06-08 19:53:21 +02:00
Jesús Leganés-Combarro 'piranna
ff21d9e95f Merge branch 'master' into command/pyodide 2019-06-08 19:48:25 +02:00
losfair
61786a370a Fix typo in machine. 2019-06-08 22:56:13 +08:00
laizy
1780d57df1 add Mechine::release_locations_keep_state test 2019-06-08 22:25:20 +08:00
laizy
8105c0c16f fix stack offset check 2019-06-08 15:03:56 +08:00
Brandon Fish
f6ecfa40cb
Merge branch 'master' into feature/metering 2019-06-06 23:33:31 -05:00
Brandon Fish
e87d507162 Add black_box to benchmarking 2019-06-06 23:30:31 -05:00
Brandon Fish
418764a15f Add get/set gas used for benchmark 2019-06-06 23:25:11 -05:00
Syrus Akbary
98e04193af
Merge branch 'master' into feature/better-memory-access-for-emscripten 2019-06-06 18:03:55 -07:00
Mark McCaskey
811acd7e68 probably actually fix the wasi ptr array bug now 2019-06-06 16:19:15 -07:00
Mark McCaskey
d7ea46bab7 add wasmptr memory abstraction to emscripten; update wasi array access 2019-06-06 15:45:19 -07:00
Mark McCaskey
6f633cee6f fix pointer casting lint in emscripten syscall191 2019-06-06 12:07:19 -07:00
Mark McCaskey
8df63b1b6e fix bugs in emscripten socket syscalls 2019-06-06 11:55:05 -07:00
Jesús Leganés-Combarro 'piranna
a9bcb7d932 Merge branch 'master' into command/pyodide 2019-06-06 18:41:06 +02:00
losfair
c6cd49a370 Support getting/setting metering points and internal fields with a Ctx. 2019-06-06 14:10:57 +08:00
Brandon Fish
27eacf0c4f Add metering benchmark 2019-06-06 00:37:04 -05:00
losfair
f5243aff5e Cargo fmt 2019-06-05 11:52:25 +08:00
losfair
f2d8aad73a Support checking the execution limit exceeded error. 2019-06-05 11:51:33 +08:00
losfair
0867208e0c Implement {get,set}_points_used. 2019-06-05 02:28:19 +08:00
losfair
69944c1dc2 Fix ctx layout in LLVM. 2019-06-05 02:13:10 +08:00
losfair
66dcec91c4 Add comments for trampoline_x64. 2019-06-05 01:59:20 +08:00
losfair
f4df568e41 Naming fixes and documentation for trampoline API. 2019-06-05 01:38:35 +08:00
losfair
f1b27d5774 Cargo fmt 2019-06-05 01:26:35 +08:00
losfair
669f76025c Add callinfo trampoline into the C API. 2019-06-05 01:25:37 +08:00
losfair
b2869e181c Cargo fmt 2019-06-05 01:11:54 +08:00
losfair
8a74399c6e Add callinfo trampoline support. 2019-06-05 01:11:10 +08:00
losfair
06280e225e Fix unused_imports error on lazy_static. 2019-06-03 15:31:42 -07:00
losfair
0a44add31c Fix clippy errors. 2019-06-03 15:31:42 -07:00
losfair
d70cb9695e Add trampoline-related functions to C API. 2019-06-03 15:31:42 -07:00
losfair
7808c68cb2 Cargo fmt 2019-06-03 15:31:42 -07:00
losfair
ae19e7f71b Trampoline for calling with context. 2019-06-03 15:31:42 -07:00
Brandon Fish
66f9049a06 Reset LLVM related code to master 2019-06-02 19:36:26 -05:00
Brandon Fish
0c3109fb55 Update Makefile and test configuration 2019-06-02 15:43:02 -05:00
Brandon Fish
8fdc4f9bc2 Start documenting Metering 2019-06-02 15:42:25 -05:00
Brandon Fish
f9c8f41232 Remove points_limit and update tests 2019-06-02 13:37:51 -05:00
Brandon Fish
c020c39193 Move get/set points used to middleware 2019-06-02 13:21:00 -05:00
Brandon Fish
e533a8a7b5 Add tests for metering, add option to compiler config 2019-06-02 11:37:02 -05:00
Brandon Fish
995ecefa92 Cargo fmt 2019-06-02 09:49:21 -05:00
Brandon Fish
f029ea6231 Merge branch 'master' into feature/metering 2019-06-02 09:31:34 -05:00
Jesús Leganés-Combarro 'piranna
222b582207 Merge remote-tracking branch 'origin/master' into command/pyodide 2019-06-02 14:10:25 +02:00
Brandon Fish
3a00f779e8 Try using dependency git revision to see if it fixes CI dependency error 2019-06-01 15:29:49 -05:00
Brandon Fish
2860c4996c
Merge branch 'master' into feature/clif-cgapi 2019-06-01 12:04:20 -05:00
Brandon Fish
fd373dbf63 Add cache store, load, and execute test for cranelift and llvm 2019-06-01 11:35:26 -05:00
Brandon Fish
0567032bef
Merge branch 'master' into feature/clif-cgapi 2019-05-31 23:40:42 -05:00
losfair
c1e817b3fb Add missing relaxed moves. 2019-05-31 19:29:28 +08:00
losfair
8019505e65 Merge remote-tracking branch 'origin/feature/clif-cgapi' into feature/metering 2019-05-31 15:40:05 +08:00
losfair
b834b4ff36 Metering for LLVM. 2019-05-31 15:36:08 +08:00
Mark McCaskey
6a9515d13d improve wasi envvar test 2019-05-30 12:25:14 -07:00
Mark McCaskey
2a94a6933f add envvar opt, add test, rm binaries from wasitests, clean up 2019-05-30 11:58:52 -07:00
Brandon Fish
b2e37cecfa
Merge branch 'master' into feature/clif-cgapi 2019-05-29 22:45:31 -05:00
Mark McCaskey
792ebc06fc fix bug in wasi::environ_get, fix off by one error in env_size_get 2019-05-29 18:04:55 -07:00
Mark McCaskey
281c5ff45d fix bugs in em mapdir, improve it for relative paths, use it more 2019-05-29 14:20:52 -07:00
Mark McCaskey
7a7aa4608a fix emscripten regression tests 2019-05-29 11:41:29 -07:00
losfair
fd8675324c Merge remote-tracking branch 'origin/master' into feature/metering 2019-05-29 11:16:05 +08:00
Mark McCaskey
6606a7c7b0 silence clippy on pointer alignment 2019-05-28 14:06:24 -07:00
Mark McCaskey
f8b94b7469 Merge remote-tracking branch 'origin/master' into feature/add-mapdir-for-emscripten 2019-05-28 13:48:12 -07:00
Mark McCaskey
3a4517d5d6 clean up code, verify it behaves the same as emscripten with js 2019-05-28 10:06:22 -07:00
Jesús Leganés-Combarro 'piranna
b78a8af228 Added missing functions for pyodide
Since Pyodide is focused on running on desktop, this pull-request lacks
Javascript runtime functions. It also sorted alphabetically some functions
2019-05-28 09:39:49 +02:00
Syrus
fe3db46173 Fixed time ptr 2019-05-27 12:47:15 -07:00
Syrus
12299cdbf0 Merge branch 'master' into feature/jq 2019-05-27 12:13:19 -07:00
Syrus
6fd6ad92fa Trying to fix timegm 2019-05-27 12:09:04 -07:00
Brandon Fish
921e95035f Cleanup expect messages used for debugging 2019-05-26 22:50:23 -05:00
Brandon Fish
00707ea849 Cleanup cranelift validation 2019-05-26 22:44:37 -05:00
Brandon Fish
3f0cafce5c Remove old Cranelift compiler code 2019-05-26 22:32:11 -05:00
Brandon Fish
bf1cfc2578 Re-enable deny warnings in clif backend 2019-05-26 22:17:49 -05:00
Brandon Fish
f42ca84480 Add calling convention to function signatures 2019-05-26 14:44:17 -05:00
Brandon Fish
cc4b1871d0 Fix get global type 2019-05-26 14:15:30 -05:00
Brandon Fish
8069cdac16 Merge branch 'master' into feature/clif-cgapi 2019-05-26 12:04:45 -05:00
Brandon Fish
6ca311f92d Fix compilation errors and warnings 2019-05-26 11:13:37 -05:00
Brandon Fish
5da0c4766a Update to Arc<RwLock<ModuleInfo>> for interior mutability 2019-05-25 19:30:44 -05:00
Brandon Fish
d440776bc0 Update lifetime of function builder references 2019-05-25 18:06:41 -05:00
Mark McCaskey
fc15bc58f6 add mapdir for emscripten; implement getdents, etc. 2019-05-24 18:00:07 -07:00
Johan Andersson
8018453266 Update wasmparser 0.29.2 -> 0.30.0 2019-05-24 23:18:08 +02:00
Syrus
dd30595358 Trying to fix issues 2019-05-24 13:30:41 -07:00
Syrus
dd9c5774f3 Separate fpathconf from pathconf 2019-05-24 12:15:52 -07:00
Syrus
c7dceba0d8 Improved formatting 2019-05-24 12:09:00 -07:00
Syrus
e0895aadf1 Merge branch 'master' into feature/jq 2019-05-24 12:08:28 -07:00
Syrus Akbary
4dab51f620
Merge branch 'master' into feat-runtime-error 2019-05-24 11:18:50 -07:00
Syrus
02a92562f6 Removed zbox requirement 2019-05-24 10:13:08 -07:00
Ivan Enderlin
90676b5c5b feat(runtime-c-api) wasmer_instantiate raises the source error.
Instead of returning only “error instanting”, `wasmer_instantiate` can
return the real error message.
2019-05-24 14:24:00 +02:00
Brandon Fish
9f2e068ff4 Implement conversion of signatures into clif signatures 2019-05-23 20:04:55 -05:00
Syrus Akbary
dc6092edd5
Merge branch 'master' into feature/jq 2019-05-23 09:50:02 -07:00
losfair
68a8800f99 Temporarily use the original zbox. 2019-05-23 20:28:57 +08:00
losfair
9919dd73c8 Merge remote-tracking branch 'origin/master' into feature/metering 2019-05-23 20:18:11 +08:00
losfair
dcf52ef1a7 Cargo fmt 2019-05-23 20:10:34 +08:00
losfair
cf58305889 Dynamically allocate internal fields. 2019-05-23 20:10:17 +08:00
Brandon Fish
a713043360 Update translate_operator op argument 2019-05-22 23:46:38 -05:00
Mark McCaskey
dc3ac156a4 add test, update changelog 2019-05-22 15:57:12 -07:00
Mark McCaskey
b7abc44648 Prevent parent directory from being opened without being preopened wasi 2019-05-22 15:30:38 -07:00
Brandon Fish
5d3f6ea167 Fixing lifetime issues in clif codegen refactor 2019-05-22 17:21:16 -05:00
Ivan Enderlin
11f1bbaf9a chore(runtime-c-api) Update C/C++ header files. 2019-05-22 16:45:59 +02:00
Ivan Enderlin
c92230e18e fix(runtime-c-api) Lengths cannot be negative.
This patch prevents receiving negative length in various places.
2019-05-22 16:44:03 +02:00
Brandon Fish
04d6ccc95c Pass module info to FCG as Arc 2019-05-21 23:44:31 -05:00
Syrus
f79ff8b542 Merge branch 'master' into feature/jq 2019-05-21 17:15:12 -07:00
bors[bot]
32c2ad1916 Merge #447
447: add trace macro for more verbose debug statements r=MarkMcCaskey a=MarkMcCaskey

The next step is to implement these in terms of `log`

Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>
2019-05-21 19:28:34 +00:00
Mark McCaskey
3bedf6218c
Merge branch 'master' into feature/trace-macro 2019-05-21 11:44:50 -07:00
bors[bot]
699d65bddb Merge #459
459: add realtime and monotonic clock support for wasi on windows r=MarkMcCaskey a=MarkMcCaskey

resolves #455 

Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-05-21 18:36:08 +00:00
bors[bot]
7b9e289f68 Merge #456
456: Command/openssl r=syrusakbary a=piranna

Mocks for missing functions needed by `openssl` command.

Co-authored-by: Jesús Leganés-Combarro 'piranna <piranna@gmail.com>
2019-05-21 18:23:59 +00:00
Mark McCaskey
deb00c886c change to depend on winapi only on windows 2019-05-21 11:23:24 -07:00
Mark McCaskey
8857e6d320 move check with debug build higher in CI, fix bug in debug macro 2019-05-21 11:15:13 -07:00
Mark McCaskey
e989a86d33 properly handle bad input on windows clocks 2019-05-21 10:55:54 -07:00
Mark McCaskey
2a30fc3f1b wrap call in unsafe, unconditionally depend on winapi 2019-05-21 10:41:40 -07:00
Mark McCaskey
736bddfe17 debug log error in windows clock, conditionally pull in winapi 2019-05-21 10:35:51 -07:00
Mark McCaskey
08b4b639f4 add realtime and monotonic clock support for wasi on windows 2019-05-21 10:24:06 -07:00
Jesús Leganés-Combarro 'piranna
490b94b814 Fix linting 2019-05-21 19:12:35 +02:00
Mark McCaskey
6b81ec0aa7 add mapdir regression test; add testfs; add arg passing system 2019-05-20 17:43:50 -07:00
Mark McCaskey
7cc967e709 flip order of args in mapdir 2019-05-20 16:46:08 -07:00
Mark McCaskey
be4dd453c2 clean up and fix bugs 2019-05-20 16:39:02 -07:00
Mark McCaskey
97a2237255
Merge branch 'master' into feature/map-dir 2019-05-20 15:23:13 -07:00
Mark McCaskey
f2001fea50 fix file creation ts for WASI Linux 2019-05-20 15:02:22 -07:00
Mark McCaskey
d7d17bd647 add expect to call entrypoint in wasi tests 2019-05-20 13:55:29 -07:00
Jesús Leganés-Combarro 'piranna
34e16d4a84 Move ucontext related functions to their own namespace 2019-05-20 22:54:58 +02:00
Mark McCaskey
7a4b47d651 update compiled tests 2019-05-20 13:28:31 -07:00
Mark McCaskey
2c5f72805e fix WASI clock bugs 2019-05-20 11:01:28 -07:00
Mark McCaskey
8a177363f4 fix file metadata wasi test 2019-05-20 09:24:55 -07:00
Brandon Fish
5db575e8ef Fix clif_signatures in function codegen 2019-05-19 15:22:02 -05:00
Brandon Fish
db669f7eb7 Fix more codegen compilation issues 2019-05-19 15:01:25 -05:00
Jesús Leganés-Combarro 'piranna
8995060f9b Mocks for _getcontext, _makecontext, _setcontext and _swapcontext 2019-05-19 20:53:24 +02:00
Jesús Leganés-Combarro 'piranna
f8cfb04e29 _alarm() 2019-05-19 20:24:49 +02:00
Jesús Leganés-Combarro 'piranna
2eb5ca1e48 _gai_strerror() 2019-05-19 20:16:00 +02:00
Brandon Fish
d547beda72 Fix self.info compilation error in MCG.finalize 2019-05-19 13:05:35 -05:00
Jesús Leganés-Combarro 'piranna
7690febe77 getnameinfo() 2019-05-19 19:37:57 +02:00
Jesús Leganés-Combarro 'piranna
ad8178bb2a [pthread] rwlock_destroy(), rwlock_init() and rwlock_wrlock() 2019-05-19 19:16:04 +02:00
Brandon Fish
e34e625009 Implement MCG.next_function in other backends 2019-05-19 11:45:16 -05:00
Brandon Fish
47479b547f Implement MCG.{finalize, from_cache} 2019-05-19 10:53:33 -05:00
Brandon Fish
6d5dd5ff21 Implement more function codegen 2019-05-19 00:27:39 -05:00
Brandon Fish
2d10306c87 Add copyright notice 2019-05-18 16:32:22 -05:00
Brandon Fish
74a758d39e Add progress on next_event 2019-05-18 16:31:08 -05:00
Syrus
8f345dc284 Updated imports required for jq. Added get_str method in VarArgs 2019-05-18 12:38:22 -07:00
Mark McCaskey
4b03abafcc
Merge branch 'master' into feature/map-dir 2019-05-17 16:24:26 -07:00
Mark McCaskey
4760840a77 move stdout capture from runtime core to dev-utils 2019-05-17 15:48:30 -07:00
Mark McCaskey
542e47ff82 add more wasi tests 2019-05-17 15:31:02 -07:00
Mark McCaskey
b3b5716dbb add files in runtime_Core 2019-05-17 13:31:41 -07:00
Mark McCaskey
ec9c5360ef move stdio capture into runtime_core; rm emscripten dep in wasi 2019-05-17 13:30:10 -07:00
Mark McCaskey
b9bb310215 add wasi regression test system 2019-05-17 12:09:31 -07:00
Mark McCaskey
f9beef276d implement map-dir for WASI; fix bug in path_open 2019-05-16 17:35:13 -07:00
Syrus
4ddffb8285 Update libraries versions to 0.4.2 2019-05-16 14:39:13 -07:00
losfair
6aec1c4b5f Use INTERNALS_SIZE 2019-05-17 01:33:33 +08:00
losfair
8e0d71b2bc Fix missing internals in test. 2019-05-17 01:32:41 +08:00
losfair
b830f10fa0 Update metering data on return 2019-05-17 01:20:09 +08:00
losfair
14fcd78b30 Update bin/wasmer and run cargo fmt. 2019-05-17 01:15:05 +08:00
losfair
e7297b9465 Update singlepass backend to support metering. 2019-05-17 01:11:22 +08:00
losfair
7e79dd2cfe Metering middleware. 2019-05-17 01:10:45 +08:00
losfair
6aa87a0bbf Add the internals field and necessary structures for metering. 2019-05-17 01:10:21 +08:00
losfair
100039afd6 Merge remote-tracking branch 'origin/master' into feature/remote-code-load 2019-05-16 09:28:02 +08:00
losfair
b28992932e Rename wasmer-kernel-net to kernel-net. 2019-05-16 09:22:40 +08:00
Mark McCaskey
83deae80dc update changelog; clean up 2019-05-15 15:16:52 -07:00
Mark McCaskey
b2752735db avoid opening files when not needed in WASI, check for write permissions 2019-05-15 15:11:29 -07:00
Mark McCaskey
a9f643f774 add trace macro for more verbose debug statements 2019-05-15 11:46:17 -07:00
Syrus
3bbf7753cb Renamed kwasm-net to wasmer-kernel-net 2019-05-15 10:34:56 -07:00
Mark McCaskey
ace7a19a7b apply base path update to wasi::path_filestat_get 2019-05-15 10:25:31 -07:00