Skip to content

Conversation

@Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Jul 20, 2025

When dumping a PDB with an inlinesite that had a ChangeFile annotation, the Filename wasn't passed to the format string. This hit an assertion in debug mode and silently failed in release mode.

@llvmbot
Copy link
Member

llvmbot commented Jul 20, 2025

@llvm/pr-subscribers-debuginfo

Author: nerix (Nerixyz)

Changes

When dumping a PDB with an inlinesite that had a ChangeFile annotation, the Filename wasn't passed to the format string. This hit an assertion in debug mode and silently failed in release mode.


Full diff: https://github.com/llvm/llvm-project/pull/149705.diff

1 Files Affected:

  • (modified) llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp (+1-1)
diff --git a/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp b/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
index 66a091f50d6b2..caed429f8bc4f 100644
--- a/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
+++ b/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
@@ -773,7 +773,7 @@ Error MinimalSymbolDumper::visitKnownRecord(CVSymbol &CVR, InlineSiteSym &IS) {
         else
           return MaybeFile.takeError();
       }
-      P.format(" setfile {0} 0x{1}", utohexstr(FileOffset));
+      P.format(" setfile {0} 0x{1}", Filename, utohexstr(FileOffset));
       break;
     }
 

@Nerixyz Nerixyz requested a review from aganea September 18, 2025 09:59
@aganea aganea merged commit 0ac13af into llvm:main Sep 18, 2025
11 checks passed
@Nerixyz Nerixyz deleted the fix/pdbutil-format-str branch November 7, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants