summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-04-10 21:18:44 +0000
committerAdrian Prantl <aprantl@apple.com>2019-04-10 21:18:44 +0000
commit3cc634d0936ecc1b48e158f687f9f6527bcd8fca (patch)
tree35035e355576eaaa9c54a54f43eb0cec9311259e /lldb/packages/Python/lldbsuite/test
parentde051dfe029ba3e6fb0be31bd94ef3d08ebcfdc7 (diff)
downloadbcm5719-llvm-3cc634d0936ecc1b48e158f687f9f6527bcd8fca.tar.gz
bcm5719-llvm-3cc634d0936ecc1b48e158f687f9f6527bcd8fca.zip
Fix undefined behavior in DWARFASTParser::ParseChildArrayInfo()
PR40827: https://bugs.llvm.org/show_bug.cgi?id=40827 <rdar://problem/48729057> llvm-svn: 358137
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py b/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py
index a47e6c311d4..da3a46ac0bc 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py
@@ -175,6 +175,8 @@ class ArrayTypesTestCase(TestBase):
self.DebugSBValue(variable)
self.assertTrue(variable.GetNumChildren() == 4,
"Variable 'strings' should have 4 children")
+ byte_size = variable.GetByteSize()
+ self.assertTrue(byte_size >= 4*4 and byte_size <= 1024)
child3 = variable.GetChildAtIndex(3)
self.DebugSBValue(child3)
OpenPOWER on IntegriCloud