Commit Graph

1139 Commits

Author SHA1 Message Date
ace7a19a7b apply base path update to wasi::path_filestat_get 2019-05-15 10:25:31 -07:00
03671ab5ac Merge #442
442: Fix/misc wasi fs issues r=MarkMcCaskey a=MarkMcCaskey

resolves #434 

Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>
2019-05-15 00:40:50 +00:00
216d09b7c7 Merge branch 'fix/misc-wasi-fs-issues' of github.com:wasmerio/wasmer into fix/misc-wasi-fs-issues 2019-05-14 17:40:09 -07:00
c402c0350c return EIO if internal data structures are corrupt 2019-05-14 17:39:19 -07:00
593255021d Merge branch 'master' into fix/misc-wasi-fs-issues 2019-05-14 16:42:42 -07:00
87d9940a23 implement readdir! 2019-05-14 16:33:54 -07:00
89f3998b49 Merge branch 'master' into feature/fix-default_compiler-compilation 2019-05-14 18:22:44 -05:00
bef9f1244a Return impl Compiler from default_compiler to fix compilation with features 2019-05-14 18:19:58 -05:00
3bf550055f rm from entry in fd_renumber -- thanks Brandon! 2019-05-14 15:10:01 -07:00
84ea25241a fix opening directories in path_open 2019-05-14 15:08:45 -07:00
5114d42237 fix borrowing warning on nightly 2019-05-14 14:05:41 -07:00
8bd9bbb508 chore(runtime-c-api) Update C/C++ header files. 2019-05-14 16:19:32 +02:00
f04e77323b fix(runtime-c-api) Update wasmer_export_func_params_arity signature.
The `returns_len` argument type of `wasmer_export_func_returns_params`
must be `uint32_t` to match the `wasmer_export_func_returns_arity` results,
so that casts are not required.
2019-05-14 16:18:41 +02:00
53661385ed chore(runtime-c-api) Update C/C++ header files. 2019-05-14 16:17:13 +02:00
91006bab53 fix(runtime-c-api) Update wasmer_export_func_params_arity signature.
The `params_len` argument type of `wasmer_export_func_params_arity`
must be `uint32_t` to match the `wasmer_export_func_*_arity` results,
so that casts are not required.
2019-05-14 16:15:36 +02:00
2b250c30f3 chore(runtime-c-api) Regenerate C/C++ header files. 2019-05-14 11:50:10 +02:00
f68379a6df test(runtime-c-api) Use *_arity variables when calling wasmer_export_func_call. 2019-05-14 11:49:40 +02:00
d3c75a38fa fix(runtime-c-api) wasmer_instance_call types matches wasmer_export_func_*_arity.
The `wasmer_export_func_params_arity` and
`wasmer_export_func_returns_arity` functions store the arity in a
`uint32_t`. The `wasmer_instance_call` expects `c_int`. There is a
type mismatch here. It's not annoying in C or C++, but in some other
languages that have bindings to C/C++, it can imply useless casting.

This patch changes `wasmer_instance_call` to expect `uint32_t` for
`params_len` and `results_len` to match the
`wasmer_export_func_*_arity` functions.
2019-05-14 11:46:43 +02:00
19eba19603 Merge branch 'master' into doc-runtime-c-api
# Conflicts:
#	lib/runtime-c-api/src/lib.rs
2019-05-13 15:55:20 -07:00
8218e550fc Improved docs and fixed few typos 2019-05-13 11:18:57 -07:00
5a6cb96714 Merge branch 'master' into docs/better-runtime-docs
# Conflicts:
#	lib/runtime-core/src/vm.rs
2019-05-13 11:08:00 -07:00
b050144898 Merge branch 'master' into fix-runtime-c-api-error-length 2019-05-13 10:59:11 +02:00
8c8586faaa test(runtime-c-api) Assert returned value from wasmer_last_error_message. 2019-05-13 10:52:55 +02:00
bedd305b06 doc(runtime-c-api) Fix inline comment. 2019-05-13 10:52:43 +02:00
b2227314a7 Merge #436
436: Add deny for unreachable patterns and unused unsafe r=syrusakbary a=bjfish



Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
2019-05-12 22:16:44 +00:00
2aefa731a6 Add deny for unreachable patterns and unused unsafe 2019-05-12 00:33:02 -05:00
a96d5cb975 Fix f32/f64 conversion, add tests, and rename conversion method 2019-05-11 19:26:17 -05:00
85158ac22a Add some initial deny for unused_imports and unused_variables
Additional unused variable fix on unix

Remove unused import on unix

Remove unused windows import
2019-05-11 09:23:25 -05:00
02f3349cb1 clean up, update changelog 2019-05-10 10:58:06 -07:00
a527154c62 major improvements to wasi fs calls; include explanation in unimpl!s 2019-05-10 10:54:36 -07:00
7d2721ef7a fix(runtime-c-api) wasmer_last_error_message returns the length + 1.
Returning the error message's length + 1 mimics the
`wasmer_last_error_length` function that counts the trailing null
byte.
2019-05-10 16:00:13 +02:00
1d555301f7 feat(runtime-c-api) Check buffer size before creating the slice.
It's safer to check the buffer size is large enough to hold the error
message before creating the slice from raw parts.

Also, this patch remove the need for `last_error`, simplifying the
code a little bit. The `length` variable is casted to `usize` once.
2019-05-10 15:55:02 +02:00
1f99ef8377 implement some FS operations for rsign2 2019-05-09 16:01:36 -07:00
080220c6a7 Merge branch 'master' into feature/llvm-cgapi 2019-05-08 17:33:06 -07:00
36a78a23b6 Fix Windows crash on caching compiled artifact.
Memory clone function wasn't able to write to new reserved memory object.

Changed so allocating Memory objects with protection flag allocates commited memory.
2019-05-08 15:59:00 +02:00
54095fcd67 Clean up commented out code in LLVM codegen 2019-05-07 22:53:48 -05:00
e53d5a91ca Remove transmutes. 2019-05-07 19:20:18 +08:00
9c0cbc9775 Remove previous LLVM parser code 2019-05-06 23:41:31 -05:00
87a94657d0 Merge branch 'master' into feature/llvm-cgapi 2019-05-06 22:39:20 -05:00
e5dc94c7d6 update version number to 0.4.1 2019-05-06 18:02:39 -07:00
e40b4a2c39 fix debug code 2019-05-06 14:58:44 -07:00
94e6c7318f Merge #424
424: Update emscripten to run JSC r=syrusakbary a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-05-06 21:19:27 +00:00
91d01d1c05 clean up warnings 2019-05-06 14:17:23 -07:00
ab184aceea Update emscripten to run JSC 2019-05-06 14:05:04 -07:00
704c783b54 Merge #414
414: Exception logging (win32): Handle error codes correctly, add some more strings r=syrusakbary a=hrydgard

Ran into a situation with an unknown exception from Cranelift (will probably report that one separately). Turns out the signum was "1" though which does not seem to correspond to any of the Windows error codes, except possibly STATUS_GUARD_PAGE which is 0x80000001, but only if we lost the top bit somewhere.

On Windows, exceptions seemed to be trapped by callProtected, which is implemented here: cade9a666f/lib/win-exception-handler/exception_handling/exception_handling.c . It did not seem to correctly store and retrieve the exception code, instead always returning 1: ```longjmp(jmpBuf, 1);```

So I fixed it. And now the log output looks like this:

```
unhandled trap at 1560d5e7bab - code #c0000005: segmentation violation
```


Co-authored-by: Henrik Rydgård <henrik.rydgard@embark-studios.com>
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
Co-authored-by: Mackenzie Clark <mackenzie.a.z.c@gmail.com>
2019-05-06 19:54:21 +00:00
089aab296d codegen: Remove unused LoadError import
Rustc complains that:

  warning: unused import: `parse::LoadError`
   --> lib/runtime-core/src/codegen.rs:7:5
    |
  7 |     parse::LoadError,
    |     ^^^^^^^^^^^^^^^^
    |
2019-05-06 20:42:35 +03:00
10b4a08ca6 Merge branch 'master' into improve-exception-logging 2019-05-06 08:09:24 -07:00
0926a5020e Implement caching for parser refactor 2019-05-05 20:11:47 -05:00
8f345e9e8c Fixed ioctl in Unix. Fixed provied main arguments 2019-05-05 13:55:40 -07:00
789af39f9e Improved ioctl calls 2019-05-05 12:31:31 -07:00