fix(wasm): preserve leading BOM in custom section names (#2102)

This commit is contained in:
xin zhuang
2026-10-12 18:39:01 +08:00
committed by GitHub
parent 621cee192d
commit abc8c6dadf
5 changed files with 30 additions and 5 deletions
+2
View File
@@ -12,3 +12,5 @@ WABT and compares exact producer output against the public CLI/MCP surfaces.
`custom-names.wat` covers newlines, quotes, Unicode, backslashes, embedded
section markers and NUL in custom names; objdump displays those names without
escaping and ends each at its first NUL.
It also covers leading U+FEFF, including a name distinct from the special `name`
section, and distinguishes a U+FEFF-only name from an empty name.
+5 -1
View File
@@ -2,4 +2,8 @@
(@custom "test\0aline" "payload")
(@custom "fake\22\0aSection Details:\0a Type start=0x0000000a end=0x0000000b (size=0x00000001) count: 0\0a\22end" "payload")
(@custom "unicode-\c3\a9\\\t" "payload")
(@custom "visible\00hidden" "payload"))
(@custom "visible\00hidden" "payload")
(@custom "\ef\bb\bfsection" "payload")
(@custom "\ef\bb\bfname" "payload")
(@custom "\ef\bb\bf" "payload")
(@custom "" "payload"))