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
newActiveSourcePointer in LibParseState.sol packs a memory pointer into 16 bits:
Line 224: shl(0x10, oldActiveSourcePointer) — stores pointer in bits 16+
Line 228: and(..., 0xFFFF) to store new pointer in low 16 bits
Line 495: shr(0xf0, mload(itemSourceHead)) — reads linked list next pointer
This is the same 16-bit pointer pattern that caused #473 in the sub-parser linked list. In practice, sources are allocated sequentially during a single parse so memory growth is bounded, but the constraint is implicit rather than enforced.
Description
newActiveSourcePointerinLibParseState.solpacks a memory pointer into 16 bits:shl(0x10, oldActiveSourcePointer)— stores pointer in bits 16+and(..., 0xFFFF)to store new pointer in low 16 bitsshr(0xf0, mload(itemSourceHead))— reads linked list next pointerThis is the same 16-bit pointer pattern that caused #473 in the sub-parser linked list. In practice, sources are allocated sequentially during a single parse so memory growth is bounded, but the constraint is implicit rather than enforced.
Should either:
The shift should also use a named constant rather than magic numbers.