forked from OSchip/llvm-project
Add fuzz calls for SBSymbol and SBSymbolContext.
llvm-svn: 134042
This commit is contained in:
parent
421bb42c9f
commit
c74ed6b0de
|
@ -249,6 +249,9 @@ class APIDefaultConstructorTestCase(TestBase):
|
|||
if self.TraceOn():
|
||||
print obj
|
||||
self.assertFalse(obj)
|
||||
# Do fuzz testing on the invalid obj, it should not crash lldb.
|
||||
import sb_symbol
|
||||
sb_symbol.fuzz_obj(obj)
|
||||
|
||||
@python_api_test
|
||||
def test_SBSymbolContext(self):
|
||||
|
@ -256,6 +259,9 @@ class APIDefaultConstructorTestCase(TestBase):
|
|||
if self.TraceOn():
|
||||
print obj
|
||||
self.assertFalse(obj)
|
||||
# Do fuzz testing on the invalid obj, it should not crash lldb.
|
||||
import sb_symbolcontext
|
||||
sb_symbolcontext.fuzz_obj(obj)
|
||||
|
||||
@python_api_test
|
||||
def test_SBSymbolContextList(self):
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
"""
|
||||
Fuzz tests an object after the default construction to make sure it does not crash lldb.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import lldb
|
||||
|
||||
def fuzz_obj(obj):
|
||||
obj.GetName()
|
||||
obj.GetMangledName()
|
||||
obj.GetInstructions(lldb.SBTarget())
|
||||
obj.GetStartAddress()
|
||||
obj.GetEndAddress()
|
||||
obj.GetPrologueByteSize()
|
||||
obj.GetType()
|
||||
obj.GetDescription(lldb.SBStream())
|
|
@ -0,0 +1,15 @@
|
|||
"""
|
||||
Fuzz tests an object after the default construction to make sure it does not crash lldb.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import lldb
|
||||
|
||||
def fuzz_obj(obj):
|
||||
obj.GetModule()
|
||||
obj.GetCompileUnit()
|
||||
obj.GetFunction()
|
||||
obj.GetBlock()
|
||||
obj.GetLineEntry()
|
||||
obj.GetSymbol()
|
||||
obj.GetDescription(lldb.SBStream())
|
Loading…
Reference in New Issue