[all-commits] [llvm/llvm-project] 76ed0a: [CodeView] Expose fallible type accessors in TpiSt...

Nerixyz via All-commits all-commits at lists.llvm.org
Tue Mar 31 05:45:02 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 76ed0ad3577e0c96406601d23552befb5a250c6a
      https://github.com/llvm/llvm-project/commit/76ed0ad3577e0c96406601d23552befb5a250c6a
  Author: Nerixyz <nerixdev at outlook.de>
  Date:   2026-03-31 (Tue, 31 Mar 2026)

  Changed paths:
    M llvm/include/llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h
    M llvm/include/llvm/DebugInfo/PDB/Native/TpiStream.h
    M llvm/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp
    M llvm/lib/DebugInfo/PDB/Native/TpiStream.cpp
    M llvm/unittests/DebugInfo/PDB/CMakeLists.txt
    A llvm/unittests/DebugInfo/PDB/TpiStreamTest.cpp

  Log Message:
  -----------
  [CodeView] Expose fallible type accessors in TpiStream (#188299)

`LazyRandomTypeCollection` already has fallible functions for
`getType(TypeIndex)` this exposes them in `TpiStream` and does a mini
cleanup in `LazyRandomTypeCollection`'s `GetType`.

Context: #186948 saw a crash in LLDB where we call `GetType` without
checking the type index before calling the method. In `GetType` we
called `error(std::move(EC))`, which ignores the error in release mode.
The cause was the type index `0x80000169` in an `S_LOCAL`.

We now do a soft fail in release mode - we already check the error, so
we might as well return an empty value.

Aside: The type index there feels really unusual, the type indices in
other records around the `S_LOCAL` were in a similar range. Almost looks
like some integer over-/underflow.



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