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
otool parser accepts required load-command fields with no value (truncated output becomes null) #1990
parseOtoolLoadCommands (src/native/parsers/otool.ts) accepts truncated otool -l output in which a required load-command field label has no value. It records the field as null instead of rejecting the output as malformed.
#1967 changed requireUniqueField's pattern to ^\s*<key>(?:\s|$) so that a valueless options row in dylib-use commands counts as present. That pattern applies to every required field. parseField still drops a bare label, so the presence check passes while the value is never parsed.
Measured on main 1f17ac822, by cutting one value from the real tests/fixtures/native-macos/otool-load.txt capture:
Required line truncated to its label
Result
vmaddr
accepted; __TEXTvm_address: null
vmsize
accepted; __TEXTvm_size: null
uuid
accepted; uuid: null, which reads as "no LC_UUID"
entryoff
accepted; entry offset dropped
Before #1967 these were rejected as otool field <key> is missing or repeated. Codex flagged this on #1967 and again on #1972 (P2, "Restrict bare-field matching to empty options"); it is still present on main.
Expected behavior
A required scalar field must appear exactly once and carry a value. Only the dylib-use options row may legitimately be empty. Field-line interpretation should have a single owner (parseField) instead of a second regex.
Activity