-
Notifications
You must be signed in to change notification settings - Fork 13.7k
[llvm-dwarfdump] Add a null-check in prettyPrintBaseTypeRef
.
#93156
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
Merged
dwblaikie
merged 4 commits into
llvm:main
from
mgschossmann:prettyprintbasetype-nullcheck
Jun 7, 2024
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d047236
[llvm-dwarfdump] Add a null-check in `prettyPrintBaseTypeRef`. Fixes …
mgschossmann a0d8a4a
added test
mgschossmann b9796d6
changed to early return, removed whitespace in test, clang-format
mgschossmann c7b1a0a
replaced test binary with hand-written .debug_loclists section
mgschossmann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# REQUIRES: x86-registered-target | ||
|
||
|
||
# This test checks whether llvm-dwarfdump correctly handles base type | ||
# references when dumping the .debug_loclists section. | ||
|
||
# When dumping the .debug_loclists section, the corresponding compile unit | ||
# for a base type reference is not known and therefore it cannot be resolved. | ||
|
||
# prettyPrintBaseTypeRef must handle this case by printing only reduced | ||
# information without crashing. | ||
|
||
|
||
# RUN: llvm-mc %s -filetype=obj -triple=x86_64 -o %t | ||
# RUN: llvm-dwarfdump %t --debug-loclists | FileCheck %s | ||
|
||
# CHECK: 0x0000000c: | ||
# CHECK-NEXT: <default>: DW_OP_regval_type XMM0 <base_type ref: 0x2a>, DW_OP_stack_value | ||
|
||
|
||
.section .debug_loclists,"",@progbits | ||
.long .Ldebug_loc1-.Ldebug_loc0 # Length | ||
.Ldebug_loc0: | ||
.value 0x5 # Version | ||
.byte 0x8 # Address size | ||
.byte 0 # Segmen selector size | ||
.long 0 # Offset entry count | ||
|
||
.byte 0x5 # DW_LLE_default_location | ||
.uleb128 0x4 # Loc expr size | ||
.byte 0xa5 # DW_OP_regval_type | ||
.uleb128 0x11 # XMM0 | ||
.uleb128 0x2a # <base_type ref: 0x2a> | ||
.byte 0x9f # DW_OP_stack_value | ||
|
||
.byte 0 # DW_LLE_end_of_list | ||
.Ldebug_loc1: |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.