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

jit: support unreachable instruciton, and stack trace. #70

Merged
merged 7 commits into from
Dec 10, 2021
Merged

Conversation

mathetake
Copy link
Member

Signed-off-by: Takeshi Yoneda takeshi@tetrate.io

part of #65

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
wasm/jit/engine.go Outdated Show resolved Hide resolved
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Copy link
Contributor

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as usual, mostly naming and semantics!

wasm/jit/engine.go Outdated Show resolved Hide resolved
(call $three)
)
(func $three
(unreachable)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a more intuitive use of unreachable? like something where it is may occur in real life (not a forged example)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for example unreachable will be placed in a branch for the case when the slice boundary check failed (like TinyGO does emit unreachable on "slice out of bounds")!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it is essentially the same as this example

wasm/jit/engine.go Outdated Show resolved Hide resolved
wasm/jit/engine.go Show resolved Hide resolved
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
@mathetake mathetake merged commit 340e4d4 into main Dec 10, 2021
@mathetake mathetake deleted the unreachable branch December 10, 2021 04:29
@codefromthecrypt
Copy link
Contributor

thanks for making it possible to uhh become unreachable!

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.

2 participants