summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorjeffreytan81 <jeffreytan@meta.com>2023-10-17 17:26:05 -0700
committerGitHub <noreply@github.com>2023-10-17 17:26:05 -0700
commit659a48f25a96b7072b44d372c47385a2608f8671 (patch)
tree4a42d89c54f053aa9cc883ed0523e7ab24222250 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent5a56f0074cf3229983a15496c3caa41d27c5606f (diff)
Detect against invalid variant index for LibStdC++ std::variant data formatters (#69253)
https://github.com/llvm/llvm-project/pull/68012/files added new data formatters for LibStdC++ std::variant. However, this formatter can crash if std::variant's index field has invalid value (exceeds the number of template arguments). This can happen if the current IP stops at a place std::variant is not initialized yet. This patch fixes the crash by ensuring the index is a valid value. --------- Co-authored-by: jeffreytan81 <jeffreytan@fb.com>
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions