optional integer overflow logging/exception (#8585)
Summary:
Adds a configuration setting hhvm.hack.lang.check_int_overflow. When enabled,
compilation generates overflow variants of the Add, MinusEqual, Mul, MulEqual,
PlusEqual, PostDec, PostInc, PreDec, PreInc, and Sub instructions (with O
suffixes). During execution, if an integer overflow occurs, the variant
instructions raise an E_WARNING (if check_int_overflow=1) or throws an
ArithmeticError (if check_int_overflow=2).
Pull Request resolved: https://github.com/facebook/hhvm/pull/8585
Reviewed By: markw65
Differential Revision:
D17859679
fbshipit-source-id:
76cfefef7085275be2c9801dd509a24eadf19da9