[all-commits] [llvm/llvm-project] fffc59: [lldb][NativePDB] Handle invalid type references g...

Nerixyz via All-commits all-commits at lists.llvm.org
Mon Jun 8 12:47:48 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fffc591d831ace2fb4da53c5bdb7c44dac810ccb
      https://github.com/llvm/llvm-project/commit/fffc591d831ace2fb4da53c5bdb7c44dac810ccb
  Author: Nerixyz <nerixdev at outlook.de>
  Date:   2026-06-08 (Mon, 08 Jun 2026)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilderClang.cpp
    A lldb/test/Shell/SymbolFile/NativePDB/invalid-type-refs.yaml

  Log Message:
  -----------
  [lldb][NativePDB] Handle invalid type references gracefully (#202371)

Incrementally linked PDBs can contain semantically incorrect references
to types from the symbol streams and the IPI stream.
I can't reproduce it reliably, but as mentioned in #200452, at some
point the references become incorrect.

We should not crash if we receive such PDBs as input. Here I noticed two
issues:

1. `CVTagRecord` requires the passed type to be a type record
(union/struct/class). We should check that this is the case with
`IsTagRecord`.
2. After casting the return of `GetOrCreateClangType`, check that it's
the expected type (not null).

I added a test for both cases.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list