List:Commits« Previous MessageNext Message »
From:Tatiana A. Nurnberg Date:August 19 2008 4:10pm
Subject:bzr commit into mysql-6.0 branch (azundris:2776) Bug#35616
View as plain text  
#At file:///misc/mysql/forest/35616/60-35616/

 2776 Tatiana A. Nurnberg	2008-08-19 [merge]
      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.
modified:
  mysys/my_static.c

per-file messages:
  mysys/my_static.c
    Make memory-accounting 64-bit safe.
=== modified file 'mysys/my_static.c'
--- a/mysys/my_static.c	2008-06-17 20:04:19 +0000
+++ b/mysys/my_static.c	2008-08-19 14:10:19 +0000
@@ -70,8 +70,8 @@ uint sf_malloc_prehunc=0,		/* If you hav
      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;

Thread
bzr commit into mysql-6.0 branch (azundris:2776) Bug#35616Tatiana A. Nurnberg19 Aug