summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/BinaryStreamTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add some helpers for manipulating BinaryStreamRefs.Zachary Turner2017-05-171-0/+33
| | | | llvm-svn: 303297
* Add test for FixedStreamArrayIterator::operator->Adrian McCarthy2017-05-161-2/+27
| | | | | | | | | | | The operator-> implementation comes from iterator_facade_base, so it should just work given that the iterator has a tested operator*. But r302257 showed that required careful handling of for the const qualifier. This patch ensures the fix in r302257 doesn't regress. Differential Revision: https://reviews.llvm.org/D33249 llvm-svn: 303215
* Fix use after free in BinaryStream library.Zachary Turner2017-05-031-7/+7
| | | | | | | | | | | | | | | This was reported by the ASAN bot, and it turned out to be a fairly fundamental problem with the design of VarStreamArray and the way it passes context information to the extractor. The fix was cumbersome, and I'm not entirely pleased with it, so I plan to revisit this design in the future when I'm not pressed to get the bots green again. For now, this fixes the issue by storing the context information by value instead of by reference, and introduces some impossibly-confusing template magic to make things "work". llvm-svn: 301999
* [Support] Make BinaryStreamArray extractors stateless.Zachary Turner2017-04-271-9/+9
| | | | | | | Instead, we now pass a context memeber through the extraction process. llvm-svn: 301556
* [unittest] Explicitly specify alignment when using BumpPtrAllocator.Jordan Rose2017-03-111-1/+2
| | | | | | | | | | | | | r297310 began inserting red zones around allocations under ASan, which perturbs the alignment of subsequent allocations. Deliberately specify this in two places where it matters. Fixes failures when these tests are run under ASan and UBSan together. Reviewed by Duncan Exon Smith. rdar://problem/30980047 llvm-svn: 297540
* [Support] Move Stream library from MSF -> Support.Zachary Turner2017-03-021-0/+710
After several smaller patches to get most of the core improvements finished up, this patch is a straight move and header fixup of the source. Differential Revision: https://reviews.llvm.org/D30266 llvm-svn: 296810
OpenPOWER on IntegriCloud