aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/python_api/default-constructor/sb_address.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/python_api/default-constructor/sb_address.py')
-rw-r--r--packages/Python/lldbsuite/test/python_api/default-constructor/sb_address.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_address.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_address.py
new file mode 100644
index 000000000000..f0e979543a4c
--- /dev/null
+++ b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_address.py
@@ -0,0 +1,22 @@
+"""
+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.GetFileAddress()
+ obj.GetLoadAddress(lldb.SBTarget())
+ obj.SetLoadAddress(0xffff, lldb.SBTarget())
+ obj.OffsetAddress(sys.maxsize)
+ obj.GetDescription(lldb.SBStream())
+ obj.GetSection()
+ obj.GetSymbolContext(lldb.eSymbolContextEverything)
+ obj.GetModule()
+ obj.GetCompileUnit()
+ obj.GetFunction()
+ obj.GetBlock()
+ obj.GetSymbol()
+ obj.GetLineEntry()
+ obj.Clear()