| Anonymous | Login | Signup for a new account | 2013-05-18 12:00 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0005513 | OCaml | OCaml backend (code generation) | public | 2012-02-23 11:52 | 2012-02-24 11:14 | |||||||
| Reporter | cyocum | |||||||||||
| Assigned To | xleroy | |||||||||||
| Priority | normal | Severity | major | Reproducibility | have not tried | |||||||
| Status | resolved | Resolution | fixed | |||||||||
| Platform | GNU/Linux | OS | XUbuntu | OS Version | 11.10 | |||||||
| Product Version | 3.12.1 | |||||||||||
| Target Version | Fixed in Version | 3.13.0+dev | ||||||||||
| Summary | 0005513: Int64.div causes floating point exception | |||||||||||
| 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 _ = () | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0006957) xleroy (administrator) 2012-02-23 16:07 |
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 PR#4740) but not the native-code compiler. |
|
(0006966) xleroy (administrator) 2012-02-24 11:14 |
Fixed in SVN trunk, commit 12187. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-02-23 11:52 | cyocum | New Issue | |
| 2012-02-23 15:58 | xleroy | Relationship added | related to 0004740 |
| 2012-02-23 16:07 | xleroy | Note Added: 0006957 | |
| 2012-02-23 16:07 | xleroy | Assigned To | => xleroy |
| 2012-02-23 16:07 | xleroy | Status | new => assigned |
| 2012-02-23 16:07 | xleroy | Category | OCaml runtime system => OCaml backend (code generation) |
| 2012-02-24 11:14 | xleroy | Note Added: 0006966 | |
| 2012-02-24 11:14 | xleroy | Status | assigned => resolved |
| 2012-02-24 11:14 | xleroy | Resolution | open => fixed |
| 2012-02-24 11:14 | xleroy | Fixed in Version | => 3.13.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |