-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Problem
Dispatcher decodes calldata words via sir.calldataload and forwards them directly to internal calls. For ABI types like uint8/int8, high bits are not truncated/sign-normalized before use.
Expected
ABI narrow integers should be normalized to declared width before reaching function logic.
Actual
Raw 256-bit calldata words are forwarded for narrow typed parameters.
Evidence
- Direct calldata load and forwarding path:
src/mlir/ora/lowering/OraToSIR/SIRDispatcher.cpp:805 - Arg forwarded as-is:
src/mlir/ora/lowering/OraToSIR/SIRDispatcher.cpp:876 - No width-specific mask/signextend in dispatcher arg path.
Impact
Incorrect runtime semantics for narrow ints; external callers can pass out-of-range words and bypass intended width behavior.
Acceptance Criteria
- Dispatcher masks/sign-extends args according to
ora.abi_paramswidth/sign beforesir.icall. - Add regression tests for
u8/i8/u16/i16argument boundaries.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status