This repository was archived by the owner on Dec 22, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Original file line number Diff line number Diff line change 350350 " zero flag expected"
351351)
352352
353- ;; No more than 2^32 locals.
353+ ;; Local number is unsigned 32 bit
354+ (assert_malformed
355+ (module binary
356+ " \00 asm" " \01\00\00\00 "
357+ " \01\04\01\60\00\00 " ;; Type section
358+ " \03\02\01\00 " ;; Function section
359+ " \0a\0c\01 " ;; Code section
360+
361+ ;; function 0
362+ " \0a\02 "
363+ " \80\80\80\80\10\7f " ;; 0x100000000 i32
364+ " \02\7e " ;; 0x00000002 i64
365+ " \0b " ;; end
366+ )
367+ " integer too large"
368+ )
369+
370+ ;; No more than 2^32-1 locals.
354371(assert_malformed
355372 (module binary
356373 " \00 asm" " \01\00\00\00 "
367384 " too many locals"
368385)
369386
387+ (assert_malformed
388+ (module binary
389+ " \00 asm" " \01\00\00\00 "
390+ " \01\06\01\60\02\7f\7f\00 " ;; Type section: (param i32 i32)
391+ " \03\02\01\00 " ;; Function section
392+ " \0a\1c\01 " ;; Code section
393+
394+ ;; function 0
395+ " \1a\04 "
396+ " \80\80\80\80\04\7f " ;; 0x40000000 i32
397+ " \80\80\80\80\04\7e " ;; 0x40000000 i64
398+ " \80\80\80\80\04\7d " ;; 0x40000000 f32
399+ " \80\80\80\80\04\7c " ;; 0x40000000 f64
400+ " \0b " ;; end
401+ )
402+ " too many locals"
403+ )
404+
370405;; Local count can be 0.
371406(module binary
372407 " \00 asm" " \01\00\00\00 "
You can’t perform that action at this time.
0 commit comments