/* Copyright 2021 Mozilla Foundation * *LicensedundertheApacheLicense,Version2.0(the"License"); *youmaynotusethisfileexceptincompliancewiththeLicense. *YoumayobtainacopyoftheLicenseat * *http://www.apache.org/licenses/LICENSE-2.0 * *Unlessrequiredbyapplicablelaworagreedtoinwriting,software *distributedundertheLicenseisdistributedonan"ASIS"BASIS, *WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied. *SeetheLicenseforthespecificlanguagegoverningpermissionsand *limitationsundertheLicense.
*/
// ./test/core/custom.wast
// ./test/core/custom.wast:1
let $0 = instantiate(`(module binary "\\00asm""\\01\\00\\00\\00" "\\00\\24\\10""a custom section""this is the payload" "\\00\\20\\10""a custom section""this is payload" "\\00\\11\\10""a custom section""" "\\00\\10\\00""""this is payload" "\\00\\01\\00""""" "\\00\\24\\10""\\00\\00custom sectio\\00""this is the payload" "\\00\\24\\10""\\ef\\bb\\bfa custom sect""this is the payload" "\\00\\24\\10""a custom sect\\e2\\8c\\a3""this is the payload" "\\00\\1f\\16""module within a module""\\00asm""\\01\\00\\00\\00"
)`);
// ./test/core/custom.wast:84
assert_malformed(
() => instantiate(`(module binary "\\00asm""\\01\\00\\00\\00" "\\00\\26\\10""a custom section""this is the payload"
)`),
`length out of bounds`,
);
// ./test/core/custom.wast:92
assert_malformed(
() => instantiate(`(module binary "\\00asm""\\01\\00\\00\\00" "\\00\\25\\10""a custom section""this is the payload" "\\00\\24\\10""a custom section""this is the payload"
)`),
`malformed section id`,
);
// ./test/core/custom.wast:101
assert_malformed(
() => instantiate(`(module binary "\\00asm""\\01\\00\\00\\00" "\\01\\07\\01\\60\\02\\7f\\7f\\01\\7f" ;; type section "\\00\\25\\10""a custom section""this is the payload" ;; wrong length! "\\03\\02\\01\\00" ;; function section "\\0a\\09\\01\\07\\00\\20\\00\\20\\01\\6a\\0b" ;; code section "\\00\\1b\\07""custom2""this is the payload" ;; custom section
)`),
`function and code section have inconsistent lengths`,
);
// ./test/core/custom.wast:114
assert_malformed(
() => instantiate(`(module binary "\\00asm\\01\\00\\00\\00" "\\00asm\\01\\00\\00\\00"
)`),
`length out of bounds`,
);
// ./test/core/custom.wast:122
assert_malformed(
() => instantiate(`(module binary "\\00asm""\\01\\00\\00\\00" "\\05\\03\\01\\00\\01" ;; memory section "\\0c\\01\\02" ;; data count section (2 segments) "\\0b\\06\\01\\00\\41\\00\\0b\\00" ;; data section (1 segment)
)`),
`data count and data section have inconsistent lengths`,
);
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-08-26)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.