Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible wrong callstack with KERNELBASE!_EH4_GlobalUnwind #1385

Open
derekbruening opened this issue Nov 28, 2014 · 2 comments
Open

Possible wrong callstack with KERNELBASE!_EH4_GlobalUnwind #1385

derekbruening opened this issue Nov 28, 2014 · 2 comments

Comments

@derekbruening
Copy link
Contributor

From zhao...@google.com on November 15, 2013 17:01:42

Some callstack has KERNELBASE!_EH4_GlobalUnwind

#0 system call NtGdiSelectBitmap ^M
#1 GDI32.dll!SelectObject^M
#2 USER32.dll!BitmapFromDIB^M
#3 USER32.dll!ConvertDIBBitmap^M
#4 USER32.dll!CopyBmp ^M
#5 USER32.dll!CopyIcoCur^M
#6 USER32.dll!InternalCopyImage^M
#7 USER32.dll!__ClientCopyImage^M
#8 KERNELBASE.dll!_EH4_GlobalUnwind^M
#9 USER32.dll!VerNtUserCreateWindowEx^M
#10 USER32.dll!_CreateWindowEx^M
#11 USER32.dll!CreateWindowExW^M
#12 USER32.dll!CreateIMEUI^M

The KERNELBASE.dll!_EH4_GlobalUnwind is likely to be wrong.
From the asm code
KERNELBASE!_EH4_GlobalUnwind:
755b72da 55 push ebp
755b72db 8bec mov ebp,esp
755b72dd 53 push ebx
755b72de 56 push esi
755b72df 57 push edi
755b72e0 6a00 push 0x0
755b72e2 6a00 push 0x0
755b72e4 68ef725b75 push 0x755b72ef
755b72e9 51 push ecx
755b72ea e891020000 call KERNELBASE!RtlUnwind (755b7580)
755b72ef 5f pop edi
755b72f0 5e pop esi
755b72f1 5b pop ebx
755b72f2 5d pop ebp
755b72f3 c3 ret
It may caused by this "push 0x755b72ef".

Original issue: http://code.google.com/p/drmemory/issues/detail?id=1385

@derekbruening
Copy link
Contributor Author

From zhao...@google.com on November 15, 2013 14:04:59

Another example:
kernel32!_EH4_GlobalUnwind:
753dd7a2 55 push ebp
753dd7a3 8bec mov ebp,esp
753dd7a5 53 push ebx
753dd7a6 56 push esi
753dd7a7 57 push edi
753dd7a8 6a00 push 0x0
753dd7aa 6a00 push 0x0
753dd7ac 68b7d73d75 push 0x753dd7b7
753dd7b1 51 push ecx
753dd7b2 e823690700 call kernel32!RtlUnwind (754540da)
753dd7b7 5f pop edi
753dd7b8 5e pop esi
753dd7b9 5b pop ebx
753dd7ba 5d pop ebp
753dd7bb c3 ret

@derekbruening
Copy link
Contributor Author

From zhao...@google.com on November 15, 2013 14:17:10

For such kind of thing, maybe we can find the code patter something like:
push ret_addr
push ecx
call
ret_addr:
pop edi
maintain a list of ret_addr, and tell the callstack component to ignore those ret_addr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant