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

ASSERT callback.c:2841 os_using_app_state(dcontext) due to missing FreeLibrary redirect #1296

Closed
derekbruening opened this issue Nov 28, 2014 · 1 comment

Comments

@derekbruening
Copy link
Contributor

From [email protected] on October 23, 2013 09:23:52

Yet another issue uncovered by the client from issue #1292 :

intercept_unload_dll: C:\Windows\SysWOW64\ntdll.dll @0x77040000 size 0x180000

0:000> kn

ChildEBP RetAddr

00 254ae194 636adf4e ntdll!ZwRaiseHardError+0x12
01 254ae1e4 636766dd dynamorio!nt_messagebox+0xfe [c:\src\dr\git\src\core\win32\ntdll.c @ 3664]
02 254ae20c 634d9354 dynamorio!debugbox+0x4d [c:\src\dr\git\src\core\win32\os.c @ 4606]
03 254aea28 634d9853 dynamorio!notify+0x1e4 [c:\src\dr\git\src\core\utils.c @ 1946]
04 254aeabc 634d4544 dynamorio!report_dynamorio_problem+0x4a3 [c:\src\dr\git\src\core\utils.c @ 2205]
05 254aebf4 63696d7e dynamorio!internal_error+0x124 [c:\src\dr\git\src\core\utils.c @ 183]
06 254aec3c 637ea165 dynamorio!asynch_take_over+0x24e [c:\src\dr\git\src\core\win32\callback.c @ 2841]
07 254aeda4 63e22e3e dynamorio!interception_code_array+0x1165
08 254aedb0 63e2302e dbghelp!NtWin32LiveSystemProvider::~NtWin32LiveSystemProvider+0x1c
09 254aedb8 63e1acbc dbghelp!NtWin32LiveSystemProvider::Release+0x10
0a 254aee10 740f125f dbghelp!MiniDumpWriteDump+0xcf
0b 254aeeb4 2547109c minidump!snap_cb3+0x8f [c:\src\dr\bugs\minidump\minidump.c @ 102]

0:000> U 63e22e3e -7
dbghelp!NtWin32LiveSystemProvider::~NtWin32LiveSystemProvider+0x15:
63e22e37 50 push eax
63e22e38 ff15f0a3ee63 call dword ptr [dbghelp!_imp__FreeLibrary (63eea3f0)]

254aeda8 63e22e3e dbghelp!NtWin32LiveSystemProvider::~NtWin32LiveSystemProvider+0x1c
254aedac 77040000 ntdll!`string' (ntdll+0x0)

77040000 771c0000 ntdll (pdb symbols) c:\src\symbols\wntdll.pdb\69DDFBCBBC14421D8CB974F8EDC414102\wntdll.pdb

0:000> dt -b state
Local var @ 0x254aec44 Type app_state_at_intercept_t*
0x254aec48
+0x000 callee_arg : (null)
+0x004 start_pc : 0x637ea1fd "???"
+0x008 mc : _priv_mcontext_t
+0x000 xdi : 0x254f2dd8
+0x000 edi : 0x254f2dd8
+0x004 xsi : 0x254f27e4
+0x004 esi : 0x254f27e4
+0x008 xbp : 0x254aeda4
+0x008 ebp : 0x254aeda4
+0x00c xsp : 0x254aed98
+0x00c esp : 0x254aed98
+0x010 xbx : 0x77040000
+0x010 ebx : 0x77040000
+0x014 xdx : 1
+0x014 edx : 1
+0x018 xcx : 0x254f27e4
+0x018 ecx : 0x254f27e4
+0x01c xax : 0x77040000
+0x01c eax : 0x77040000
+0x020 xflags : 0x202
+0x020 eflags : 0x202
+0x024 xip : (null)
+0x024 pc : (null)
+0x024 eip : (null)
0:000> U 0x637ea1fd
dynamorio!interception_code_array+0x11fd:
637ea1fd e9625e899c jmp 00080064
0:000> U 00080064
00080064 6a14 push 14h
00080066 68d8bc0677 push offset ntdll! ?? ::FNODOBFM::`string'+0x2e6 (7706bcd8)
0008006b e91e120077 jmp ntdll!LdrUnloadDll+0x7 (7708128e)

So this is just the LdrUnloadDll hook?
It's b/c we don't intercept FreeLibrary.

Original issue: http://code.google.com/p/dynamorio/issues/detail?id=1296

@derekbruening
Copy link
Contributor Author

From [email protected] on October 23, 2013 12:44:00

This issue was closed by revision r2332 .

Status: Fixed

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