llvm-project/llvm
Georgii Rymar bee8cdcabd [DebugInfo/DWARF] - Test invalid CFI opcodes properly and refine related `CFIProgram::parse` code.
There are following issues with `CFIProgram::parse` code:

1) Invalid CFI opcodes were never tested. And currently a test would fail
when the `LLVM_ENABLE_ABI_BREAKING_CHECKS` is enabled. It happens because
the `DataExtractor::Cursor C` remains unchecked when the
"Invalid extended CFI opcode" error is reported:

```
.eh_frame section at offset 0x1128 address 0x0:
Program aborted due to an unhandled Error:
Error value was Success. (Note: Success values must still be checked prior to being destroyed).
```

2) It is impossible to reach the "Invalid primary CFI opcode" error with the current code.
There are 3 possible primary opcode values and all of them are handled. Hence this error
should be replaced with llvm_unreachable.

3) Errors currently reported are upper-case.

This patch refines the code in the `CFIProgram::parse` method to fix all issues mentioned
and adds unit tests for all possible invalid extended CFI opcodes.

Differential revision: https://reviews.llvm.org/D82868
2020-07-08 12:10:23 +03:00
..
benchmarks
bindings
cmake [llvm] [docs] Do not require recommonmark for manpage build 2020-07-07 20:59:02 +02:00
docs [llvm] [docs] Do not require recommonmark for manpage build 2020-07-07 20:59:02 +02:00
examples [docs/examples] As part of using inclusive language within the llvm 2020-06-20 00:51:18 -07:00
include Revert "[X86] Add back the assert in getImpliedFeatures that I removed in ef4cc70f3ed2a91e0a48c6448c517c3ba34c2846" 2020-07-07 22:56:08 -04:00
lib [DebugInfo/DWARF] - Test invalid CFI opcodes properly and refine related `CFIProgram::parse` code. 2020-07-08 12:10:23 +03:00
projects
resources
runtimes [libc++] Fix the runtimes build after making __config_site mandatory 2020-06-26 01:26:34 -04:00
test [llvm-readobj] - Refine error reporting in MipsGOTParser<ELFT> helper. 2020-07-08 12:05:52 +03:00
tools [llvm-readobj] - Refine error reporting in MipsGOTParser<ELFT> helper. 2020-07-08 12:05:52 +03:00
unittests [DebugInfo/DWARF] - Test invalid CFI opcodes properly and refine related `CFIProgram::parse` code. 2020-07-08 12:10:23 +03:00
utils [gn build] Port 20e271a98d 2020-07-08 07:52:15 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore [clangd] Store index in '.cache/clangd/index' instead of '.clangd/index' 2020-07-07 14:53:45 +02:00
CMakeLists.txt Fix missing build dependencies on omp_gen 2020-07-02 07:55:20 -06:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.