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
Make assembler expression arithmetic report overflow consistently #32
assemblerAssembly syntax, encoding, symbols and relocations.bugSomething isn't workinghelp wantedExtra attention is neededneeds testingRequires focused correctness or coverage validation.priority highCorrectness or foundational work to address before dependent features.
Reproduced in the debug build: adding one to i64::MAX in equ panics with exit 101. Parser sums, signed displacement accumulation and constant substitution use unchecked host arithmetic.
Reproduction
On Linux x86_64 (Rust 1.96.0), save as repro.asm:
section .textN equ 9223372036854775807+1dq N
Run cargo run -- asm --amd64 repro.asm -o repro.o.
Observed exit status: 101.
thread 'main' (22) panicked at assembler/src/isa/amd64/parser.rs:372:84:
attempt to add with overflow
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Scope
Difficulty: medium.
Use checked arithmetic throughout expression parsing/resolution and report a source diagnostic. Define a consistent accepted range rather than relying on debug/release overflow behavior.
Completion criteria
Overflow and underflow return ordinary errors in debug and release builds.
Numeric addition, symbol addends and memory constant substitution are covered.
No malformed expression triggers a host arithmetic panic.
Backlog index: #12. This issue owns only the bounded work described above.
assemblerAssembly syntax, encoding, symbols and relocations.bugSomething isn't workinghelp wantedExtra attention is neededneeds testingRequires focused correctness or coverage validation.priority highCorrectness or foundational work to address before dependent features.
Activity