raw2trace failing on 32-bit vdso release build
[drmemtrace]: About to read thread 10509 at pos 1112504
[drmemtrace]: Appending 5 instrs in bb 0x0901621b in mod 5 +0x1050 = [vdso]
0xf7d60050 push %ecx %esp -> %esp 0xfffffffc(%esp)[4byte]
[drmemtrace]: Appended memref type 1 size 4 to 0xffdc28c0
0xf7d60051 push %edx %esp -> %esp 0xfffffffc(%esp)[4byte]
[drmemtrace]: Appended memref type 1 size 4 to 0xffdc28bc
0xf7d60052 push %ebp %esp -> %esp 0xfffffffc(%esp)[4byte]
[drmemtrace]: Appended memref type 1 size 4 to 0xffdc28b8
0xf7d60053 mov %esp -> %ebp
0xf7d60055 sysenter -> %esp
[drmemtrace]: About to read thread 10509 at pos 1112544
[drmemtrace]: Thread 10509 timestamp 0x002ec99be02737c0
[drmemtrace]: Next thread in timestamp order is 10509 @0x002ec99be02737c0
[drmemtrace]: About to read thread 10509 at pos 1112544
[drmemtrace]: Appended marker type 3 value 2
[drmemtrace]: About to read thread 19374 at pos 1112552
[drmemtrace]: Appending 4 instrs in bb 0x08e8b224 in mod 5 +0x1059 = [vdso]
0xf7d60059 jmp $0x62c8610d
ERROR: Conversion failed: invalid cti
Debug build:
interp: start_pc = 0xf7c11050
0xf7c11050 51 push %ecx %esp -> %esp 0xfffffffc(%esp)[4byte]
0xf7c11051 52 push %edx %esp -> %esp 0xfffffffc(%esp)[4byte]
0xf7c11052 55 push %ebp %esp -> %esp 0xfffffffc(%esp)[4byte]
0xf7c11053 89 e5 mov %esp -> %ebp
0xf7c11055 0f 34 sysenter -> %esp
end_pc = 0xf7c11057
interp: start_pc = 0xf7c1105e
0xf7c1105e 5d pop %esp (%esp)[4byte] -> %ebp %esp
0xf7c1105f 5a pop %esp (%esp)[4byte] -> %edx %esp
0xf7c11060 59 pop %esp (%esp)[4byte] -> %ecx %esp
0xf7c11061 c3 ret %esp (%esp)[4byte] -> %esp
end_pc = 0xf7c11062
Debug build trace:
[drmemtrace]: Appending 5 instrs in bb 0x08976217 in mod 5 +0x1050 = [vdso]
0xf7c3b050 push %ecx %esp -> %esp 0xfffffffc(%esp)[4byte]
[drmemtrace]: Appended memref type 1 size 4 to 0xffd294d0
0xf7c3b051 push %edx %esp -> %esp 0xfffffffc(%esp)[4byte]
[drmemtrace]: Appended memref type 1 size 4 to 0xffd294cc
0xf7c3b052 push %ebp %esp -> %esp 0xfffffffc(%esp)[4byte]
[drmemtrace]: Appended memref type 1 size 4 to 0xffd294c8
0xf7c3b053 mov %esp -> %ebp
0xf7c3b055 sysenter -> %esp
[drmemtrace]: About to read thread 10747 at pos 1112600
[drmemtrace]: Thread 10747 timestamp 0x002ec99bf37a916d
[drmemtrace]: Next thread in timestamp order is 10747 @0x002ec99bf37a916d
[drmemtrace]: About to read thread 10747 at pos 1112600
[drmemtrace]: Appended marker type 3 value 4
[drmemtrace]: About to read thread 10747 at pos 1112608
[drmemtrace]: Appending 4 instrs in bb 0x08976220 in mod 5 +0x1059 = [vdso]
0xf7c3b059 pop %esp (%esp)[4byte] -> %ebp %esp
[drmemtrace]: Appended memref type 0 size 4 to 0xffd294c8
0xf7c3b05a pop %esp (%esp)[4byte] -> %edx %esp
[drmemtrace]: Appended memref type 0 size 4 to 0xffd294cc
0xf7c3b05b pop %esp (%esp)[4byte] -> %ecx %esp
[drmemtrace]: Appended memref type 0 size 4 to 0xffd294d0
0xf7c3b05c ret %esp (%esp)[4byte] -> %esp
Here's why: the recording is done at the end, and debug unhooks while release does not:
hooking vsyscall page @0xf7bb8059
Hello, world!
<Stopping application /work/dr/git/build_x86_dbg_tests/suite/tests/bin/simple_app (16227)>
unhooking vsyscall page @0xf7bb8059
recording vdso 0xf7bb7000-0x00002000
hooking vsyscall page @0xf7da8059
Hello, world!
recording vdso 0xf7da7000-0x00002000
Either need instru_offline to store vdso up front (pre-hook) or have release DR do the unhook.