File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 12081208 " unexpected content after last section"
12091209)
12101210
1211+ ;; The byte 0xff is documented as being a value that will not be used as
1212+ ;; an instruction or instruction prefix opcode. Test that implementations
1213+ ;; reject it. This test uses unreachable code in order to avoid
1214+ ;; type-checking errors that might arise if 0xff were interpreted as an
1215+ ;; instruction.
1216+ (assert_malformed
1217+ (module binary
1218+ " \00 asm" " \01\00\00\00 "
1219+ " \01\04\01\60\00\00 " ;; Type section: 1 type
1220+ " \03\02\01\00 " ;; Function section: 1 function
1221+ " \0a\08\01 " ;; Code section: 1 function
1222+ ;; function 0
1223+ " \06\00 " ;; Function size and local type count
1224+ " \00 " ;; unreachable
1225+ " \ff " ;; 0xff
1226+ " \00 " ;; might be interpreted as unreachable, or as the second byte
1227+ ;; of a multi-byte instruction
1228+ " \00 " ;; unreachable
1229+ " \0b " ;; end
1230+ )
1231+ " illegal opcode ff"
1232+ )
You can’t perform that action at this time.
0 commit comments