You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] Invalid octal constant in arithmetic (08) silently evaluated as decimal, no error and no abort #1101
[bug] Invalid octal constant in arithmetic (08) silently evaluated as decimal, no error and no abort
z=08;echo$((z));echo rc=$?# GNU bash 5.3.20: stderr '08: value too great for base (error token is "08")', expansion error aborts the non-interactive shell, exit 1, nothing on stdout# rubash / niu: stdout '8' then 'rc=0', no diagnostic at all
Expected (GNU bash 5.3.20): 08: value too great for base (error token is "08") on stderr, exit 1.
Actual (rubash): exit 0, prints 8 and rc=0.
A leading-zero constant with digits 8/9 is invalid in bash arithmetic; silently reinterpreting it as decimal changes values and hides bugs instead of failing like GNU.
Env: rubash master 493ebb2 / niubash 1.4.4 (niu, master 953f513, embeds rubash 493ebb2), Linux x86_64, GNU bash 5.3.20 x86_64-pc-linux-gnu as oracle. Also reproduces in niu (same engine).
Fixed by #1181 (2026-10-22/23 bulk GNU-parity wave): landed as a dedicated commit referencing this issue, covered by the audit differential suite (tests/fixtures/audit/), and re-verified byte-for-byte against a GNU bash 5.3.20 oracle; master CI (ff1a555) runs the suite green.
Closing now to restore the linkage: GitHub's closing-reference parser only honored the first entry of #1181's long Fixes list, so this stayed open after the fix landed. If anything still reproduces on current master, reopen with a transcript and it returns to the fix queue.
Activity
caomengxuan666 commentedon Oct 23, 2026
Fixed by #1181 (2026-10-22/23 bulk GNU-parity wave): landed as a dedicated commit referencing this issue, covered by the audit differential suite (tests/fixtures/audit/), and re-verified byte-for-byte against a GNU bash 5.3.20 oracle; master CI (ff1a555) runs the suite green.
Closing now to restore the linkage: GitHub's closing-reference parser only honored the first entry of #1181's long
Fixeslist, so this stayed open after the fix landed. If anything still reproduces on current master, reopen with a transcript and it returns to the fix queue.