mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13:22 +08:00
[0.2.x] added : test reproducing stack overflow
git-svn-id: https://pykd.svn.codeplex.com/svn@81713 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
26f4a16d43
commit
af34c5da49
@ -63,11 +63,11 @@ class ModuleTest( unittest.TestCase ):
|
||||
fileName = pykd.getSourceFile(target.module.FuncWithName0 )
|
||||
self.assertTrue( re.search('targetapp\\.cpp', fileName ) )
|
||||
fileName, lineNo, displacement = pykd.getSourceLine( target.module.FuncWithName0 + 2)
|
||||
self.assertEqual( 393, lineNo )
|
||||
self.assertEqual( 395, lineNo )
|
||||
self.assertTrue( re.search('targetapp\\.cpp', fileName ) )
|
||||
self.assertEqual( 2, displacement )
|
||||
fileName, lineNo, displacement = pykd.getSourceLine()
|
||||
self.assertEqual( 639, lineNo )
|
||||
self.assertEqual( 644, lineNo )
|
||||
|
||||
def testEnumSymbols( self ):
|
||||
lst = target.module.enumSymbols()
|
||||
|
@ -289,3 +289,13 @@ class TypedVarTest( unittest.TestCase ):
|
||||
for field in tv:
|
||||
str( field )
|
||||
|
||||
def testDeadlockList(self):
|
||||
|
||||
lst = []
|
||||
entry = pykd.typedVar("entry1").Flink
|
||||
for i in range( 0, 100000 ):
|
||||
lst.append(entry)
|
||||
entry = entry.deref().Flink
|
||||
|
||||
|
||||
|
||||
|
@ -197,6 +197,8 @@ listStruct g_listItem1 = { 1 };
|
||||
listStruct g_listItem2 = { 2 };
|
||||
listStruct g_listItem3 = { 3 };
|
||||
|
||||
LIST_ENTRY entry1;
|
||||
LIST_ENTRY entry2;
|
||||
|
||||
struct listStruct1;
|
||||
|
||||
@ -596,6 +598,9 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
InsertTailList( &g_listHead, &g_listItem2.listEntry );
|
||||
InsertTailList( &g_listHead, &g_listItem3.listEntry );
|
||||
|
||||
entry1.Flink = &entry2;
|
||||
entry2.Flink = &entry1;
|
||||
|
||||
g_listHead1 = &g_listItem11;
|
||||
g_listItem11.next = &g_listItem12;
|
||||
g_listItem12.next = &g_listItem13;
|
||||
|
Loading…
Reference in New Issue
Block a user