diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-benchmarks/bonnie++/files | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-benchmarks/bonnie++/files')
-rw-r--r-- | app-benchmarks/bonnie++/files/bonnie++-1.96-compile-flags.patch | 17 | ||||
-rw-r--r-- | app-benchmarks/bonnie++/files/bonnie++-1.97-zcav-array-indexing-fix.patch | 35 |
2 files changed, 52 insertions, 0 deletions
diff --git a/app-benchmarks/bonnie++/files/bonnie++-1.96-compile-flags.patch b/app-benchmarks/bonnie++/files/bonnie++-1.96-compile-flags.patch new file mode 100644 index 000000000000..05821f977ecc --- /dev/null +++ b/app-benchmarks/bonnie++/files/bonnie++-1.96-compile-flags.patch @@ -0,0 +1,17 @@ +diff --git a/Makefile.in b/Makefile.in +index 4f14819..1092891 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -9,9 +9,9 @@ prefix=@prefix@ + eprefix=@exec_prefix@ + #MORE_WARNINGS=-Weffc++ + WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-arith -Wwrite-strings -Wformat-security -Wswitch-enum -Winit-self $(MORE_WARNINGS) +-CFLAGS=-O2 @debug@ -DNDEBUG $(WFLAGS) $(MORECFLAGS) +-CXX=@CXX@ $(CFLAGS) +-LINK=@CXX@ ++CXXFLAGS += @debug@ -DNDEBUG $(WFLAGS) ++CXX=@CXX@ $(CXXFLAGS) ++LINK=@CXX@ $(LDFLAGS) + THREAD_LFLAGS=@thread_ldflags@ + + INSTALL=@INSTALL@ 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 000000000000..3d92689541db --- /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 + |