-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[lldb][llvm] Return an error instead of crashing when parsing a line table prologue. #80769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -823,7 +823,9 @@ TEST_F(DebugLineBasicFixture, ErrorForUnsupportedAddressSizeDefinedInHeader) { | |
nullptr, RecordRecoverable); | ||
EXPECT_THAT_ERROR( | ||
std::move(Recoverable), | ||
FailedWithMessage("address size 0x09 of DW_LNE_set_address opcode at " | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like this test change removed coverage for a different error message, by failing earlier? This test should probably be restored by modifying it to be reachable, or the original code's error handling should be turned into an assertion if the diagnostic is now an invariant for the code? |
||
FailedWithMessage("parsing line table prologue at offset 0x00000000: " | ||
"invalid address size 9", | ||
"address size 0x09 of DW_LNE_set_address opcode at " | ||
"offset 0x00000038 is unsupported")); | ||
ASSERT_THAT_EXPECTED(ExpectedLineTable, Succeeded()); | ||
ASSERT_EQ((*ExpectedLineTable)->Rows.size(), 3u); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this path isn't tested? Could you add a test?