summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGöktürk Yüksek <gokturk@binghamton.edu>2016-02-12 22:51:15 -0500
committerGöktürk Yüksek <gokturk@binghamton.edu>2016-02-16 04:23:11 -0500
commit8592f9336cde604750ae27431a2d172d3dfe6ab0 (patch)
treebfa70f66202a6eefa12d23918518384ffa69b9ce /app-benchmarks/bonnie++/files/bonnie++-1.97-zcav-array-indexing-fix.patch
parentgames-board/pokerth: dev-qt/qtnetwork is always needed (diff)
downloadgentoo-8592f9336cde604750ae27431a2d172d3dfe6ab0.tar.gz
gentoo-8592f9336cde604750ae27431a2d172d3dfe6ab0.tar.bz2
gentoo-8592f9336cde604750ae27431a2d172d3dfe6ab0.zip
app-benchmarks/bonnie++: eapi bump, fix #309319, #431684, #515334
Also get rid if unnecessary DEPEND and RDEPEND since this package has no external dependencies. Remove src_compile phase that was added per #9073 14 years ago. It's not reproducible anymore. The 'changelog.txt' file is a symlink to 'debian/changelog'. Install the actual changelog instead of the symlink. Install everything under bin/ as opposed to sbin/ since this is not a system application. Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=9073 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=309319 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=431684 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=515334 Package-Manager: portage-2.2.26
Diffstat (limited to 'app-benchmarks/bonnie++/files/bonnie++-1.97-zcav-array-indexing-fix.patch')
-rw-r--r--app-benchmarks/bonnie++/files/bonnie++-1.97-zcav-array-indexing-fix.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/app-benchmarks/bonnie++/files/bonnie++-1.97-zcav-array-indexing-fix.patch b/app-benchmarks/bonnie++/files/bonnie++-1.97-zcav-array-indexing-fix.patch
new file mode 100644
index 00000000000..3d92689541d
--- /dev/null
+++ b/app-benchmarks/bonnie++/files/bonnie++-1.97-zcav-array-indexing-fix.patch
@@ -0,0 +1,35 @@
+From: Göktürk Yüksek <gokturk@binghamton.edu>
+Subject: [PATCH] Fix array indexing in Zcav::Read when max_loop > 1 and start_offset > 0
+
+In method Zcav::Read, the variable 'i' holds the block index. It is
+also used as an index to arrays of measurement values (read times and
+block counts) when (max_loops > 0). However, the blocks array and
+measurements arrays will be out of sync if some initial blocks are to
+be skipped (by having start_offset > 0). Using the same index value
+for arrays of different sizes causes segfaults. Fix it by substracting
+the start_offset properly when accessing the measurements arrays.
+
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=309319
+
+--- a/zcav_io.cpp
++++ b/zcav_io.cpp
+@@ -108,7 +108,7 @@
+ double total_read_time = 0.0;
+ bool nextLoop = false;
+ for( ; !nextLoop && (!max_size || i < max_size)
+- && (loops == 0 || (m_times[i] && m_times[i][0] != -1.0))
++ && (loops == 0 || (m_times[i - start_offset] && m_times[i - start_offset][0] != -1.0))
+ && (!max_size || i < max_size); i++)
+ {
+ double read_time = access_data(i ? skip_rate - 1 : 0);
+@@ -135,8 +135,8 @@
+ m_times.push_back(new double[max_loops]);
+ m_count.push_back(0);
+ }
+- m_times[i][loops] = read_time;
+- m_count[i]++;
++ m_times[i - start_offset][loops] = read_time;
++ m_count[i - start_offset]++;
+ }
+ } // end loop for reading blocks
+