This is an archive of the discontinued LLVM Phabricator instance.

[LLDB] Discard register flags where the size doesn't match the register
ClosedPublic

Authored by DavidSpickett on Apr 19 2023, 6:41 AM.

Details

Summary

In the particular case I was looking at I autogenerated a 128 bit set
of flags that is only 64 bit. This doesn't crash lldb but it was certainly
not expected.

I suspect that we would have crashed if the top 64 bits weren't
marked as unused (or at least invoked some very undefined behaviour).

When this happens, log the details and ignore the flags. Like this:

Size of register flags TTBR0_EL1_flags (16 bytes) for register TTBR0_EL1 does not match the register size (8 bytes). Ignoring this set of flags.

Turns out a few of the tests relied on this bug so I have updated
them and added a specific test for this case.

Diff Detail

Event Timeline

DavidSpickett created this revision.Apr 19 2023, 6:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2023, 6:41 AM
DavidSpickett requested review of this revision.Apr 19 2023, 6:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2023, 6:41 AM
This revision is now accepted and ready to land.Apr 19 2023, 3:07 PM