[Lldb-commits] [PATCH] D83327: [lldb/Core] Fix incomplete type variable dereferencing crash.

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 7 10:38:30 PDT 2020


mib created this revision.
mib added reviewers: jingham, labath.
mib added a project: LLDB.
Herald added a subscriber: lldb-commits.

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 at gmail.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83327

Files:
  lldb/source/Core/ValueObject.cpp
  lldb/test/API/functionalities/target_var/Makefile
  lldb/test/API/functionalities/target_var/TestTargetVar.py
  lldb/test/API/functionalities/target_var/globals.c
  lldb/test/API/functionalities/target_var/globals.ll
  lldb/test/API/functionalities/target_var/main.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83327.276133.patch
Type: text/x-patch
Size: 4423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200707/6cd85f9f/attachment.bin>


More information about the lldb-commits mailing list