aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py')
-rw-r--r--packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py
new file mode 100644
index 000000000000..09d62f970480
--- /dev/null
+++ b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py
@@ -0,0 +1,17 @@
+"""
+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.GetSize()
+ obj.GetInstructionAtIndex(0xffffffff)
+ obj.AppendInstruction(lldb.SBInstruction())
+ obj.Print(None)
+ obj.GetDescription(lldb.SBStream())
+ obj.DumpEmulationForAllInstructions("armv7")
+ obj.Clear()
+ for inst in obj:
+ s = str(inst)