Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1 |
|
#
04aea769 |
| 20-Apr-2020 |
Pavel Labath <pavel@labath.sk> |
[Support] Make DataExtractor error messages more clear
Summary: This is a result of the discussion at D78113. Previously we would be only giving the current offset at which the error was detected. H
[Support] Make DataExtractor error messages more clear
Summary: This is a result of the discussion at D78113. Previously we would be only giving the current offset at which the error was detected. However, this was phrased somewhat ambiguously (as it could also mean that end of data was at that offset). The new error message includes the current offset as well as the extent of the data being read.
I've changed a couple of file-level static functions into private member functions in order to avoid passing a bunch of new arguments everywhere.
Reviewers: dblaikie, jhenderson
Subscribers: hiraditya, MaskRay, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78558
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6 |
|
#
cc0acda7 |
| 23-Mar-2020 |
Pavel Labath <pavel@labath.sk> |
[DWARFDataExtractor] Add a "truncating" constructor
Summary: This constructor allows us to create a new DWARFDataExtractor which will only present a subrange of an entire debug section. Since debug
[DWARFDataExtractor] Add a "truncating" constructor
Summary: This constructor allows us to create a new DWARFDataExtractor which will only present a subrange of an entire debug section. Since debug sections typically consist of multiple contributions, it is expected that one will create a new data extractor for each contribution in order to avoid unexpectedly running off into the next one.
This is very useful for unifying the flows for detecting parse errors. Without it, the code needs to consider two very different scenarios: 1. If there is another contribution after the current one, the DataExtractor functions will just start reading from there. This is detectable by comparing the current offset against the known end-of-contribution offset. 2. If this is the last contribution, the data extractor will just start returning zeroes (or other default values). This situation can *not* be detected by checking the parsing offset, as this will not be advanced in case of errors.
Using a truncated data extractor simplifies the code (and reduces cognitive load) by making these two cases behave identically -- a running off the end of a contribution will _always_ produce an EOF error (if one uses error-aware parsing methods) or return default values.
Reviewers: dblaikie, probinson, jhenderson, ikudrin
Subscribers: aprantl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77556
show more ...
|
#
122c50d5 |
| 14-Apr-2020 |
Pavel Labath <pavel@labath.sk> |
Fix DWARFDataExtractor::getRelocatedValue near EOF
Summary: If we have an (invalid) relocation which relocates bytes which partially lie outside the range of the relocated section, the getRelocatedV
Fix DWARFDataExtractor::getRelocatedValue near EOF
Summary: If we have an (invalid) relocation which relocates bytes which partially lie outside the range of the relocated section, the getRelocatedValue would return confusing results. It would first read zero (because that's what the underlying DataExtractor api does for out-of-bounds reads), and then relocate that zero anyway.
A more appropriate behavior is to return zero straight away. This is what this patch does.
Reviewers: dblaikie, jhenderson
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78113
show more ...
|
Revision tags: llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
#
5754a61e |
| 27-Feb-2020 |
Pavel Labath <pavel@labath.sk> |
[DataExtractor] Improve error message when we run off the end of the buffer
Summary: Include the offset at which this happened.
Reviewers: dblaikie, jhenderson
Subscribers: hiraditya, llvm-commits
[DataExtractor] Improve error message when we run off the end of the buffer
Summary: Include the offset at which this happened.
Reviewers: dblaikie, jhenderson
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D75265
show more ...
|
#
3c36d8da |
| 13-Feb-2020 |
Pavel Labath <pavel@labath.sk> |
Introduce DWARFDataExtractor::getInitialLength
Summary: This patch introduces a function to house the code needed to do the DWARF64 detection dance. The function decodes the initial length field and
Introduce DWARFDataExtractor::getInitialLength
Summary: This patch introduces a function to house the code needed to do the DWARF64 detection dance. The function decodes the initial length field and returns it as a pair containing the actual length, and the DWARF encoding.
This patch does _not_ attempt to handle the problem of detecting lengths which extend past the size of the section, or cases when reads of a single contribution accidentally escape beyond its specified length, but I think it's useful in its own right.
Reviewers: dblaikie, jhenderson, ikudrin
Subscribers: hiraditya, probinson, aprantl, JDevlieghere, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74560
show more ...
|