1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/unittests/Support
Benoit Belley 2452e8e7fe [Support] PR33388 - Fix formatv_object move constructor
formatv_object currently uses the implicitly defined move constructor,
but it is buggy. In typical use-cases, the problem doesn't show-up
because all calls to the move constructor are elided. Thus, the buggy
constructors are never invoked.

The issue especially shows-up when code is compiled using the
-fno-elide-constructors compiler flag. For instance, this is useful when
attempting to collect accurate code coverage statistics.

The exact issue is the following:

The Parameters data member is correctly moved, thus making the
parameters occupy a new memory location in the target
object. Unfortunately, the default copying of the Adapters blindly
copies the vector of pointers, leaving each of these pointers
referencing the parameters in the original object instead of the copied
one. These pointers quickly become dangling when the original object is
deleted. This quickly leads to crashes.

The solution is to update the Adapters pointers when performing a move.
The copy constructor isn't useful for format objects and can thus be
deleted.

This resolves PR33388.

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

llvm-svn: 310475
2017-08-09 13:47:01 +00:00
..
DynamicLibrary Allow clients to specify search order of DynamicLibraries. 2017-07-12 21:22:45 +00:00
AlignOfTest.cpp Revert r291503, "Lift the 10-type limit for AlignedCharArrayUnion", and followings. 2017-01-13 01:13:10 +00:00
AllocatorTest.cpp [unittest] Explicitly specify alignment when using BumpPtrAllocator. 2017-03-11 01:24:56 +00:00
ARMAttributeParser.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
ArrayRecyclerTest.cpp
BinaryStreamTest.cpp [gtest] Create a shared include directory for gtest utilities. 2017-06-14 16:41:50 +00:00
BlockFrequencyTest.cpp
BranchProbabilityTest.cpp [BPI] Add multiplication by scalar operators to BranchProbability 2017-04-21 03:14:30 +00:00
CachePruningTest.cpp Make the size specification for cache_size_bytes case insensitive. 2017-06-23 17:13:51 +00:00
Casting.cpp [Support] Add support for unique_ptr<> to Casting.h. 2017-04-12 19:59:37 +00:00
Chrono.cpp [Support] Add FormatVariadic support for chrono types 2017-02-07 18:11:33 +00:00
CMakeLists.txt Recommit "[Support] Add RetryAfterSignal helper function" 2017-06-29 13:15:31 +00:00
CommandLineTest.cpp Support: chunk writing on Linux 2017-06-20 20:51:51 +00:00
CompressionTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
ConvertUTFTest.cpp
CrashRecoveryTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
DataExtractorTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
DebugTest.cpp Fix unit test in NDEBUG build 2016-12-27 11:07:53 +00:00
EndianStreamTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
EndianTest.cpp
ErrnoTest.cpp Recommit "[Support] Add RetryAfterSignal helper function" 2017-06-29 13:15:31 +00:00
ErrorOrTest.cpp
ErrorTest.cpp fix typos in comments; NFC 2017-07-11 06:04:59 +00:00
FileOutputBufferTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
formatted_raw_ostream_test.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
FormatVariadicTest.cpp [Support] PR33388 - Fix formatv_object move constructor 2017-08-09 13:47:01 +00:00
GlobPatternTest.cpp [Support/GlobPattern] - Do not crash when pattern has characters with int value < 0. 2017-07-31 09:26:50 +00:00
Host.cpp [Support] sys::getProcessTriple should return a macOS triple using 2017-07-07 09:53:47 +00:00
LEB128Test.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
LineIteratorTest.cpp
LockFileManagerTest.cpp
ManagedStatic.cpp [ManagedStatic] Avoid putting function pointers in template args. 2017-05-29 20:56:27 +00:00
MathExtrasTest.cpp MathExtras UnitTest: Assert that isPowerOf2(0) is false. NFC. 2017-07-03 18:42:47 +00:00
MD5Test.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
MemoryBufferTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
MemoryTest.cpp Fixed warning: must specify at least one argument for '...' parameter. 2017-06-04 05:31:03 +00:00
NativeFormatTests.cpp [Support] Introduce llvm::formatv() function. 2016-11-11 23:57:40 +00:00
ParallelTest.cpp SupportTests: Suppress ParallelTests on mingw for now. Investigating. 2017-05-11 06:35:51 +00:00
Path.cpp [Support] Remove getPathFromOpenFD, it was unused 2017-08-04 17:43:49 +00:00
ProcessTest.cpp
ProgramTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
raw_ostream_test.cpp Support: Add llvm::center_justify. 2017-07-13 16:11:08 +00:00
raw_pwrite_stream_test.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
raw_sha1_ostream_test.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
RegexTest.cpp
ReplaceFileTest.cpp
ScaledNumberTest.cpp Cosmetic. Added braces to address gcc warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]. 2017-05-20 00:02:08 +00:00
SourceMgrTest.cpp
SpecialCaseListTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
StringPool.cpp
SwapByteOrderTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
TargetParserTest.cpp [TargetParser] Use enum classes for various ARM kind enums. 2017-07-27 16:27:56 +00:00
TarWriterTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
Threading.cpp Rename interface for querying physical hardware concurrency 2016-10-17 14:56:53 +00:00
ThreadLocalTest.cpp
ThreadPool.cpp Remove unused lambda captures. NFC 2017-01-13 17:12:16 +00:00
TimerTest.cpp Timer: Track name and description. 2016-11-18 19:43:18 +00:00
TrailingObjectsTest.cpp Workaround MSVC bug when using TrailingObjects from a template. 2017-02-28 18:05:41 +00:00
TrigramIndexTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
TypeNameTest.cpp
UnicodeTest.cpp
xxhashTest.cpp
YAMLIOTest.cpp [YAMLTraits] Add filename support to yaml::Input 2017-07-17 11:41:30 +00:00
YAMLParserTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00