1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/unittests
Pavel Labath ae3c34854e [llvm/Support] Don't crash on empty nullptr ranges when decoding LEBs
Summary:
If the decoding functions are called with both start and end pointers
being nullptr, the function will crash due to a nullptr dereference.
This happens because the function does not recognise nullptr as a valid
end pointer.

Obviously, nobody is going to pass null pointers here deliberately, but
it can happen indirectly (as it did for me), when calling these
functions on an ArrayRef, as a default-initialized empty ArrayRef will
have both begin() and end() pointers equal to nullptr.

The fix is to simply remove the nullptr check. Passing nullptr for "end"
with a valid "begin" pointer will still work, as one cannot reach
nullptr by incrementing a valid pointer without triggerring UB.

Reviewers: dblaikie

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77304
2020-04-06 14:14:11 +02:00
..
ADT [ADT] Implement the Waymarking as an independent utility 2020-03-31 17:08:24 +03:00
Analysis [ValueTracking] enhance matching of smin/smax with 'not' operands 2020-04-05 08:54:12 -04:00
AsmParser
BinaryFormat [PowerPC] Delete PPCMachObjectWriter and powerpc{,64}-apple-darwin 2020-03-05 11:05:26 -08:00
Bitcode
Bitstream
CodeGen [Alignment][NFC] Use Align version of getMachineMemOperand 2020-03-30 15:46:27 +00:00
DebugInfo Cleanup the plumbing for DILineInfoSpecifier. [NFC - Try 2] 2020-03-20 10:29:57 -07:00
Demangle
ExecutionEngine [ORC] Introduce JITSymbolFlags::HasMaterializeSideEffectsOnly flag. 2020-03-27 11:02:54 -07:00
Frontend
FuzzMutate [SVE] Update API ConstantVector::getSplat() to use ElementCount. 2020-03-12 13:22:41 -07:00
IR [NFC] Split Knowledge retention and place it more appropriatly 2020-04-02 15:01:41 +02:00
LineEditor
Linker
MC [AMDGPU] Fix PC register mapping in wave32 mode 2020-03-26 14:43:25 -04:00
MI
Object [Object][unittest] Skip tests on machines with non-64 bit size_t 2020-03-11 15:31:30 +00:00
ObjectYAML
Option
Passes Don't export symbols from clang/opt/llc if plugins are disabled. 2020-03-23 12:17:09 -07:00
ProfileData [SampleFDO] Port MD5 name table support to extbinary format. 2020-03-30 22:07:08 -07:00
Remarks
Support [llvm/Support] Don't crash on empty nullptr ranges when decoding LEBs 2020-04-06 14:14:11 +02:00
TableGen Make unittests include path relative 2020-02-21 10:19:11 +01:00
Target [ARM] Make remaining MVE instruction predictable 2020-04-02 10:57:40 +01:00
TextAPI [llvm][TextAPI] adding inlining reexported libraries support 2020-04-02 13:05:08 -07:00
tools Recommit: "[llvm-exegesis] Improve error reporting in Assembler.cpp" 2020-02-19 14:40:28 +01:00
Transforms [VPlan] Move test strs to variables, silence spurious C4129 (NFC). 2020-03-31 13:18:15 +01:00
XRay
CMakeLists.txt
unittest.cfg.in