diff options
author | Hubert Tong <hubert.reinterpretcast@gmail.com> | 2020-01-15 10:42:27 -0500 |
---|---|---|
committer | Hubert Tong <hubert.reinterpretcast@gmail.com> | 2020-01-15 10:45:50 -0500 |
commit | 63b428e3861bed666525b3af56cd50e14ab30495 (patch) | |
tree | 27c25bbbd431701260351a7f3505371c809d5453 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | e429f24ed8b16149ad668edd3fb000a3a56c8e40 (diff) | |
download | llvm-63b428e3861bed666525b3af56cd50e14ab30495.zip llvm-63b428e3861bed666525b3af56cd50e14ab30495.tar.gz llvm-63b428e3861bed666525b3af56cd50e14ab30495.tar.bz2 |
DWARFDebugLine.cpp: Format unknown line number standard opcodes
Summary:
This patch implements `formatv()` formatting for `dwarf::LineNumberOps`
and makes use of it for the `llvm-dwarfdump --debug-line` dump.
Previously, unknown line number standard opcodes would lead to undefined
behaviour. The code would attempt to format the data pointer of an empty
`StringRef` (a null pointer) using `%s`. According to the description
for `format()`, use of that interface carries the "risk of `printf`".
Passing a null pointer in place of an array to a C library function
results in undefined behaviour.
Reviewers: jhenderson, daltenty, stevewan
Reviewed By: jhenderson
Subscribers: aprantl, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72369
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions