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: 7201 Reporter: filliatr Status: closed (set by @mshinwell on 2016-12-08T14:37:46Z) Resolution: duplicate Priority: normal Severity: minor Version: 4.02.3 Target version: 4.03.1+dev Category: middle end (typedtree to clambda) Monitored by: braibant @gasche@hcarty@yakobowski
Bug description
In file asmcomp/cmmgen.ml, in function div_int, the optimization
| (Cconst_int 0 as c1, c2) ->
Csequence(c2, c1)
is wrong, since c2 could be zero, as in
0 / Random.int 1
or
0 / List.hd [0]
Steps to reproduce
(* compile this code with ocamlopt and run it )
let = 0 / Random.int 1
( it does not raise Division_by_zero *)
Additional information
does not show up in ocamlc
The text was updated successfully, but these errors were encountered:
Original bug ID: 7201
Reporter: filliatr
Status: closed (set by @mshinwell on 2016-12-08T14:37:46Z)
Resolution: duplicate
Priority: normal
Severity: minor
Version: 4.02.3
Target version: 4.03.1+dev
Category: middle end (typedtree to clambda)
Monitored by: braibant @gasche @hcarty @yakobowski
Bug description
In file asmcomp/cmmgen.ml, in function div_int, the optimization
| (Cconst_int 0 as c1, c2) ->
Csequence(c2, c1)
is wrong, since c2 could be zero, as in
0 / Random.int 1
or
0 / List.hd [0]
Steps to reproduce
(* compile this code with ocamlopt and run it )
let = 0 / Random.int 1
( it does not raise Division_by_zero *)
Additional information
does not show up in ocamlc
The text was updated successfully, but these errors were encountered: