List:Commits« Previous MessageNext Message »
From:marko.makela Date:June 1 2010 11:57am
Subject:bzr commit into mysql-trunk-innodb branch (marko.makela:3129)
View as plain text  
#At file:///home/marko/innobase/dev/mysql2a/5.5-innodb/ based on revid:marko.makela@strippedofphhbi71z1v

 3129 Marko Mäkelä	2010-06-01
      Merge from mysql-5.1-innodb:
      
        ------------------------------------------------------------
        revno: 3478.1.3
        revision-id: marko.makela@stripped100525123748-pmpehbg29oyhc1ns
        parent: marko.makela@stripped
        committer: Marko Mäkelä <marko.makela@stripped>
        branch nick: 5.1-innodb
        timestamp: Tue 2010-05-25 15:37:48 +0300
        message:
          Suppress bogus Valgrind warnings about buf_buddy_relocate()
          accessing uninitialized memory in Valgrind-instrumented builds.

    modified:
      mysql-test/valgrind.supp
      storage/innobase/buf/buf0buddy.c
=== modified file 'mysql-test/valgrind.supp'
--- a/mysql-test/valgrind.supp	revid:marko.makela@stripped
+++ b/mysql-test/valgrind.supp	revid:marko.makela@oracle.com-20100601115622-9wa4r31b2lsu17ti
@@ -740,3 +740,8 @@
    fun:pthread_create*
 }
 
+{
+   buf_buddy_relocate peeking (space,page) in potentially free blocks
+   Memcheck:Addr1
+   fun:buf_buddy_relocate
+}

=== modified file 'storage/innobase/buf/buf0buddy.c'
--- a/storage/innobase/buf/buf0buddy.c	revid:marko.makela@stripped015-n30uofphhbi71z1v
+++ b/storage/innobase/buf/buf0buddy.c	revid:marko.makela@strippedlsu17ti
@@ -446,12 +446,15 @@ buf_buddy_relocate(
 		pool), so there is nothing wrong about this.  The
 		mach_read_from_4() calls here will only trigger bogus
 		Valgrind memcheck warnings in UNIV_DEBUG_VALGRIND builds. */
-		bpage = buf_page_hash_get(
-			buf_pool,
-			mach_read_from_4((const byte*) src
-					 + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID),
-			mach_read_from_4((const byte*) src
-					 + FIL_PAGE_OFFSET));
+		ulint		space	= mach_read_from_4(
+			(const byte*) src + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
+		ulint		page_no	= mach_read_from_4(
+			(const byte*) src + FIL_PAGE_OFFSET);
+		/* Suppress Valgrind warnings about conditional jump
+		on uninitialized value. */
+		UNIV_MEM_VALID(&space, sizeof space);
+		UNIV_MEM_VALID(&page_no, sizeof page_no);
+		bpage = buf_page_hash_get(buf_pool, space, page_no);
 
 		if (!bpage || bpage->zip.data != src) {
 			/* The block has probably been freshly

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20100601115622-9wa4r31b2lsu17ti.bundle
Thread
bzr commit into mysql-trunk-innodb branch (marko.makela:3129) marko.makela1 Jun