Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Js_of_ocaml: overflowed integer literals are truncated #7

Open
crvdgc opened this issue May 7, 2024 · 1 comment
Open

Js_of_ocaml: overflowed integer literals are truncated #7

crvdgc opened this issue May 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@crvdgc
Copy link
Contributor

crvdgc commented May 7, 2024

These are integer literals in the source code.

Running[61]: [...]js_of_ocaml-compiler-5.7.2/bin/js_of_ocaml --pretty --source-map-inline -o .imandra_ptime_extra.objs/jsoo/default/imandra_ptime_extra.cma.js imandra_ptime_extra.cma
Output[61]:
Warning: integer overflow: integer 0xe8d4a51000 (1000000000000) truncated to 0xd4a51000 (-727379968); the generated code might be incorrect.
Warning: integer overflow: integer 0x141dd76000 (86400000000) truncated to 0x1dd76000 (500654080); the generated code might be incorrect.
Warning: integer overflow: integer 0x4e94914f0000 (86400000000000) truncated to 0x914f0000 (-1857093632); the generated code might be incorrect.
Warning: integer overflow: integer 0x132f4579c980000 (86400000000000000) truncated to 0x9c980000 (-1667760128); the generated code might be incorrect.

Running[66]: [...]js_of_ocaml-compiler-5.7.2/bin/js_of_ocaml --pretty --source-map-inline -o .imandra_ptime.objs/jsoo/default/imandra_ptime.cma.js imandra_ptime.cma
Output[66]:
Warning: integer overflow: integer 0xe8d4a51000 (1000000000000) truncated to 0xd4a51000 (-727379968); the generated code might be incorrect.
Warning: integer overflow: integer 0x174876e800 (100000000000) truncated to 0x4876e800 (1215752192); the generated code might be incorrect.
Warning: integer overflow: integer 0x2540be400 (10000000000) truncated to 0x540be400 (1410065408); the generated code might be incorrect.
Warning: integer overflow: integer 0x174876e800 (100000000000) truncated to 0x4876e800 (1215752192); the generated code might be incorrect.
Warning: integer overflow: integer 0xe8d4a51000 (1000000000000) truncated to 0xd4a51000 (-727379968); the generated code might be incorrect.
Warning: integer overflow: integer 0x3691d6afc000 (60000000000000) truncated to 0xd6afc000 (-693125120); the generated code might be incorrect.
Warning: integer overflow: integer 0xcca2e51310000 (3600000000000000) truncated to 0x51310000 (1362165760); the generated code might be incorrect.
Warning: integer overflow: integer 0x132f4579c980000 (86400000000000000) truncated to 0x9c980000 (-1667760128); the generated code might be incorrect.
Warning: integer overflow: integer 0x132f4579c97ffff (86399999999999999) truncated to 0x9c97ffff (-1667760129); the generated code might be incorrect.
@crvdgc crvdgc added the bug Something isn't working label May 7, 2024
@crvdgc
Copy link
Contributor Author

crvdgc commented May 7, 2024

Possibly related:
ocsigen/js_of_ocaml#1079
ocsigen/js_of_ocaml#1080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant