[rust-dev] Integer overflow, round -2147483648
zwarich at mozilla.com
Sun Jun 22 21:17:26 PDT 2014
On Jun 22, 2014, at 8:52 PM, Patrick Walton <pcwalton at mozilla.com> wrote:
> On 6/22/14 8:46 PM, Daniel Micay wrote:
>> It's for faster (but not free) array bounds checking. I don't think Rust
>> will be able to use it because it unwinds on out-of-bounds rather than
>> aborting, and it will be difficult to turn the OS support (perhaps
>> SIGFPE / SIGSEGV on *nix) into well defined unwinding in LLVM.
If you’re referring to JSC’s use of LLVM, IIRC (this is based on conversations with some of the people that did it, not looking at the code myself) they added support for on-stack replacement via stack maps and traps to a runtime to LLVM’s JIT. Failure of bounds checks is just treated like any other failure that falls off the optimized path and performs an OSR exit.
More information about the Rust-dev