1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/tools
Georgii Rymar 089f3ae98c [llvm-readobj] - Refactor the MipsGOTParser<ELFT> to stop using report_fatal_error().
`MipsGOTParser` is a helper class that is used to dump MIPS GOT and PLT.
There is a problem with it: it might call report_fatal_error() on invalid input.
When this happens, the tool reports a crash:

```
# command stderr:
LLVM ERROR: Cannot find PLTGOT dynamic table tag.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backt
race.
Stack dump:
...
```

Such error were not tested. In this patch I've refactored `MipsGOTParser`:

I've splitted handling of GOT and PLT to separate methods. This allows to propagate
any possible errors to caller and should allow to dump the PLT when something is wrong
with the GOT and vise versa in the future.

I've added tests for each `report_fatal_error()`
and now calling the `reportError` instead. In the future we might want to switch to
reporting warnings, but it requres the additional testing and should
be performed independently.

I've kept `unwrapOrError` calls untouched for now as I'd like to focus on eliminating
`report_fatal_error` calls in this patch only.

Differential revision: https://reviews.llvm.org/D83225
2020-07-07 16:43:38 +03:00
..
bugpoint SmallPtrSet::find -> SmallPtrSet::count 2020-06-07 22:38:08 +02:00
bugpoint-passes
dsymutil [dsymutil] Don't emit N_AST symbol entries in the Mach-O companion file 2020-06-05 08:42:18 -07:00
gold [gold-plugin] Unbreak the build after d9b9ce6c04764275a23cd0cf1856a35aae921af7 2020-05-20 11:56:06 +02:00
llc
lli
llvm-ar [llvm-ar] Update error messages and tests as per latest preferred style 2020-06-05 10:37:26 -07:00
llvm-as
llvm-as-fuzzer Fix several places that were calling verifyFunction or verifyModule without checking the return value. 2020-05-18 13:28:46 -07:00
llvm-bcanalyzer
llvm-c-test
llvm-cat
llvm-cfi-verify [llvm] Avoid linking llvm-cfi-verify to duplicate libs 2020-06-17 19:00:26 +02:00
llvm-config
llvm-cov [llvm-cov gcov] Don't suppress .gcov output if .gcda is corrupted 2020-06-16 14:55:38 -07:00
llvm-cvtres
llvm-cxxdump
llvm-cxxfilt
llvm-cxxmap
llvm-diff llvm-diff: Avoid crash with complex expressions 2020-05-21 17:43:47 -04:00
llvm-dis
llvm-dwarfdump [llvm] Remove full stop frome error message 2020-06-24 09:41:17 -07:00
llvm-dwp llvm-dwp.cpp - fix implicit CommandLine.h dependency. NFC. 2020-06-23 12:29:52 +01:00
llvm-elfabi
llvm-exegesis [X86-64] Support Intel AMX instructions 2020-07-02 08:57:04 +08:00
llvm-extract [llvm-extract] Fix basic block extraction by delaying search until the function is materialized 2020-05-21 21:18:37 -04:00
llvm-go
llvm-gsymutil
llvm-ifs
llvm-isel-fuzzer llvm-isel-fuzzer.cpp - fix implicit CommandLine.h dependency. NFC. 2020-06-23 12:29:53 +01:00
llvm-itanium-demangle-fuzzer
llvm-jitlink [JITLink] Improve llvm-jitlink regression testing support for ELF. 2020-05-28 20:31:50 -07:00
llvm-jitlistener
llvm-link
llvm-lipo
llvm-lto
llvm-lto2
llvm-mc [MC] Add --dwarf64 to generate DWARF64 debug info [1/7] 2020-06-16 15:50:13 +07:00
llvm-mc-assemble-fuzzer
llvm-mc-disassemble-fuzzer
llvm-mca
llvm-microsoft-demangle-fuzzer Give microsoftDemangle() an outparam for how many input bytes were consumed. 2020-05-20 16:17:31 -04:00
llvm-ml
llvm-modextract
llvm-mt
llvm-nm llvm-nm: Implement --special-syms. 2020-06-22 13:05:47 -07:00
llvm-objcopy [llvm-install-name-tool] Merge install-name options 2020-07-06 20:32:32 -07:00
llvm-objdump [MC] Pass the symbol rather than its name to onSymbolStart() 2020-06-19 09:30:12 +05:30
llvm-opt-fuzzer CommandFlags.h - remove unnecessary includes. NFC. 2020-05-20 09:58:37 +01:00
llvm-opt-report
llvm-pdbutil [llvm-pdbutil] Add missing --id-stats to dump the IPI stream 2020-06-05 15:10:54 -04:00
llvm-profdata [llvm-profdata] --hot-func-list: fix some style issues in D81800 2020-06-24 15:17:03 -07:00
llvm-rc [llvm-rc] Implement the language id option 2020-06-23 11:14:07 +03:00
llvm-readobj [llvm-readobj] - Refactor the MipsGOTParser<ELFT> to stop using report_fatal_error(). 2020-07-07 16:43:38 +03:00
llvm-reduce [NFCI][llvm-reduce] ReduceOperandBundles: actually put Module forward-declaration back into llvm namespace 2020-07-07 01:32:26 +03:00
llvm-rtdyld
llvm-shlib Add option LLVM_NM to allow specifying the location of the llvm-nm tool 2020-07-06 13:27:56 -07:00
llvm-size [llvm-size] Output REL, RELA and STRTAB sections when allocatable 2020-07-01 12:02:32 +01:00
llvm-special-case-list-fuzzer
llvm-split Fix several places that were calling verifyFunction or verifyModule without checking the return value. 2020-05-18 13:28:46 -07:00
llvm-stress [SVE] Eliminate calls to default-false VectorType::get() from llvm-stress 2020-06-08 11:32:37 -07:00
llvm-strings
llvm-symbolizer
llvm-undname Give microsoftDemangle() an outparam for how many input bytes were consumed. 2020-05-20 16:17:31 -04:00
llvm-xray
llvm-yaml-numeric-parser-fuzzer
lto [LTO] Use StringRef instead of C-style strings in setCodeGenDebugOptions 2020-06-22 11:22:18 +01:00
msbuild
obj2yaml [DWARFYAML][debug_gnu_*] Add the missing context IsGNUStyle. NFC. 2020-07-03 18:12:58 +08:00
opt [NewPM] Add explicit init value to -enable-new-pm 2020-06-30 18:40:01 -07:00
opt-viewer
remarks-shlib
sancov Re-land "Migrate the rest of COFFObjectFile to Error" 2020-06-11 14:46:16 -07:00
sanstats
verify-uselistorder
vfabi-demangle-fuzzer
xcode-toolchain
yaml2obj [yaml2obj] - Add a way to set default values for macros used in a YAML. 2020-06-30 12:05:30 +03:00
CMakeLists.txt
LLVMBuild.txt