summaryrefslogtreecommitdiffstats
path: root/courgette/courgette.gyp
diff options
context:
space:
mode:
authorhuangs <huangs@chromium.org>2015-07-20 14:55:04 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-20 21:55:50 +0000
commit57264dc9461022d53617baa238d6f38376a6cd62 (patch)
tree29f654a02f6071c34f5430fcf9135378297bc195 /courgette/courgette.gyp
parenta7b29129a2f4b266b18787c1981fc615c2053171 (diff)
downloadchromium_src-57264dc9461022d53617baa238d6f38376a6cd62.zip
chromium_src-57264dc9461022d53617baa238d6f38376a6cd62.tar.gz
chromium_src-57264dc9461022d53617baa238d6f38376a6cd62.tar.bz2
[Courgette] Fix NoThrowBuffer::end() off-by-1; add unittests.
NoThrowBuffer::end() should be an exclusive upperbound, but the old implementation was inclusive. The impact is that std::sort() statements in - EncodedProgram::GeneratePeRelocations() - EncodedProgram::GenerateElfRelocations() will not sort the last element, leading to slight change in results. Also found potential use-after-free in NoThrowBuffer::reserve(), but using DCHECK() to block offending case Added basic unit tests for NoThrowBuffer. TEST=courgette_unittests --gtest_filter=MemoryAllocatorTest.NoThrowBuffer Review URL: https://codereview.chromium.org/1242263003 Cr-Commit-Position: refs/heads/master@{#339529}
Diffstat (limited to 'courgette/courgette.gyp')
-rw-r--r--courgette/courgette.gyp1
1 files changed, 1 insertions, 0 deletions
diff --git a/courgette/courgette.gyp b/courgette/courgette.gyp
index bc8b7bb..1eb669d 100644
--- a/courgette/courgette.gyp
+++ b/courgette/courgette.gyp
@@ -105,6 +105,7 @@
'encoded_program_unittest.cc',
'encode_decode_unittest.cc',
'ensemble_unittest.cc',
+ 'memory_allocator_unittest.cc',
'streams_unittest.cc',
'typedrva_unittest.cc',
'versioning_unittest.cc',