corert icon indicating copy to clipboard operation
corert copied to clipboard

Add overflow checking for add_ovf and similar operations

Open morganbr opened this issue 8 years ago • 3 comments

ImportBinaryOperation currently handles all of the _ovf versions of arithmetic operations, but doesn't actually check for overflows. It should throw OverflowException if the operations overflow, but if exception handling isn't implemented yet, it could also trap for a start. Look for the // TODO: Overflow checks comment.

morganbr avatar Sep 15 '17 03:09 morganbr

@morganbr that's up for grabs. Can I start working on it?

robert-matusewicz avatar Apr 12 '18 09:04 robert-matusewicz

@matekm, thanks for the interest. It's all yours!

morganbr avatar Apr 12 '18 20:04 morganbr

@robert-matusewicz Hi, did you have a chance to do anything for this, I had a look at Wasm binary operations and LLVM binary operations and there's nothing there that will do this for you? Something like emitting https://codereview.stackexchange.com/questions/37177/simple-method-to-detect-int-overflow I suppose is the way to go.

yowl avatar Mar 26 '20 16:03 yowl