[rust-dev] Integer overflow, round -2147483648

Patrick Walton pcwalton at mozilla.com
Sun Jun 22 20:54:11 PDT 2014


On 6/22/14 8:52 PM, Patrick Walton 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.
>
> GCJ did it. Presumably JavaScriptCore does it too. How?

Also this doesn't seem that difficult to me. Replace 
array-bounds-checked loads and stores with a 
@llvm.load.with.bounds.check() (or whatever) intrinsic and have LLVM 
consider that as unwindable.

Patrick



More information about the Rust-dev mailing list