-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Segfault when using rust inside a go program #64834
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
Comments
This is the relevant stack-trace
For some arbitrary execution, on entry:
and it eventually segfaults when the stack probing routine reaches…
With the stack size request of Looking at the memory maps for the process:
You can see that the stack address which did not probe successfully is inside of the non-read non-write page(s). These are usually called a "guard page" and are used to enforce that no code will write to outside its stack. Thus the too-small-stack hypothesis is confirmed. Closing as a not-a-bug. cc @SimonSapin |
This is really a weird bug that occurs on one of our program, i managed to make a reproducable example under this repository: https://github.com/joelwurtz/segfault-golang-with-rust
This only happens when calling a specific function on the https://github.com/servo/html5ever library with a specific parameter, and i also make an issue on this library: servo/html5ever#393
However i'm wondering if the bug is not coming from rust-lang
What it does:
LocalName::from(&*attribute_name)
on the https://github.com/servo/html5ever library call with a not defined local nameThis result in a segfault 100% of the time
There are some workaround for this:
I really don't know what happens inside and it's really difficult to trace it due to the way of compiling this.
I'm wondering if using compiler_builtins in 0.1.19 version will help tracing this bug due to rust-lang/compiler-builtins@985a430
If you also have insight on how i can produce a better debugging log i will gladly do it.
The text was updated successfully, but these errors were encountered: