summaryrefslogtreecommitdiff
path: root/mysys/my_static.h
diff options
context:
space:
mode:
authorTatiana A. Nurnberg <azundris@mysql.com>2008-08-19 15:56:41 +0200
committerTatiana A. Nurnberg <azundris@mysql.com>2008-08-19 15:56:41 +0200
commit98eccd94a15643377e49dcb82092b32603d44dd9 (patch)
tree245c5dc94a69055f947b61fa740efc2dc105fbeb /mysys/my_static.h
parent86fd86ed9839204be5bbae11bc19a3e1a3728332 (diff)
downloadmariadb-git-98eccd94a15643377e49dcb82092b32603d44dd9.tar.gz
Bug#35616: memory overrun on 64-bit linux on setting large values for keybuffer-size
We could allocate chunks larger than 4GB, but did our size-accounting in 32-bit values. This could lead to spurious warnings, inaccurate accounting, and, in theory, data loss. Affected: 64-bit platforms. Debug-build (with safemalloc). At least one buffer larger than 4GB. For potential data loss, a re-alloc on such a buffer would be necessary. mysys/my_static.c: Make memory-accounting 64-bit safe. mysys/my_static.h: Make memory-accounting 64-bit safe. Move in struct for better alignment when 64-bit.
Diffstat (limited to 'mysys/my_static.h')
-rw-r--r--mysys/my_static.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys/my_static.h b/mysys/my_static.h
index 0eca196c1c9..90168b099a8 100644
--- a/mysys/my_static.h
+++ b/mysys/my_static.h
@@ -44,8 +44,8 @@ struct st_irem
struct st_irem *next; /* Linked list of structures */
struct st_irem *prev; /* Other link */
char *filename; /* File in which memory was new'ed */
+ size_t datasize; /* Size requested */
uint32 linenum; /* Line number in above file */
- uint32 datasize; /* Size requested */
uint32 SpecialValue; /* Underrun marker value */
};