fix(chans): use the boolean helper's scalar output contract #1050
Reference in New Issue
Block a user
Delete Branch "agent/bittle/chans-boolean-review"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source contract
CHANSVmGetBoolean writes an optional four-byte vmBoolInt, but was declared to receive a 16-byte, eight-aligned CHANSVmObjHdr. Three Step callers cast scalar locals to that fictitious object type; two pass the original stack+0x0c destination, aligned for the scalar but not the object.
Use vmBoolInt* and *ret, make the two receiving locals vmBoolInt, and remove all three casts. Repository source and original-object reference scans find no other callers or shared-header declaration. Original helper's sole output store and all three Step call destinations were checked against the raw DOL. MWCC layout probe confirms object8/16 versus scalar4/4 alignment/size.
Independent verification
Rebased and tested on fc114afd44065fb99f9ff2fe2969f393a504fe03; tree
e52b1f3b98.The host harness models object layout and uses an isnan shim; this is not full VM/Wii runtime testing. Details: tools/decomp-assist/CHANSVm-boolean-output-20261003.md. No linking flags or headers changed.
Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.