1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/lib
Sanjay Patel 45efa06f0f [CodeGenPrepare] Fix use-after-free
If OptimizeExtractBits() encountered a shift instruction with no operands at all,
it would erase the instruction, but still return false.

This previously didn’t matter because its caller would always return after
processing the instruction, but https://reviews.llvm.org/D63233 changed the
function’s caller to fall through if it returned false, which would then cause
a use-after-free detectable by ASAN.

This change makes OptimizeExtractBits return true if it removes a shift
instruction with no users, terminating processing of the instruction.

Patch by: @brentdax (Brent Royal-Gordon)

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

llvm-svn: 369168
2019-08-16 23:10:34 +00:00
..
Analysis [CaptureTracking] Allow null to be in either icmp operand 2019-08-16 21:53:49 +00:00
AsmParser [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
BinaryFormat [Dwarf] Complete the list of type tags. 2019-08-13 17:00:54 +00:00
Bitcode [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Bitstream [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00
CodeGen [CodeGenPrepare] Fix use-after-free 2019-08-16 23:10:34 +00:00
DebugInfo Remove the temporary code. NFC. 2019-08-16 03:40:04 +00:00
Demangle
ExecutionEngine [ORC] Remove some stray debugging output accidentally left in r368707 2019-08-16 19:33:37 +00:00
Fuzzer
FuzzMutate [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
IR Link libpthread into LLVMCore.so 2019-08-15 18:06:30 +00:00
IRReader
LineEditor
Linker Linker: Add support for GlobalIFunc. 2019-08-08 22:09:18 +00:00
LTO [NewPM][PassInstrumentation] IR printing support for (Thin)LTO 2019-08-15 17:47:44 +00:00
MC [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
MCA [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Object [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
ObjectYAML [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Option [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Passes Title: Loop Cache Analysis 2019-08-09 13:56:29 +00:00
ProfileData [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Remarks [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Support [RWMutex] Simplify availability check 2019-08-16 21:25:40 +00:00
TableGen [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Target Revert [X86] SimplifyDemandedVectorElts - attempt to recombine target shuffle using DemandedElts mask (reapplied) 2019-08-16 23:08:56 +00:00
Testing
TextAPI [TextAPI] Update reader to be supported by lib/Object 2019-08-16 15:30:48 +00:00
ToolDrivers [llvm-dlltool] Clarify an error message. NFC. 2019-08-02 11:20:03 +00:00
Transforms [Attributor] Fix: Do not partially resolve returned calls. 2019-08-16 21:59:52 +00:00
WindowsManifest [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
XRay [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
CMakeLists.txt Fix build errors LLVM tests are disabled. 2019-07-11 22:08:35 +00:00
LLVMBuild.txt [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00