Merge lp:~laurynas-biveinis/percona-xtrabackup/BT-28340-bug1158154-2.1 into lp:percona-xtrabackup/2.1

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 526
Proposed branch: lp:~laurynas-biveinis/percona-xtrabackup/BT-28340-bug1158154-2.1
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 203 lines (+172/-0)
4 files modified
patches/innodb51.patch (+43/-0)
patches/innodb55.patch (+43/-0)
patches/xtradb51.patch (+43/-0)
patches/xtradb55.patch (+43/-0)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-xtrabackup/BT-28340-bug1158154-2.1
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Registry Administrators Pending
Review via email: mp+154857@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) wrote :

There should probably also be valgrind annotations if there isn't already.

review: Approve
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

They are there already, UNIV_MEM_ASSERT_W/UNIV_MEM_INVALID.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'patches/innodb51.patch'
2--- patches/innodb51.patch 2013-03-13 05:04:17 +0000
3+++ patches/innodb51.patch 2013-03-22 05:17:30 +0000
4@@ -1325,3 +1325,46 @@
5 };
6
7 /** The buffer control block structure */
8+--- a/storage/innodb_plugin/mem/mem0dbg.c
9++++ b/storage/innodb_plugin/mem/mem0dbg.c
10+@@ -272,18 +272,10 @@
11+ byte* buf, /*!< in: pointer to buffer */
12+ ulint n) /*!< in: length of buffer */
13+ {
14+- byte* ptr;
15+-
16+ UNIV_MEM_ASSERT_W(buf, n);
17+
18+- for (ptr = buf; ptr < buf + n; ptr++) {
19+-
20+- if (ut_rnd_gen_ibool()) {
21+- *ptr = 0xBA;
22+- } else {
23+- *ptr = 0xBE;
24+- }
25+- }
26++ /* Fix https://bugs.launchpad.net/percona-xtrabackup/+bug/1158154 */
27++ memset(buf, 0xBA, n);
28+
29+ UNIV_MEM_INVALID(buf, n);
30+ }
31+@@ -298,17 +290,10 @@
32+ byte* buf, /*!< in: pointer to buffer */
33+ ulint n) /*!< in: length of buffer */
34+ {
35+- byte* ptr;
36+-
37+ UNIV_MEM_ASSERT_W(buf, n);
38+
39+- for (ptr = buf; ptr < buf + n; ptr++) {
40+- if (ut_rnd_gen_ibool()) {
41+- *ptr = 0xDE;
42+- } else {
43+- *ptr = 0xAD;
44+- }
45+- }
46++ /* Fix https://bugs.launchpad.net/percona-xtrabackup/+bug/1158154 */
47++ memset(buf, 0xDE, n);
48+
49+ UNIV_MEM_FREE(buf, n);
50+ }
51
52=== modified file 'patches/innodb55.patch'
53--- patches/innodb55.patch 2013-03-13 05:04:17 +0000
54+++ patches/innodb55.patch 2013-03-22 05:17:30 +0000
55@@ -1258,3 +1258,46 @@
56 };
57
58 /** The buffer control block structure */
59+--- a/storage/innobase/mem/mem0dbg.c
60++++ b/storage/innobase/mem/mem0dbg.c
61+@@ -280,18 +280,10 @@
62+ byte* buf, /*!< in: pointer to buffer */
63+ ulint n) /*!< in: length of buffer */
64+ {
65+- byte* ptr;
66+-
67+ UNIV_MEM_ASSERT_W(buf, n);
68+
69+- for (ptr = buf; ptr < buf + n; ptr++) {
70+-
71+- if (ut_rnd_gen_ibool()) {
72+- *ptr = 0xBA;
73+- } else {
74+- *ptr = 0xBE;
75+- }
76+- }
77++ /* Fix https://bugs.launchpad.net/percona-xtrabackup/+bug/1158154 */
78++ memset(buf, 0xBA, n);
79+
80+ UNIV_MEM_INVALID(buf, n);
81+ }
82+@@ -306,17 +298,10 @@
83+ byte* buf, /*!< in: pointer to buffer */
84+ ulint n) /*!< in: length of buffer */
85+ {
86+- byte* ptr;
87+-
88+ UNIV_MEM_ASSERT_W(buf, n);
89+
90+- for (ptr = buf; ptr < buf + n; ptr++) {
91+- if (ut_rnd_gen_ibool()) {
92+- *ptr = 0xDE;
93+- } else {
94+- *ptr = 0xAD;
95+- }
96+- }
97++ /* Fix https://bugs.launchpad.net/percona-xtrabackup/+bug/1158154 */
98++ memset(buf, 0xDE, n);
99+
100+ UNIV_MEM_FREE(buf, n);
101+ }
102
103=== modified file 'patches/xtradb51.patch'
104--- patches/xtradb51.patch 2013-03-13 05:04:17 +0000
105+++ patches/xtradb51.patch 2013-03-22 05:17:30 +0000
106@@ -1411,3 +1411,46 @@
107 };
108
109 /** The buffer control block structure */
110+--- a/storage/innodb_plugin/mem/mem0dbg.c
111++++ b/storage/innodb_plugin/mem/mem0dbg.c
112+@@ -272,18 +272,10 @@
113+ byte* buf, /*!< in: pointer to buffer */
114+ ulint n) /*!< in: length of buffer */
115+ {
116+- byte* ptr;
117+-
118+ UNIV_MEM_ASSERT_W(buf, n);
119+
120+- for (ptr = buf; ptr < buf + n; ptr++) {
121+-
122+- if (ut_rnd_gen_ibool()) {
123+- *ptr = 0xBA;
124+- } else {
125+- *ptr = 0xBE;
126+- }
127+- }
128++ /* Fix https://bugs.launchpad.net/percona-xtrabackup/+bug/1158154 */
129++ memset(buf, 0xBA, n);
130+
131+ UNIV_MEM_INVALID(buf, n);
132+ }
133+@@ -298,17 +290,10 @@
134+ byte* buf, /*!< in: pointer to buffer */
135+ ulint n) /*!< in: length of buffer */
136+ {
137+- byte* ptr;
138+-
139+ UNIV_MEM_ASSERT_W(buf, n);
140+
141+- for (ptr = buf; ptr < buf + n; ptr++) {
142+- if (ut_rnd_gen_ibool()) {
143+- *ptr = 0xDE;
144+- } else {
145+- *ptr = 0xAD;
146+- }
147+- }
148++ /* Fix https://bugs.launchpad.net/percona-xtrabackup/+bug/1158154 */
149++ memset(buf, 0xDE, n);
150+
151+ UNIV_MEM_FREE(buf, n);
152+ }
153
154=== modified file 'patches/xtradb55.patch'
155--- patches/xtradb55.patch 2013-03-13 05:04:17 +0000
156+++ patches/xtradb55.patch 2013-03-22 05:17:30 +0000
157@@ -1405,3 +1405,46 @@
158 };
159
160 /** The buffer control block structure */
161+--- a/storage/innobase/mem/mem0dbg.c
162++++ b/storage/innobase/mem/mem0dbg.c
163+@@ -280,18 +280,10 @@
164+ byte* buf, /*!< in: pointer to buffer */
165+ ulint n) /*!< in: length of buffer */
166+ {
167+- byte* ptr;
168+-
169+ UNIV_MEM_ASSERT_W(buf, n);
170+
171+- for (ptr = buf; ptr < buf + n; ptr++) {
172+-
173+- if (ut_rnd_gen_ibool()) {
174+- *ptr = 0xBA;
175+- } else {
176+- *ptr = 0xBE;
177+- }
178+- }
179++ /* Fix https://bugs.launchpad.net/percona-xtrabackup/+bug/1158154 */
180++ memset(buf, 0xBA, n);
181+
182+ UNIV_MEM_INVALID(buf, n);
183+ }
184+@@ -306,17 +298,10 @@
185+ byte* buf, /*!< in: pointer to buffer */
186+ ulint n) /*!< in: length of buffer */
187+ {
188+- byte* ptr;
189+-
190+ UNIV_MEM_ASSERT_W(buf, n);
191+
192+- for (ptr = buf; ptr < buf + n; ptr++) {
193+- if (ut_rnd_gen_ibool()) {
194+- *ptr = 0xDE;
195+- } else {
196+- *ptr = 0xAD;
197+- }
198+- }
199++ /* Fix https://bugs.launchpad.net/percona-xtrabackup/+bug/1158154 */
200++ memset(buf, 0xDE, n);
201+
202+ UNIV_MEM_FREE(buf, n);
203+ }

Subscribers

People subscribed via source and target branches