mirror of
https://github.com/morluto/rea
synced 2026-10-26 22:28:27 -04:00
1febc22907
* fix(wasm): frame custom section names at their displayed NUL wasm-objdump prints a custom section name with printf's %.*s, so an embedded NUL ends the displayed name, as it does for module names. The section row was compared with the complete name decoded from WAT, so a valid module whose custom section name contains U+0000 failed inspection with "WABT custom-section header does not match decoded WAT". Compare the row with the displayed prefix instead. * test(wasm): cover NUL-terminated custom section names Frame the real objdump golden with a decoded custom section name that continues after a NUL, and keep rejecting a displayed prefix that differs from the decoded name. * test(wasm): verify a NUL-containing custom section name with real WABT Add a custom section named "visible\0hidden" to the real-tool custom name fixture. WABT 1.0.42 decodes it as an escaped WAT name and displays "visible" in wasm-objdump, so the verifier expects that description through the compiled CLI and MCP. * refactor(wasm): share WABT's NUL-terminated name display Module-name preamble lines and custom-section rows each truncated the decoded name at its first NUL. Keep that display rule in one helper so both framings follow the same producer behavior. Output is unchanged.