summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-12-15 01:55:36 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-12-15 01:55:36 +0000
commit95873a68f42e278072f8b0bf253c50defd9de037 (patch)
treea4e93c83f9723a7d301d7632cc683f6bc61bedfe /lldb/test/python_api
parent30373150a1a164fa3374ea2e99a258c8e93d732e (diff)
downloadbcm5719-llvm-95873a68f42e278072f8b0bf253c50defd9de037.tar.gz
bcm5719-llvm-95873a68f42e278072f8b0bf253c50defd9de037.zip
http://llvm.org/bugs/show_bug.cgi?id=11579
lldb::SBValue::CreateValueFromAddress does not verify SBType::GetPointerType succeeds SBValue::CreateValueFromAddress() should check the validity of type and its derived pointer type before using it. Add a test case. llvm-svn: 146629
Diffstat (limited to 'lldb/test/python_api')
-rw-r--r--lldb/test/python_api/sbdata/TestSBData.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/test/python_api/sbdata/TestSBData.py b/lldb/test/python_api/sbdata/TestSBData.py
index e393fda7a23..c1c2e6f9f8a 100644
--- a/lldb/test/python_api/sbdata/TestSBData.py
+++ b/lldb/test/python_api/sbdata/TestSBData.py
@@ -112,6 +112,11 @@ class SBDataAPICase(TestBase):
foobar_addr = star_foobar.GetLoadAddress()
foobar_addr += 12
+ # http://llvm.org/bugs/show_bug.cgi?id=11579
+ # lldb::SBValue::CreateValueFromAddress does not verify SBType::GetPointerType succeeds
+ # This should not crash LLDB.
+ nothing = foobar.CreateValueFromAddress("nothing", foobar_addr, star_foobar.GetType().GetBasicType(lldb.eBasicTypeInvalid))
+
new_foobar = foobar.CreateValueFromAddress("f00", foobar_addr, star_foobar.GetType())
if self.TraceOn():
OpenPOWER on IntegriCloud