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

Trap Stackoverflow Test #152

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

martindevans
Copy link
Contributor

My other PR (#151) was failing CI on MacOS only, I think this is due to a bug in wasmtime dotnet, although I'm not sure what and unfortunately I cannot debug it further since I don't own a Mac.

This PR includes the minimal set of changes to (hopefully) reproduce the problem.

Note that the nuint change is necessary to prevent an OverflowException (as mentioned in #150).

@martindevans martindevans mentioned this pull request Sep 15, 2022
@martindevans
Copy link
Contributor Author

As expected this PR has failed CI. As mentioned above I can't debug it any further, I hope this helps someone with access to a Mac debug the issue.

@TomGillen
Copy link

I have been testing this, and found that Native.wasmtime_func_call crashes the test runner if the executed wasm overflows the stack. I have seen this happen on master, so this is a bug unrelated to this PR.

@martindevans
Copy link
Contributor Author

I've just put together a test of this in Rust which is fine when run on macos (using GH actions). So it seems to not be a bug in the underlying library.

@martindevans
Copy link
Contributor Author

martindevans commented Sep 16, 2022

I've been doing even more testing with GH actions.

As you can see from this execution log for this program works when you run it with:

dotnet run --project ConsoleApp/ConsoleApp/ConsoleApp.csproj

However, the same code copied into a test and run with:

dotnet test wasmtime-dotnet/tests/Wasmtime.Tests.csproj

Crashes!

I don't really have any ideas how to debug this further...

@peterhuene peterhuene self-requested a review September 19, 2022 22:27
@peterhuene
Copy link
Member

peterhuene commented Sep 19, 2022

I'll dive into this soon and figure out why it's failing in the test host; perhaps it is installing a mach exception handler that is interfering with Wasmtime's.

@peterhuene
Copy link
Member

I'll still be looking into this issue, but I'm not holding up the 1.0.0 release for it as I believe it's a test-host only problem.

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.

3 participants