Verify that all members are poisoned
Details
Diff Detail
Event Timeline
Please run through clang-format.
Also, the title should say "diamond", not "triangle" inheritance.
And you probably want to test shadow in all destructors, otherwise this test does not do much.
test/msan/dtor-multiple-inheritance.cc | ||
---|---|---|
69 | typo: d->w |
- testing virtual functions and virtual bases poisoning proper size
- Runtime testing of destroying diamond inheritance
I'd remove all testing of pointer values, like this one:
(&d->y_ptr, sizeof(d->y_ptr))
It does not add any value and only makes the test longer. The interesting ones are x, y, z and w.
+llvm-commits (please don't forget adding llvm-commits or cfe-commits (as appropriate) to the subscribers).
- Test poisoning on multiple inheritance with nontrivial and trivial members.
Verify that sanitization on member-by-member basis correctly poisons
trivial members, and skips nontrivial members.
test/msan/dtor-bit-fields.cc | ||
---|---|---|
49 | I know the destructor is invoked here and when main exits, but how is that undefined behavior? |
test/msan/dtor-bit-fields.cc | ||
---|---|---|
49 | The second destructor call qualifies as access after the end of the object lifetime, I think. That's exactly what we are trying to detect here; in this simple case the destructor does not actually read the object memory, so we do not catch the problem. |
test/msan/dtor-bit-fields.cc | ||
---|---|---|
2 | Please remove this in other 2 tests as well. |
Please remove this in all new tests:
This is not needed when not running FileCheck, and can make failure logs less verbose.