Implement x86 chkstk in "rust"
cc #183
Basically the same as the x86_64 ones, except `__alloca` doesn't need to fix the parameter register. I've manually verified that the disassembly is the same, and that these work in a compiled rust program.
The second commit disables compiling probestack functions for `feature = mangled-names`. They aren't needed during testing because they aren't comparison tested and the unmangled versions are the ones that actually get used.
r? @alexcrichton
Update rustbuild commentary
r? @nikomatsakis
This is the reason that https://github.com/rust-lang/rust/pull/44509 doesn't work - the `rustbuild` feature _is_ actually used, it was just incorrectly documented here and I missed it.
Update the gcc crate to 0.3.53 and disable compilation warnings
The update is needed because you'd otherwise get a deprecation warning about `Config` being deprecated, as rust-lang/rust has updated the gcc crate.
The compilation warnings are inside the compiler-rt submodule, about which we don't have
direct control over, so we disable them.
Tweak definition of probestack functions
It looks like the old `__rust_probestack` routine is incompatible with newer
linux kernels. My best guess for this is that the kernel's auto-growth logic is
failing to trigger, causing what looks like a legitimate segfault to get
delivered. My best guess for why *that's* happening is that the faulting address
is below `%rsp`, whereas previously all faulting stack addresses were above
`%rsp`. The probestack routine does not modify `%rsp` as it's probing the stack,
and presumably newer kernels are interpreting this as a legitimate violation.
This commit tweaks the probestack routine to instead update `%rsp` incrementally
as probing happens. The ABI of the function, however, requires that `%rsp`
isn't changed as part of the function so it's restored at the end to the
previous value.
It looks like the old `__rust_probestack` routine is incompatible with newer
linux kernels. My best guess for this is that the kernel's auto-growth logic is
failing to trigger, causing what looks like a legitimate segfault to get
delivered. My best guess for why *that's* happening is that the faulting address
is below `%rsp`, whereas previously all faulting stack addresses were above
`%rsp`. The probestack routine does not modify `%rsp` as it's probing the stack,
and presumably newer kernels are interpreting this as a legitimate violation.
This commit tweaks the probestack routine to instead update `%rsp` incrementally
as probing happens. The ABI of the function, however, requires that `%rsp`
isn't changed as part of the function so it's restored at the end to the
previous value.
Use the Rust implementation of udivsi3 on ARM
Although compiler-rt presumably has a more optimized implementation written in
assembly, it appears buggy for whatever reason, causing #173.
For now let's see if integration into rust-lang/rust will work with the
Rust-defined implementation!
Although compiler-rt presumably has a more optimized implementation written in
assembly, it appears buggy for whatever reason, causing #173.
For now let's see if integration into rust-lang/rust will work with the
Rust-defined implementation!