-
Notifications
You must be signed in to change notification settings - Fork 15
glibc/wasmtime - libc fatal debug workaround #347
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
base: main
Are you sure you want to change the base?
Conversation
|
this needs to pass the linter, we may also want to discuss if this is what we want to do here but also this PR is less essential than the others in blocking progress. |
Yaxuan-w
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be great to have documentations that explain the mechanism and usage. Thanks
| __libc_message ("Fatal glibc error: %s:%s (%s): assertion failed: %s\n", | ||
| file, linestr, function, assertion); | ||
| #endif | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add new line
| * c-basic-offset: 2 | ||
| * End: | ||
| */ | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add new line
| )?; | ||
|
|
||
| // a temporary solution to have libc_assert_fail correctly working | ||
| linker.func_wrap( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are both basically write() syscalls, instead of adding these host functions can't we just use write? Once the addr translation PR is in that should be easy right? @qianxichen233 @drapl0n
This PR is splited from PR #164
This PR focuses on spliting out the temporary debug solution for glibc fatal. Previously, when glibc crushes, there is no debug information getting printed out, which is pretty inconvenient. The reason behind it is that the
libc_assert_failandmalloc_printerrfunction in glibc is not working correctly. This PR provides an temporary solution to have the error message directly passed to wasmtime to print the error