DynamoRIO / DynamoRIO/drmemory

callstack goes beyond StackBase

Open
#588 0 comments 0 reactions 0 assignees View on GitHub
Migrated OpSys-Windows Priority-Medium Usability
Dominant language
C
Stars
2.7k
Forks
290
PR merge metrics
No merged PRs in 30d

Description

_From [bruen...@google.com](https://code.google.com/u/109494838902877177630/) on September 12, 2011 13:58:14_

I thought about putting this in place long ago but never did

on a sample app the callstack goes too far:

Error `#1`: LEAK 3 direct bytes 0x0051bc40-0x0051bc43 + 0 indirect bytes
#0 homework3.exe!operator new [f:\dd\vctools\crt_bld\self_x86\crt\src\new.cpp:59]
#1 homework3.exe!Table::push_back_row
#2 homework3.exe!main
#3 homework3.exe!__tmainCRTStartup [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c:266]
#4 KERNEL32.dll!BaseThreadInitThunk
#5 ntdll.dll!__RtlUserThreadStart
#6 ntdll.dll!_RtlUserThreadStart
#7 homework3.exe!__crtInitCritSecAndSpinCount [f:\dd\vctools\crt_bld\self_x86\crt\src\initcrit.c:79]
#8 homework3.exe!__crtInitCritSecAndSpinCount [f:\dd\vctools\crt_bld\self_x86\crt\src\initcrit.c:79]

0:000> dds @@(mc->esp)
0018fe8c 00000023
0018fe90 008ebae0
0018fe94 008ebb70
0018fe98 00000002
0018fe9c 0018fed4
0018fea0 00403636 homework3!Table::push_back_row+0x76
0018fea4 00000003
...
0018fed4 0018ff40
0018fed8 00401808 homework3!main+0x128
...
0018ff40 0018ff88
0018ff44 004092d7 homework3!__tmainCRTStartup+0xfb [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 266]
...
0018ff78 0018ffc4
0018ff7c 0040f570 homework3!_except_handler4
0018ff80 ac4ac43d
0018ff84 00000000
0018ff88 0018ff94
0018ff8c 75043677 kernel32!BaseThreadInitThunk+0x12
0018ff90 7efde000
0018ff94 0018ffd4
0018ff98 772b9f02 ntdll!__RtlUserThreadStart+0x70
...
0018ffc4 ffffffff
0018ffc8 772f0ae5 ntdll!_except_handler4
0018ffcc 1fddff82
0018ffd0 00000000
0018ffd4 0018ffec
0018ffd8 772b9ed5 ntdll!_RtlUserThreadStart+0x1b
0018ffdc 0040932e homework3!mainCRTStartup [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 172]
0018ffe0 7efde000
0018ffe4 00000000
0018ffe8 00000000
0018ffec 00000000
0018fff0 00000000
0018fff4 0040932e homework3!mainCRTStartup [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 172]
0018fff8 7efde000
0018fffc 00000000
...
0019055c 0077006f
00190560 002e0073 KERNEL32_230000!SetConsoleMaximumWindowSize+0xc98
00190564 00730049
00190568 006c006f
0019056c 00740061
00190570 006f0069
00190574 0041006e homework3!__crtInitCritSecAndSpinCount+0xc [f:\dd\vctools\crt_bld\self_x86\crt\src\initcrit.c @ 82]
...
00190628 006f0069
0019062c 0041006e homework3!__crtInitCritSecAndSpinCount+0xc [f:\dd\vctools\crt_bld\self_x86\crt\src\initcrit.c @ 82]

0:000> U 0041006e-5
homework3!__crtInitCritSecAndSpinCount+0x7 [f:\dd\vctools\crt_bld\self_x86\crt\src\initcrit.c @ 79]:
00410069 e872f4ffff call homework3!__SEH_prolog4 (0040f4e0)
0041006e 8365fc00 and dword ptr [ebp-0x4],0x0
00410072 ff750c push dword ptr [ebp+0xc]

0:000> dt pt
+0x00c stack_lowest_frame : 0x00190628 "i"

!teb
StackBase: 00190000
StackLimit: 00188000

_Original issue: http://code.google.com/p/drmemory/issues/detail?id=588_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.