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

Integer multiplication overflowed! when running tests in platform/Utc.roc #169

Open
Anton-4 opened this issue Feb 3, 2024 · 1 comment

Comments

@Anton-4
Copy link
Collaborator

Anton-4 commented Feb 3, 2024

After the merging of #167 I'm seeing overflows when testing on raspberry pi 4 arm64.
It's possible that this is an issue with Roc instead of in basic-cli.

roc test ./platform/Utc.roc
+ test_command='── EXPECT FAILED in ./platform/Utc.roc ─────────────────────────────────────────

This expectation failed:

64│  expect deltaAsNanos (fromNanosSinceEpoch 1) (fromNanosSinceEpoch 2) == 1
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


── EXPECT FAILED in ./platform/Utc.roc ─────────────────────────────────────────

This expectation failed:

65│  expect deltaAsNanos (fromNanosSinceEpoch -1) (fromNanosSinceEpoch 1) == 2
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


── EXPECT FAILED in ./platform/Utc.roc ─────────────────────────────────────────

This expectation failed:

66│  expect deltaAsNanos (fromNanosSinceEpoch Num.minI128) (fromNanosSinceEpoch Num.maxI128) == Num.maxU128
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


── EXPECT PANICKED in ./platform/Utc.roc ───────────────────────────────────────

This expectation crashed while running:

68│  expect deltaAsMillis (fromMillisSinceEpoch 0) (fromMillisSinceEpoch 0) == 0
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The crash reported this message:

Integer multiplication overflowed!
── EXPECT PANICKED in ./platform/Utc.roc ───────────────────────────────────────

This expectation crashed while running:

69│  expect deltaAsMillis (fromNanosSinceEpoch 1) (fromNanosSinceEpoch 2) == 0
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The crash reported this message:

Integer multiplication overflowed!
── EXPECT PANICKED in ./platform/Utc.roc ───────────────────────────────────────

This expectation crashed while running:

70│  expect deltaAsMillis (fromMillisSinceEpoch 1) (fromMillisSinceEpoch 2) == 1
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The crash reported this message:

Integer multiplication overflowed!
── EXPECT PANICKED in ./platform/Utc.roc ───────────────────────────────────────

This expectation crashed while running:

71│  expect deltaAsMillis (fromMillisSinceEpoch -1) (fromMillisSinceEpoch 1) == 2
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The crash reported this message:

Integer multiplication overflowed!
── EXPECT PANICKED in ./platform/Utc.roc ───────────────────────────────────────

This expectation crashed while running:

72│  expect deltaAsMillis (fromNanosSinceEpoch Num.minI128) (fromNanosSinceEpoch Num.maxI128) == Num.maxU128 // nanosPerMilli
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The crash reported this message:

Integer multiplication overflowed!

8 failed and 1 passed in 567 ms.'
@Anton-4
Copy link
Collaborator Author

Anton-4 commented Feb 7, 2024

See roc-lang/roc#6513

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant