summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object/macho-invalid.test
Commit message (Collapse)AuthorAgeFilesLines
...
* [Object, MachO] Don't crash on incomplete MachO segment load commands.Alexey Samsonov2015-06-041-0/+3
| | | | | | | | Report proper error code from MachOObjectFile constructor if we can't parse another segment load command (we already return a proper error if segment load command contents is suspicious). llvm-svn: 239109
* [Object, MachO] Don't crash on invalid MachO segment load commands.Alexey Samsonov2015-06-041-2/+2
| | | | | | | | | | | | | | | Summary: Properly report the error in segment load commands from MachOObjectFile constructor instead of crashing the program. Adjust the test case accordingly. Test Plan: regression test suite Reviewers: rafael, filcab Subscribers: llvm-commits llvm-svn: 239081
* [Object, MachO] Don't crash on invalid MachO load commands.Alexey Samsonov2015-06-041-2/+2
| | | | | | | | | | | | | | | Summary: Currently all load commands are parsed in MachOObjectFile constructor. If the next load command cannot be parsed, or if command size is too small, properly report it through the error code and fail to construct the object, instead of crashing the program. Test Plan: regression test suite Reviewers: rafael, filcab Subscribers: llvm-commits llvm-svn: 239080
* [Object, MachO] Don't crash on parsing invalid MachO header.Alexey Samsonov2015-06-041-0/+3
| | | | | | | | | | | Summary: Instead, properly report this error from MachOObjectFile constructor. Test Plan: regression test suite Reviewers: rafael Subscribers: llvm-commits llvm-svn: 239078
* Make test case more readable: move CHECK-lines next to corresponding RUN-lines.Alexey Samsonov2015-06-041-8/+6
| | | | llvm-svn: 239068
* Stop inventing symbol sizes.Rafael Espindola2015-05-221-9/+0
| | | | | | | | | | | | | | | | | | | | | MachO and COFF quite reasonably only define the size for common symbols. We used to try to figure out the "size" by computing the gap from one symbol to the next. This would not be correct in general, since a part of a section can belong to no visible symbol (padding, private globals). It was also really expensive, since we would walk every symbol to find the size of one. If a caller really wants this, it can sort all the symbols once and get all the gaps ("size") in O(n log n) instead of O(n^2). On MachO this also has the advantage of centralizing all the checks for an invalid n_sect. llvm-svn: 238028
* Detect invalid section indexes when we first read them.Rafael Espindola2015-05-221-6/+2
| | | | | | We still detect the same errors, but now we do it earlier. llvm-svn: 238024
* Fix edge case when Start overflowed in 32 bit modeFilipe Cabecinhas2015-01-151-1/+1
| | | | llvm-svn: 226229
* Report fatal errors instead of segfaulting/asserting on a few invalid ↵Filipe Cabecinhas2015-01-151-0/+51
accesses while reading MachO files. Summary: Shift an older “invalid file” test to get a consistent naming for these tests. Bugs found by afl-fuzz Reviewers: rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6945 llvm-svn: 226219
OpenPOWER on IntegriCloud