-
Notifications
You must be signed in to change notification settings - Fork 104
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
Improve diagnostic when gstd
without 'debug'
#1857
Comments
inspired by #1821 |
This syscall will cost some real funds and we should "lock" them for possible panic case at the start. |
make also asserts in tests more precisely, see files: |
Problem to Solve
When an execution of a program built with
gstd/nodebug
hitsexpect
/assert
/panic
/unreachable
/etc we get in the logs just short message 'probablyunreachable
reached`. It doesn't point whether it is program logic fails and where it was or an error rose on executor side.Possible Solution
The idea is to introduce new syscall (or two):
Implementation of
gr_panic
is just to put data to the log and interrupt the execution.gr_panic2
forces compiler to putLocation
instance somewhere and to provide a pointer to it. Panic handler could possibly look then like this:demo-panicker
WAT looks with these changes applied the following way:wasm-proc
could then process the binary, extract source file paths to the new info file (so called 'debug info') and squeezedata
element a bit:However for this to work it is required somehow to force compiler to put all
Location
s in the new standalone section and file paths to the different one.Notes
Disadvantage: too complicated
The text was updated successfully, but these errors were encountered: