llvm-project/llvm/lib/DebugInfo
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
..
CodeView [PDB] Print the most redundant type record indices with /summary 2020-01-02 16:10:36 -08:00
DWARF DWARFDebugLine.cpp: Format unknown line number standard opcodes 2020-01-15 10:45:50 -05:00
GSYM Avoid naming variable after type to fix GCC 5.3 build 2019-12-06 11:25:28 -08:00
MSF [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
PDB [pdbutil] Fixed -Wdeprecated-copy in DbiModuleDescriptor 2019-11-23 23:33:22 +01:00
Symbolize [NFC] Fixes -Wrange-loop-analysis warnings 2020-01-01 20:01:37 +01:00
CMakeLists.txt Add GSYM utility files along with unit tests. 2019-06-26 14:09:09 +00:00
LLVMBuild.txt Fix build in shared lib mode. 2019-06-26 15:46:48 +00:00