* Overflow causes crash in Int32 division
@ 2006-05-04 1:37 Andy Chou
0 siblings, 0 replies; only message in thread
From: Andy Chou @ 2006-05-04 1:37 UTC (permalink / raw)
To: caml-list
I've noticed that the following causes a crash on both the bytecode
interpreter and native code:
open Int32
open Printf
let _ = printf "%ld\n" (Int32.div Int32.min_int (-1l))
This doesn't appear to be documented, so I presume it's incorrect
behavior. Nativeint also seems to have the same problem. The built-in
int type doesn't seem to have the same problem. Int64 doesn't seem to
have a problem either.
This is on a 32-bit Windows platform.
-Andy
--
Andy Chou
Coverity, Inc.
185 Berry St. Suite 3600
San Francisco, CA 94107
Phone: 415-321-5203
Fax: 415-541-9521
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-04 1:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-04 1:37 Overflow causes crash in Int32 division Andy Chou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox