You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-bugCategory: This is a bug.O-muslTarget: The musl libcT-libsRelevant to the library team, which will review and decide on the PR/issue.
jonas-schievink
added
A-runtime
Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
O-musl
Target: The musl libc
labels
Aug 18, 2020
Musl does things different in threading, for example the stacks for threads are much smaller. If rust just expects the same stacksize as for glibc, the guard-pages are probably misplaced (not where the tests expect them).
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-bugCategory: This is a bug.O-muslTarget: The musl libcT-libsRelevant to the library team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: It should cause a runtime-error.
Instead, this happened: Segmentation fault
Meta
It happens with (on an alpine linux a musl-distro):
rustup run nightly-x86_64-unknown-linux-musl rustc segv.rs && ./segv
:rustup run nightly-x86_64-unknown-linux-musl rustc --version --verbose
:It does not happen with (on fedora):
rustup run nightly-x86_64-unknown-linux-gnu rustc segv.rs && ./segv
:rustup run nightly-x86_64-unknown-linux-gnu rustc --version --verbose
:Additional
I also tested with the native rustc from alpine linux:
It has the same problem.
also cross-compiling on fedora has the same problem:
rustc --target nightly-x86_64-unknown-linux-musl segv.rs && ./segv
:Originally I used this code:
but realized that it is general problem.
The text was updated successfully, but these errors were encountered: