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

need to redirect RtlValidateHeap since called by C++ DllMain #560

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

need to redirect RtlValidateHeap since called by C++ DllMain #560

derekbruening opened this issue Nov 28, 2014 · 1 comment

Comments

@derekbruening
Copy link
Contributor

From [email protected] on September 23, 2011 11:39:37

xref master case issue #235 heap validation failing during crt init in drmemorylib when using C++ file

the user32 for issue #486 was being loaded to pop up a VC assert box for failing
a heap validation during init

HEAP[registers.exe]: Invalid heap signature for heap at 22225b2c, passed to RtlValidateHeap
(d58.ac8): Break instruction exception - code 80000003 (first chance)
00 00dbf0f4 7d683c79 ntdll!DbgBreakPoint
01 00dbf0fc 7d658554 ntdll!RtlpBreakPointHeap+0x28
02 00dbf110 7d642d87 ntdll!RtlpCheckHeapSignature+0x6a
03 00dbf170 00e07e8d ntdll!RtlValidateHeap+0xab
WARNING: Frame IP not in any known module. Following frames may be wrong.
04 00dbf184 1017098e 0xe07e8d
05 00dbf1a0 1016fa76 drmemorylib!_CrtIsValidHeapPointer+0xde [f:\sp\vctools\crt_bld\self_x86\crt\src\dbgheap.c @ 2072]
06 00dbf1b0 1016f92e drmemorylib!_free_dbg_nolock+0x116 [f:\sp\vctools\crt_bld\self_x86\crt\src\dbgheap.c @ 1279]
07 00dbf1e8 1016f8ae drmemorylib!_free_dbg+0x4e [f:\sp\vctools\crt_bld\self_x86\crt\src\dbgheap.c @ 1220]
08 00dbf1f8 10180e6d drmemorylib!free+0xe [f:\sp\vctools\crt_bld\self_x86\crt\src\dbgheap.c @ 1178]
09 00dbf208 10196a69 drmemorylib!_freea+0x2d [f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h @ 257]
0a 00dbf238 1019682c drmemorylib!__crtGetStringTypeA_stat+0x219 [f:\sp\vctools\crt_bld\self_x86\crt\src\a_str.c @ 176]
0b 00dbf274 1017e45c drmemorylib!__crtGetStringTypeA+0x3c [f:\sp\vctools\crt_bld\self_x86\crt\src\a_str.c @ 206]
0c 00dbf7c4 1017e1b1 drmemorylib!setSBUpLow+0x10c [f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.c @ 427]
0d 00dbf800 1017dbb7 drmemorylib!_setmbcp_nolock+0x311 [f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.c @ 787]
0e 00dbf848 1017e713 drmemorylib!_setmbcp+0xb7 [f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.c @ 612]
0f 00dbf854 10181a2b drmemorylib!__initmbctable+0x13 [f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.c @ 854]
10 00dbf870 1016d9d1 drmemorylib!_setargv+0x1b [f:\sp\vctools\crt_bld\self_x86\crt\src\stdargv.c @ 103]
11 00dbf894 1016dc48 drmemorylib!_CRT_INIT+0x181 [f:\sp\vctools\crt_bld\self_x86\crt\src\dllcrt0.c @ 179]
12 00dbf8e0 1016db9f drmemorylib!__DllMainCRTStartup+0x98 [f:\sp\vctools\crt_bld\self_x86\crt\src\dllcrt0.c @ 359]
13 00dbf8f4 1527a68a drmemorylib!_DllMainCRTStartup+0x1f [f:\sp\vctools\crt_bld\self_x86\crt\src\dllcrt0.c @ 328]
14 00dbf918 15198e19 dynamorio!privload_call_entry+0xea [e:\derek\dr\git\src\core\win32\loader.c @ 1093]
15 00dbf930 15197f8e dynamorio!privload_load_finalize+0x119 [e:\derek\dr\git\src\core\loader_shared.c @ 519]
16 00dbf9ac 15058fc8 dynamorio!loader_init+0x1ae [e:\derek\dr\git\src\core\loader_shared.c @ 120]
17 00dbfe14 151f7271 dynamorio!dynamorio_app_init+0x208 [e:\derek\dr\git\src\core\dynamo.c @ 497]
18 00dbfe60 15001008 dynamorio!auto_setup+0x21 [e:\derek\dr\git\src\core\x86\x86_code.c @ 142]
19 00000000 00000000 dynamorio!dynamo_auto_start+0x8

0:000> U 1017098e -6
drmemorylib!_CrtIsValidHeapPointer+0xd8 [f:\sp\vctools\crt_bld\self_x86\crt\src\dbgheap.c @ 2047]:
10170988 ff157c983410 call dword ptr [drmemorylib!_imp__HeapValidate (1034987c)]
0:000> dd 1034987c
1034987c 00e07e79 00dd8de9 1527bb40 00de0340
0:000> U 00e07e79
kernel32_dc0000!HeapValidate:

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

@derekbruening
Copy link
Contributor Author

From [email protected] on September 26, 2011 11:14:22

This issue was closed by revision r996 .

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