summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/default-constructor/sb_address.py
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-06-24 00:06:53 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-06-24 00:06:53 +0000
commit4d1f660aced0b9660e65928c87b1a6ddf591f2cb (patch)
treea6f73f0c8779998611a4c5461ccb2674fbda7b67 /lldb/test/python_api/default-constructor/sb_address.py
parent1aae6199338759d7b1d26c3990152f8f9602bcf2 (diff)
downloadbcm5719-llvm-4d1f660aced0b9660e65928c87b1a6ddf591f2cb.tar.gz
bcm5719-llvm-4d1f660aced0b9660e65928c87b1a6ddf591f2cb.zip
Start adding API calls to the invalid SB API object after default construction.
It should not crash lldb. This checkin adds calls for SBAddress. llvm-svn: 133778
Diffstat (limited to 'lldb/test/python_api/default-constructor/sb_address.py')
-rw-r--r--lldb/test/python_api/default-constructor/sb_address.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/test/python_api/default-constructor/sb_address.py b/lldb/test/python_api/default-constructor/sb_address.py
new file mode 100644
index 00000000000..372aafc97c4
--- /dev/null
+++ b/lldb/test/python_api/default-constructor/sb_address.py
@@ -0,0 +1,12 @@
+"""
+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.OffsetAddress(sys.maxint)
+ obj.GetDescription(lldb.SBStream())
OpenPOWER on IntegriCloud