llvm-project/llvm/lib/BinaryFormat
Hubert Tong 63b428e386 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
2020-01-15 10:45:50 -05:00
..
AMDGPUMetadataVerifier.cpp [AMDGPU] add support for hostcall buffer pointer as hidden kernel argument 2019-11-20 15:53:55 +05:30
CMakeLists.txt [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
Dwarf.cpp DWARFDebugLine.cpp: Format unknown line number standard opcodes 2020-01-15 10:45:50 -05:00
LLVMBuild.txt
Magic.cpp
Minidump.cpp
MsgPackDocument.cpp
MsgPackDocumentYAML.cpp
MsgPackReader.cpp
MsgPackWriter.cpp
Wasm.cpp
XCOFF.cpp [AIX] Emit TOC entries for ASM printing 2019-11-27 17:20:55 -05:00