Unverified Commit 659a48f2 authored by jeffreytan81's avatar jeffreytan81 Committed by GitHub
Browse files

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: default avatarjeffreytan81 <jeffreytan@fb.com>
parent 5a56f007
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment