| Index: src/trusted/validator_x86/testdata/32/test-4.tf
|
| diff --git a/src/trusted/validator_x86/testdata/32/test-4.tf b/src/trusted/validator_x86/testdata/32/test-4.tf
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..331a7885e4e81bfb0a437bad08cb62a37c020ffb
|
| --- /dev/null
|
| +++ b/src/trusted/validator_x86/testdata/32/test-4.tf
|
| @@ -0,0 +1,267 @@
|
| +BITS: 32
|
| +OUTCOME: invalid
|
| +
|
| +# test 4: a big chunk of code whose origin is not clear.
|
| +asm: lea 0x4(%esp),%ecx
|
| +hex: 8d 4c 24 04
|
| +
|
| +asm: and $0xfffffff0,%esp
|
| +hex: 83 e4 f0
|
| +
|
| +asm: pushl -0x4(%ecx)
|
| +hex: ff 71 fc
|
| +
|
| +asm: push %ebp
|
| +hex: 55
|
| +
|
| +asm: mov %esp,%ebp
|
| +hex: 89 e5
|
| +
|
| +asm: push %ecx
|
| +hex: 51
|
| +
|
| +asm: xchg %ax,%ax
|
| +hex: 66 90
|
| +
|
| +asm: sub $0x24,%esp
|
| +hex: 83 ec 24
|
| +
|
| +asm: mov %ecx,-0x18(%ebp)
|
| +hex: 89 4d e8
|
| +
|
| +asm: movl $0xa,-0xc(%ebp)
|
| +hex: c7 45 f4 0a 00 00 00
|
| +
|
| +asm: mov -0x18(%ebp),%eax
|
| +hex: 8b 45 e8
|
| +
|
| +asm: cmpl $0x1,(%eax)
|
| +hex: 83 38 01
|
| +
|
| +asm: jg .+45
|
| +hex: 7f 2b
|
| +
|
| +asm: mov -0x18(%ebp),%edx
|
| +hex: 8b 55 e8
|
| +
|
| +asm: mov 0x4(%edx),%eax
|
| +hex: 8b 42 04
|
| +
|
| +asm: mov (%eax),%eax
|
| +hex: 8b 00
|
| +
|
| +hex: 8d 76 00
|
| +
|
| +asm: mov %eax,0x4(%esp)
|
| +hex: 89 44 24 04
|
| +
|
| +asm: movl $0x8001454,(%esp)
|
| +hex: c7 04 24 54 14 00 08
|
| +
|
| +asm: call .+709
|
| +hex: e8 c0 02 00 00
|
| +
|
| +asm: movl $0x1,(%esp)
|
| +hex: c7 04 24 01 00 00 00
|
| +
|
| +hex: 8d 74 26 00
|
| +
|
| +asm: call .+453
|
| +hex: e8 c0 01 00 00
|
| +nc_out: JUMP TARGET out of range
|
| +
|
| +asm: mov -0x18(%ebp),%edx
|
| +hex: 8b 55 e8
|
| +
|
| +asm: mov 0x4(%edx),%eax
|
| +hex: 8b 42 04
|
| +
|
| +asm: add $0x4,%eax
|
| +hex: 83 c0 04
|
| +
|
| +asm: mov (%eax),%eax
|
| +hex: 8b 00
|
| +
|
| +asm: mov %eax,(%esp)
|
| +hex: 89 04 24
|
| +
|
| +asm: xchg %ax,%ax
|
| +hex: 66 90
|
| +
|
| +hex: 8d 74 26 00
|
| +
|
| +hex: 8d bc 27 00 00 00 00
|
| +
|
| +asm: call .+2453
|
| +hex: e8 90 09 00 00
|
| +
|
| +asm: mov %eax,-0x8(%ebp)
|
| +hex: 89 45 f8
|
| +
|
| +asm: mov -0x18(%ebp),%eax
|
| +hex: 8b 45 e8
|
| +
|
| +asm: cmpl $0x2,(%eax)
|
| +hex: 83 38 02
|
| +
|
| +asm: jle .+39
|
| +hex: 7e 25
|
| +
|
| +asm: mov -0x18(%ebp),%edx
|
| +hex: 8b 55 e8
|
| +
|
| +asm: xchg %ax,%ax
|
| +hex: 66 90
|
| +
|
| +asm: mov 0x4(%edx),%eax
|
| +hex: 8b 42 04
|
| +
|
| +asm: add $0x8,%eax
|
| +hex: 83 c0 08
|
| +
|
| +asm: mov (%eax),%eax
|
| +hex: 8b 00
|
| +
|
| +asm: mov %eax,(%esp)
|
| +hex: 89 04 24
|
| +
|
| +asm: call .+2421
|
| +hex: e8 70 09 00 00
|
| +
|
| +asm: mov %eax,-0xc(%ebp)
|
| +hex: 89 45 f4
|
| +
|
| +hex: 8d b6 00 00 00 00
|
| +
|
| +hex: 8d bc 27 00 00 00 00
|
| +
|
| +asm: mov -0xc(%ebp),%eax
|
| +hex: 8b 45 f4
|
| +
|
| +asm: mov %eax,0x8002f28
|
| +hex: a3 28 2f 00 08
|
| +
|
| +asm: jmp .+40
|
| +hex: eb 26
|
| +
|
| +hex: 8d b6 00 00 00 00
|
| +
|
| +asm: movl $0x3,0x8(%esp);
|
| +hex: c7 44 24 08 03 00 00 00
|
| +
|
| +asm: movl $0x1,0x4(%esp);
|
| +hex: c7 44 24 04 01 00 00 00
|
| +
|
| +asm: mov -0xc(%ebp),%eax
|
| +hex: 8b 45 f4
|
| +
|
| +asm: mov %eax,(%esp)
|
| +hex: 89 04 24
|
| +
|
| +asm: nop
|
| +hex: 90
|
| +
|
| +hex: 8d 74 26 00
|
| +
|
| +asm: call .+37
|
| +hex: e8 20 00 00 00
|
| +
|
| +asm: cmpl $0x0,-0x8(%ebp)
|
| +hex: 83 7d f8 00
|
| +
|
| +asm: setg %al
|
| +hex: 0f 9f c0
|
| +
|
| +asm: subl $0x1,-0x8(%ebp)
|
| +hex: 83 6d f8 01
|
| +
|
| +asm: test %al,%al
|
| +hex: 84 c0
|
| +
|
| +hex: 8d 76 00
|
| +
|
| +asm: jne .-48
|
| +hex: 75 ce
|
| +
|
| +asm: movl $0x0,(%esp)
|
| +hex: c7 04 24 00 00 00 00
|
| +
|
| +asm: xchg %ax,%ax
|
| +hex: 66 90
|
| +
|
| +asm: call .+293
|
| +hex: e8 20 01 00 00
|
| +nc_out: JUMP TARGET out of range
|
| +
|
| +asm: push %ebp
|
| +hex: 55
|
| +
|
| +asm: mov %esp,%ebp
|
| +hex: 89 e5
|
| +
|
| +asm: sub $0x1c,%esp
|
| +hex: 83 ec 1c
|
| +
|
| +asm: cmpl $0x1,0x8(%ebp)
|
| +hex: 83 7d 08 01
|
| +
|
| +asm: jne .+70
|
| +hex: 75 44
|
| +
|
| +asm: mov 0xc(%ebp),%edx
|
| +hex: 8b 55 0c
|
| +
|
| +asm: nop
|
| +hex: 90
|
| +
|
| +asm: mov 0x8002f24(,%edx,4),%eax
|
| +hex: 8b 04 95 24 2f 00 08
|
| +
|
| +asm: sub $0x1,%eax
|
| +hex: 83 e8 01
|
| +
|
| +hex: 8d b6 00 00 00 00
|
| +
|
| +asm: mov %eax,0x8002f24(,%edx,4)
|
| +hex: 89 04 95 24 2f 00 08
|
| +
|
| +asm: mov 0x10(%ebp),%edx
|
| +hex: 8b 55 10
|
| +
|
| +hex: 8d b6 00 00 00 00
|
| +
|
| +asm: mov 0x8002f24(,%edx,4),%eax
|
| +hex: 8b 04 95 24 2f 00 08
|
| +
|
| +asm: add $0x1,%eax
|
| +hex: 83 c0 01
|
| +
|
| +hex: 8d b6 00 00 00 00
|
| +
|
| +asm: mov %eax,0x8002f24(,%edx,4)
|
| +hex: 89 04 95 24 2f 00 08
|
| +
|
| +asm: jmp .+121
|
| +hex: eb 77
|
| +nc_out: JUMP TARGET out of range
|
| +
|
| +hex: 8d b4 26 00 00 00 00
|
| +
|
| +asm: mov 0x10(%ebp),%eax
|
| +hex: 8b 45 10
|
| +
|
| +asm: mov 0xc(%ebp),%edx
|
| +hex: 8b 55 0c
|
| +
|
| +asm: add %eax,%edx
|
| +hex: 01 c2
|
| +
|
| +asm: mov $0x6,%eax
|
| +hex: b8 06 00 00 00
|
| +
|
| +asm: sub %edx,%eax
|
| +hex: 29 d0
|
| +
|
| +asm: hlt
|
| +hex: f4
|
| +
|
|
|