mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-13 03:12:46 +00:00
[lldb] Fix nondeterminism in TestCppBitfields
The test was printing a char[3] variable without a terminating nul. The memory after that variable (an unnamed bitfield) was not initialized. If the memory happened to be nonzero, the summary provider for the variable would run off into the next field. This is probably not the right behavior (it should stop at the end of the array), but this is not the purpose of this test. I have filed pr44649 for this bug, and fixed the test to not depend on this behavior.
This commit is contained in:
parent
0ae13766ff
commit
77cedb0cdb
@ -80,7 +80,7 @@ class CppBitfieldsTestCase(TestBase):
|
||||
"frame variable --show-types lbd",
|
||||
VARIABLES_DISPLAYED_CORRECTLY,
|
||||
substrs=[
|
||||
'(char [3]) arr = "abc"',
|
||||
'(char [3]) arr = "ab"',
|
||||
'(int:32) =',
|
||||
'(unsigned int:20) a = 5',
|
||||
])
|
||||
|
@ -73,7 +73,7 @@ int main(int argc, char const *argv[]) {
|
||||
|
||||
lbd.arr[0] = 'a';
|
||||
lbd.arr[1] = 'b';
|
||||
lbd.arr[2] = 'c';
|
||||
lbd.arr[2] = '\0';
|
||||
lbd.a = 5;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user