diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-12-15 01:55:36 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-12-15 01:55:36 +0000 |
| commit | 95873a68f42e278072f8b0bf253c50defd9de037 (patch) | |
| tree | a4e93c83f9723a7d301d7632cc683f6bc61bedfe /lldb/test/python_api | |
| parent | 30373150a1a164fa3374ea2e99a258c8e93d732e (diff) | |
| download | bcm5719-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.py | 5 |
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(): |

