llvm/unittests
Pavel Labath cd63a63664 [Support] Fix error handling in DataExtractor::get[US]LEB128
Summary:
These functions are documented as not modifying the offset argument if
the extraction fails (just like other DataExtractor functions). However,
while reviewing D63591 we discovered that this is not the case -- if the
function reaches the end of the data buffer, it will just return the
value parsed until that point and set offset to point to the end of the
buffer.

This fixes the functions to act as advertised, and adds a regression
test.

Reviewers: dblaikie, probinson, bkramer

Subscribers: kristina, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63645

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364169 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 09:11:24 +00:00
..
ADT [ADT] Enable set_difference() to be used on StringSet 2019-06-07 20:23:03 +00:00
Analysis [Analysis] add isSplatValue() for vectors in IR 2019-06-11 22:25:18 +00:00
AsmParser Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BinaryFormat [MsgPack] Removed MsgPackTypes 2019-03-13 18:56:33 +00:00
Bitcode Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...> 2019-01-20 21:19:56 +00:00
CodeGen GlobalISel: Use the original flags when lowering fneg to fsub 2019-06-17 23:48:43 +00:00
DebugInfo Fix DWARF DebugInfo unit test errors when cross-compiling 2019-06-03 22:22:03 +00:00
Demangle Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
ExecutionEngine [ORC] Rename MaterializationResponsibility resolve and emit methods to 2019-06-13 20:11:23 +00:00
FuzzMutate Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IR [SVE][IR] Scalable Vector IR Type with pr42210 fix 2019-06-18 10:11:56 +00:00
LineEditor Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Linker [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
MC Change some StringRef::data() reinterpret_cast to bytes_begin() or arrayRefFromStringRef() 2019-04-07 03:58:42 +00:00
MI MachineModuleInfo: Store more specific reference to LLVMTargetMachine; NFC 2018-11-05 23:49:13 +00:00
Object Minidump: Add support for the MemoryList stream 2019-05-16 15:17:30 +00:00
ObjectYAML Minidump: Add support for reading/writing strings 2019-04-05 08:06:26 +00:00
Option Option spell checking: Penalize delimiter flags if input has no argument 2019-05-01 16:45:15 +00:00
Passes Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ProfileData [SampleFDO] add suffix elision control for fcn names 2019-03-14 13:56:49 +00:00
Remarks [Remarks] Add string deduplication using a string table 2019-04-24 00:06:24 +00:00
Support [Support] Fix error handling in DataExtractor::get[US]LEB128 2019-06-24 09:11:24 +00:00
Target Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
TextAPI [TextAPI] Prefix all architecture enums to fix the build on i386. 2019-04-04 22:56:50 +00:00
tools Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
Transforms Only passes that preserve MemorySSA must mark it as preserved. 2019-06-11 18:27:49 +00:00
XRay Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
unittest.cfg.in Add support for unittest inputs. 2018-09-05 23:30:17 +00:00