SuccessChanges

Summary

  1. llvm-reduce: Follow-up to 372280, now with more-better msan fixing
  2. [lsan] Fix deadlock in dl_iterate_phdr. Summary: Do not grab the allocator lock before calling dl_iterate_phdr. This may cause a lock order inversion with (valid) user code that uses malloc inside a dl_iterate_phdr callback. Reviewers: vitalybuka, hctim Subscribers: jfb, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D67738
  3. Don't use invalidated iterators in FlattenCFGPass Summary: FlattenCFG may erase unnecessary blocks, which also invalidates iterators to those erased blocks. Before this patch, `iterativelyFlattenCFG` could try to increment a BB iterator after that BB has been removed and crash. This patch makes FlattenCFGPass use `WeakVH` to skip over erased blocks. Reviewers: dblaikie, tstellar, davide, sanjoy, asbirlea, grosser Reviewed By: asbirlea Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67672
Revision 372349 by dblaikie:
llvm-reduce: Follow-up to 372280, now with more-better msan fixing
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp (diff)llvm.src/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
Revision 372348 by eugenis:
[lsan] Fix deadlock in dl_iterate_phdr.

Summary:
Do not grab the allocator lock before calling dl_iterate_phdr. This may
cause a lock order inversion with (valid) user code that uses malloc
inside a dl_iterate_phdr callback.

Reviewers: vitalybuka, hctim

Subscribers: jfb, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D67738
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/lsan/lsan_common.cpp (diff)compiler-rt.src/lib/lsan/lsan_common.cpp
The file was modified/compiler-rt/trunk/lib/lsan/lsan_common.h (diff)compiler-rt.src/lib/lsan/lsan_common.h
The file was modified/compiler-rt/trunk/lib/lsan/lsan_common_linux.cpp (diff)compiler-rt.src/lib/lsan/lsan_common_linux.cpp
The file was modified/compiler-rt/trunk/lib/lsan/lsan_common_mac.cpp (diff)compiler-rt.src/lib/lsan/lsan_common_mac.cpp
The file was added/compiler-rt/trunk/test/lsan/TestCases/Linux/libdl_deadlock.cppcompiler-rt.src/test/lsan/TestCases/Linux/libdl_deadlock.cpp
Revision 372347 by kuhar:
Don't use invalidated iterators in FlattenCFGPass

Summary:
FlattenCFG may erase unnecessary blocks, which also invalidates iterators to those erased blocks.
Before this patch, `iterativelyFlattenCFG` could try to increment a BB iterator after that BB has been removed and crash.

This patch makes FlattenCFGPass use `WeakVH` to skip over erased blocks.

Reviewers: dblaikie, tstellar, davide, sanjoy, asbirlea, grosser

Reviewed By: asbirlea

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67672
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Scalar/FlattenCFGPass.cpp (diff)llvm.src/lib/Transforms/Scalar/FlattenCFGPass.cpp
The file was modified/llvm/trunk/test/Transforms/Util/flattencfg.ll (diff)llvm.src/test/Transforms/Util/flattencfg.ll