diff options
author | Tatiana A. Nurnberg <azundris@mysql.com> | 2008-08-19 15:56:41 +0200 |
---|---|---|
committer | Tatiana A. Nurnberg <azundris@mysql.com> | 2008-08-19 15:56:41 +0200 |
commit | 9c24a39a4275fec327a9a7ffa3add5d08a9a6577 (patch) | |
tree | 245c5dc94a69055f947b61fa740efc2dc105fbeb /mysys/my_static.c | |
parent | 0cf71401b3f6923d08ea935d78fbda766234f03e (diff) | |
download | mariadb-git-9c24a39a4275fec327a9a7ffa3add5d08a9a6577.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.
Diffstat (limited to 'mysys/my_static.c')
-rw-r--r-- | mysys/my_static.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysys/my_static.c b/mysys/my_static.c index cb482b19b57..d0c20da828a 100644 --- a/mysys/my_static.c +++ b/mysys/my_static.c @@ -70,8 +70,8 @@ uint sf_malloc_prehunc=0, /* If you have problem with core- */ sf_malloc_endhunc=0, /* dump when malloc-message.... */ /* set theese to 64 or 128 */ sf_malloc_quick=0; /* set if no calls to sanity */ -ulong sf_malloc_cur_memory= 0L; /* Current memory usage */ -ulong sf_malloc_max_memory= 0L; /* Maximum memory usage */ +size_t sf_malloc_cur_memory= 0L; /* Current memory usage */ +size_t sf_malloc_max_memory= 0L; /* Maximum memory usage */ uint sf_malloc_count= 0; /* Number of times NEW() was called */ uchar *sf_min_adress= (uchar*) ~(unsigned long) 0L, *sf_max_adress= (uchar*) 0L; |