[llvm-commits] [test-suite] r93232 - /test-suite/trunk/SingleSource/Benchmarks/Misc/lowercase.c
Dan Gohman
gohman at apple.com
Mon Jan 11 22:49:22 PST 2010
Author: djg
Date: Tue Jan 12 00:49:21 2010
New Revision: 93232
URL: http://llvm.org/viewvc/llvm-project?rev=93232&view=rev
Log:
Fix a heap corruption bug.
Modified:
test-suite/trunk/SingleSource/Benchmarks/Misc/lowercase.c
Modified: test-suite/trunk/SingleSource/Benchmarks/Misc/lowercase.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Misc/lowercase.c?rev=93232&r1=93231&r2=93232&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Misc/lowercase.c (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Misc/lowercase.c Tue Jan 12 00:49:21 2010
@@ -30,7 +30,7 @@
static void doTest(size_t numberOfIterations)
{
const size_t numberOfCharacters = numberOfIterations;
- const size_t testDataLength = (numberOfCharacters + staticDataLength) / staticDataLength;
+ const size_t testDataLength = ((numberOfCharacters + staticDataLength - 1) / staticDataLength) * staticDataLength;
UChar* testData = malloc(sizeof(UChar) * testDataLength);
size_t i;
for (i = 0; i < testDataLength; i += staticDataLength)
More information about the llvm-commits
mailing list