List:Commits« Previous MessageNext Message »
From:Tatjana A Nuernberg Date:April 28 2008 10:15am
Subject:bk commit into 5.0 tree (tnurnberg:1.2610) BUG#35616
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of tnurnberg.  When tnurnberg does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-04-28 10:14:40+02:00, tnurnberg@stripped +2 -0
  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@stripped, 2008-04-28 10:14:18+02:00, tnurnberg@stripped +2 -2
    Make memory-accounting 64-bit safe.

  mysys/my_static.h@stripped, 2008-04-28 10:14:18+02:00, tnurnberg@stripped +1 -1
    Make memory-accounting 64-bit safe.
    Move in struct for better alignment when 64-bit.

diff -Nrup a/mysys/my_static.c b/mysys/my_static.c
--- a/mysys/my_static.c	2007-04-12 11:46:05 +02:00
+++ b/mysys/my_static.c	2008-04-28 10:14:18 +02:00
@@ -74,8 +74,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 */
 byte *sf_min_adress= (byte*) ~(unsigned long) 0L,
      *sf_max_adress= (byte*) 0L;
diff -Nrup a/mysys/my_static.h b/mysys/my_static.h
--- a/mysys/my_static.h	2007-03-23 11:01:47 +01:00
+++ b/mysys/my_static.h	2008-04-28 10:14:18 +02:00
@@ -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	   */
 };
 
Thread
bk commit into 5.0 tree (tnurnberg:1.2610) BUG#35616Tatjana A Nuernberg28 Apr