Incorrect handling of left shift overflow on non-x86_64 (returns value instead of runtime error)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- tooling
Research direction
Start with the error.integer_left_shift_runtime.jsonnet reproduction and run the provided jsonnet command on a non-x86_64 architecture, comparing it with x86_64 behavior. Trace the integer left-shift runtime handling and its regression test; done means (1 << 63) raises a runtime error and the test no longer reports a successful exit with a wrapped value.
Written by the indexing model from the issue text.
Description
Summary
On non-x86_64 architectures, Jsonnet does not raise a runtime error for integer left shift overflow. Instead, it returns a wrapped negative value and exits successfully (code 0). This contradicts expected behavior and causes regression test failure.
Affected Version:
- Jsonnet 0.22.0
- Observed on: non-x86_64 architectures (e.g., aarch64, ppc64le) in Fedora rawhide
- Not reproducible on: x86_64 (https://koji.fedoraproject.org/koji/taskinfo?taskID=143856012)
Reproduction:
jsonnet --ext-str var1=test --ext-code var2='{x:1,y:2}' error.integer_left_shift_runtime.jsonnet
Test case (error.integer_left_shift_runtime.jsonnet):
(1 << 63)
Built at:
https://koji.fedoraproject.org/koji/taskinfo?taskID=143856013
https://koji.fedoraproject.org/koji/taskinfo?taskID=143856014
https://koji.fedoraproject.org/koji/taskinfo?taskID=143856015
Which contains both a root.log showing installed packages and a build.log showing the output from the compile/test
- Dominant language
- Jsonnet
- Stars
- 7.6k
- Forks
- 475
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google/jsonnet
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
-
std.format: wrong digits for %f/%d on large values; malformed output for non-integer * precision Open
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
hemilabs/ui-monorepo#2332 ·
-
Help-Wanted Needs-Triage Package-Update
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/winget-pkgs#438662 ·
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·