Commit Graph

3197 Commits

Author SHA1 Message Date
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
8130eb1e14 Merge #435
435: Fix f32/f64 conversion, add tests, and rename conversion method r=syrusakbary a=bjfish

Fixes #415

I believe removing this conversion here caused the regression: https://github.com/wasmerio/wasmer/pull/379/files#diff-5e7e23717d05d1d18be5b2e3b75f454dL158

I've added conversion tests and also renamed `NativeWasmType::{to_bits, from_bits}` to `to_binary/from_binary` because it seemed akward to overload the existing `f32::to_bits` method.

Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
2019-05-12 19:29:40 +00:00
d9cd4fc3e0 Add scaffold to use new code generator API for Cranelift 2019-05-12 11:05:26 -05: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
8d2a08a1be Merge #430
430: Add some initial deny for unused_imports and unused_variables r=bjfish a=bjfish



Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
2019-05-11 15:34:02 +00: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
fa5402580f Merge #429
429: implement some FS operations for rsign2 r=MarkMcCaskey a=MarkMcCaskey

Get https://github.com/jedisct1/rsign2 working with WASI on Wasmer (for end-to-end tests of wapm)

Current implementation is very hacky, but works!  It should have a couple passes of improvement before shipping

Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-05-10 17:59:01 +00: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
7f61eafe05 Merge #413
413: Use the new code generator API for LLVM backend. r=syrusakbary a=losfair



Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
Co-authored-by: losfair <zhy20000919@hotmail.com>
Co-authored-by: Brandon Fish <bjfish@users.noreply.github.com>
2019-05-09 20:14:39 +00:00
080220c6a7 Merge branch 'master' into feature/llvm-cgapi 2019-05-08 17:33:06 -07:00
9a831b7aba Merge #428
428: Fix Windows crash on caching compiled artifact. r=syrusakbary a=repi

Memory clone function wasn't able to write to new reserved memory object.

Changed so allocating Memory objects with protection flag allocates commited memory. And added unit test to verify that it doedsn't crash anymore.

Not fully sure this is the best solution though, but fixes this specific clone crash.

Co-authored-by: Johan Andersson <repi@repi.se>
2019-05-08 17:47:18 +00:00
620a6ddd85 Disable memory bound checking for kernel loader. 2019-05-08 10:25:29 -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
43bf83cd09 Add LLVM backend parser update entry to changelog 2019-05-07 22:46:04 -05:00
accb80bca2 Pipe example 2019-05-07 10:48:50 -07:00
0bbd6e6970 Fix function offset. 2019-05-07 08:25:46 -07:00
3d16ad1ca1 Merge branch 'master' into feature/llvm-cgapi 2019-05-07 10:16:20 -05:00
1f028e9aab Merge pull request #420 from wasmerio/add-wapm-section-to-readme
Add wapm section to README
0.4.1
2019-05-07 07:36:09 -07: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
c90224621e updated wapm-cli to 0.2.0 tag (#427) 2019-05-06 20:14:37 -07:00
a4129123c4 Merge #426
426: Update0.4.1 r=MarkMcCaskey a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-05-07 01:17:06 +00:00
2d4299b325 update for 0.4.1 2019-05-06 18:14:53 -07:00
e5dc94c7d6 update version number to 0.4.1 2019-05-06 18:02:39 -07:00
8b51a0530f address feedback; clarify URL 2019-05-06 16:41:59 -07:00
e42eb3753e Merge pull request #425 from wasmerio/fix/debug-code
fix debug code
2019-05-06 15:00:21 -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
f2926876b3 Merge #423
423: codegen: Remove unused LoadError import r=bjfish a=penberg

Rustc complains that:

  warning: unused import: `parse::LoadError`
   --> lib/runtime-core/src/codegen.rs:7:5
    |
  7 |     parse::LoadError,
    |     ^^^^^^^^^^^^^^^^
    |

Co-authored-by: Pekka Enberg <penberg@iki.fi>
2019-05-06 18:44:23 +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
0895dc60c2 Check param count. 2019-05-06 09:19:56 -07:00
b343fd40bc Pass in param count for import functions in kernel loader. 2019-05-06 08:28:12 -07:00
10b4a08ca6 Merge branch 'master' into improve-exception-logging 2019-05-06 08:09:24 -07:00
61510f8116 Enforce runtime memory and stack bound check when using kernel loader. 2019-05-06 07:15:30 -07:00
0926a5020e Implement caching for parser refactor 2019-05-05 20:11:47 -05:00
89b92e3305 Merge #422
422: Improved Emscripten debugging + optipng r=syrusakbary a=MarkMcCaskey

Improved Emscripten debugging + optipng

Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Syrus <me@syrusakbary.com>
2019-05-06 00:25:53 +00:00
ca4606516a Added README to the examples dir 2019-05-05 17:17:01 -07:00
a3e933df1b Added changes to the Changelog 2019-05-05 17:03:49 -07:00
d8028a4345 Fixed emscripten-singlepass tests call 2019-05-05 14:18:12 -07:00
8f345e9e8c Fixed ioctl in Unix. Fixed provied main arguments 2019-05-05 13:55:40 -07:00