llvm/llvm-project

[MIRSampleProfile] nullptr deref crash when profile sample use file not found

Open

#189,764 建立於 2026年3月31日

在 GitHub 查看
 (7 留言) (0 反應) (0 負責人)C++ (10,782 fork)batch import
PGOcrash-on-invalidgood first issuellvm:codegen

倉庫指標

Star
 (26,378 star)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

Trying to reproduce https://github.com/llvm/llvm-project/issues/188897, I failed to pass a valid file for -fprofile-sample-use=; this caused a crash because Reader is nullptr in MIRProfileLoader::runOnFunction. Should be easy to guard against this I think. cc @htyu (author of 958a3d8e2dec95a878dfc9d823861b3a6c674534)

貢獻者指南