Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade the WASM .wat files to match the new version of WAVM we are using. #33

Closed
wants to merge 86 commits into from

Conversation

jplevyak
Copy link

Upgrade the WASM .wat files to match the new version of WAVM we are using.

PiotrSikora and others added 30 commits October 30, 2018 11:58
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Squashed and formatted John Plevyak's commits up to
59fadfc.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
into WASM code.  Add the ability to dynamically get WASM functions
and stubs to dynanmically register callbacks.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
This allows building Envoy and WAVM with ASAN, since previously
both projects exported conflicting __asan_default_options.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
This reverts commit 522dffd.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Note that optimizations are disabled, because optimized WASM module
throws wavm.integerDivideByZeroOrOverflow, possibly due to an issue
with getFunctionWavm() templates and/or their usage.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
liamawhite and others added 25 commits January 31, 2019 08:06
When reading docs it wasn't immediately clear where to configure the Ejection event logging. This change explicitly links to it.

Signed-off-by: Liam White <liam@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Description:

Use the absl::Stacktrace library along with absl::Symbolize to generate
symbolized stack traces without requiring any external tool or post
processing.

Remove the external dependency on "backward" library.

The stack_decode.py script can still be used to obtain additional information,
notably file and line numbers. See bazel/README.md for revised usage instructions.

Risk Level: Low (may break tooling that interpreted stack traces in logs)
Testing: bazel test //test/... , manually examined symbolized backtrace in killed binary.
Docs Changes: Changed bazel/README.md
Release Notes: Usage details of the stack_decode.py script have changed. Stack traces should include decoded names without it when the binary has appropriate debugging symbols. The script can be used to obtain file and line numbers, see bazel/README.md for details.

Signed-off-by: Dan Noé <dpn@google.com>
Signed-off-by: Suhail Patel <me@suhailpatel.com>
…is empty (envoyproxy#5794)

Given a filter config {"deprecated_v1":true}, Envoy errors out with a cryptic message
about an invalid schema at lines 0-0. This also happens if the required value field
contains an empty object of if value is misspelled (including when it contains
non-printing characters). This change produces a better error message (and adds
tests for the config parsing).

*Risk Level*: low
*Testing*: added unit test
*Docs Changes*: n/a
*Release Notes*: n/a

Signed-off-by: Stephan Zuercher <zuercher@gmail.com>
*Description*:
YAML tools build with bazel cmake from envoyproxy#5218 (it pulls our cc_configure and I think that is the reason) requires newer version of GLIBCXX that CentOS doesn't have. It also speed up build so lets just turn off building them.

*Risk Level*: Low
*Testing*: CI
*Docs Changes*:
*Release Notes*:

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
This is the same as local getTotalMemory to help with per-thread VMs,
though both are short-term workarounds, really.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Add an AccessLog WASM filter and enable it automatically for HTTP Filters.
Unify the WASM API and move it to api/wasm/cpp.
Change the API calls to have the new naming i.e. "proxy_...".
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
* Rename the WASM API files from envoy_ -> proxy_.
Remove the atomatic addition of "proxy_" in wasm/wavm/wavm.cc.
Add onCreate for new stream contexts and onDelete for stream contexts
which are being deleted.
Add _emscripten_get_heap_size support for the new version of emscripten/WAVM.
Contexts in the WAVM C++ API are now created in onCreate and deleted in onDelete.

* Update source/extensions/common/wasm/wasm.h

Co-Authored-By: jplevyak <jplevyak@gmail.com>
Including
- Set up enscripten environment
- With a valid enscripten, build out new .wasm file
Add wasm build instructions to example/wasm
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
* Fix lifetime issue which was causing non-clonable (i.e. V8)
WAVM VMs to fail.

* Fix WASM tests for the new clonable API.

* Use weak pointer to protect timer callback for WASM.

* Use shared_ptr for all Common::Wasm::Wasm pointers for consistency
and safety with std::enable_shared_from_this().

* Apply PR comment suggestions.

* Add comments for PR suggestions.
* fix compile warning on copy ctor of Wasm

* reduce header dependencies

* address comment

* micro refactor, cont

* format
…stio#28)

* Update WAVM to Wed Feb 20 16:13:27 2019 -0500 to fix memory leak in exception handling.
* Add Exception handling and test for divide by zero exception.
@istio-testing
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:

If they are not already assigned, you can assign the PR to them by writing /assign in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jplevyak jplevyak closed this Feb 26, 2019
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@jplevyak jplevyak deleted the wasm-upgradewat branch February 26, 2019 20:42
PiotrSikora added a commit that referenced this pull request Jun 4, 2019
This prevents a nullptr-dereference when global constructors
call host function which calls module function (e.g. malloc).

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.