You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5513 Reporter: cyocum Assigned to:@xavierleroy Status: closed (set by @xavierleroy on 2013-08-31T10:48:37Z) Resolution: fixed Priority: normal Severity: major Platform: GNU/Linux OS: XUbuntu OS Version: 11.10 Version: 3.12.1 Fixed in version: 3.13.0+dev Category: back end (clambda to assembly) Related to:#4740
Bug description
The code attached compiles. However, when run, it causes a Floating Point exception when it shouldn't. This happens on both 3.12.0 and a compiled 3.12.1 system on XUbuntu.
Steps to reproduce
let a = -9223372036854775808L
let b = -1L
let c = Int64.div a b
let _ = ()
The text was updated successfully, but these errors were encountered:
I gather this is observed with ocamlopt on an x86-64 platform. The x86 "idiv" instruction unhelpfully raises a division error when computing min_int / -1 instead of returning min_int as we want. The bytecode interpreter and the runtime system were hardened against this behavior (see #4740) but not the native-code compiler.
Original bug ID: 5513
Reporter: cyocum
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2013-08-31T10:48:37Z)
Resolution: fixed
Priority: normal
Severity: major
Platform: GNU/Linux
OS: XUbuntu
OS Version: 11.10
Version: 3.12.1
Fixed in version: 3.13.0+dev
Category: back end (clambda to assembly)
Related to: #4740
Bug description
The code attached compiles. However, when run, it causes a Floating Point exception when it shouldn't. This happens on both 3.12.0 and a compiled 3.12.1 system on XUbuntu.
Steps to reproduce
let a = -9223372036854775808L
let b = -1L
let c = Int64.div a b
let _ = ()
The text was updated successfully, but these errors were encountered: