Closed
Description
We need to compile containers to JS for our doodlinator project via js_of_ocaml.
During compilation, we'd receive the following integer overflow errors (which I believe comes from jsoo compiling containers):
$ make
dune build bookmarklet/doodlinator.bc.js web/webpage.bc.js
js_of_ocaml .js/containers/containers.cma.js
Warning: integer overflow: integer 0x5555555555555555 (-3074457345618258603) truncated to 0x55555555 (1431655765); the generated code might be incorrect.
Warning: integer overflow: integer 0x3333333333333333 (3689348814741910323) truncated to 0x33333333 (858993459); the generated code might be incorrect.
Warning: integer overflow: integer 0x3333333333333333 (3689348814741910323) truncated to 0x33333333 (858993459); the generated code might be incorrect.
Warning: integer overflow: integer 0xf0f0f0f0f0f0f0f (1085102592571150095) truncated to 0xf0f0f0f (252645135); the generated code might be incorrect.
The last integer matches Sys.max_array_length
, which is used in core/CCVector
(and data/CCPersistentArray
, data/CCPersistentHashtbl
, but we're not using containers-data
).
Version info
ocaml: 4.08.1
containers: 3.1
jsoo: 3.8.0
System info
Linux 64 bit