-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldb/Core] Fix crash in ValueObject::CreateChildAtIndex
The patch fixes a crash in ValueObject::CreateChildAtIndex caused by a null pointer dereferencing. This is a corner case that is happening when trying to dereference a variable with an incomplete type, and this same variable doesn't have a synthetic value to get the child ValueObject. If this happens, lldb will now return a null pointer that will results in an error message. rdar://65181171 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
- Loading branch information
1 parent
9dfea03
commit 7177e63
Showing
6 changed files
with
20 additions
and
56 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
include Makefile.rules | ||
C_SOURCES := main.c | ||
|
||
a.out: globals.ll | ||
$(CC) $(CFLAGS) -g -c $^ -o globals.o | ||
$(LD) $(LDFLAGS) -g globals.o -o $@ | ||
include Makefile.rules |
This file contains 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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,7 @@ | ||
int i = 42; | ||
int *p = &i; | ||
|
||
struct incomplete; | ||
struct incomplete *var = (struct incomplete *)0xdead; | ||
|
||
int main() { return *p; } |