List:Commits« Previous MessageNext Message »
From:Jimmy Yang Date:August 4 2010 3:12am
Subject:bzr push into mysql-5.1-innodb branch (jimmy.yang:3543 to 3544) Bug#55627
View as plain text  
 3544 Jimmy Yang	2010-08-03
      Backport "NULL pointer check for ut_free()" from mysql-trunk-innodb to
      mysql-5.1-innodb plugin to fix bug #55627 segv in ut_free pars_lexer_close
      innobase_shutdown innodb-use-sys-malloc=0.

    modified:
      storage/innodb_plugin/ChangeLog
      storage/innodb_plugin/ut/ut0mem.c
 3543 Jimmy Yang	2010-08-01
      Fix Bug #55382 Assignment with SELECT expressions takes unexpected S locks
      in READ COMMITTED
      
      rb://410 Approved by Sunny Bains

    modified:
      storage/innobase/handler/ha_innodb.cc
      storage/innodb_plugin/ChangeLog
      storage/innodb_plugin/handler/ha_innodb.cc
=== modified file 'storage/innodb_plugin/ChangeLog'
--- a/storage/innodb_plugin/ChangeLog	revid:jimmy.yang@stripped
+++ b/storage/innodb_plugin/ChangeLog	revid:jimmy.yang@stripped
@@ -1,10 +1,15 @@
+2010-08-03	The InnoDB Team
+
+	* ut/ut0mem.c:
+	Fix Bug #55627 segv in ut_free pars_lexer_close innobase_shutdown
+	innodb-use-sys-malloc=0
+
 2010-08-01	The InnoDB Team
 
 	* handler/ha_innodb.cc
 	Fix Bug #55382 Assignment with SELECT expressions takes unexpected
 	S locks in READ COMMITTED
 
-
 2010-07-27	The InnoDB Team
 
 	* include/mem0pool.h, mem/mem0mem.c, mem/mem0pool.c, srv/srv0start.c:

=== modified file 'storage/innodb_plugin/ut/ut0mem.c'
--- a/storage/innodb_plugin/ut/ut0mem.c	revid:jimmy.yang@stripped
+++ b/storage/innodb_plugin/ut/ut0mem.c	revid:jimmy.yang@stripped
@@ -290,7 +290,8 @@ ut_test_malloc(
 #endif /* !UNIV_HOTBACKUP */
 
 /**********************************************************************//**
-Frees a memory block allocated with ut_malloc. */
+Frees a memory block allocated with ut_malloc. Freeing a NULL pointer is
+a nop. */
 UNIV_INTERN
 void
 ut_free(
@@ -300,7 +301,9 @@ ut_free(
 #ifndef UNIV_HOTBACKUP
 	ut_mem_block_t* block;
 
-	if (UNIV_LIKELY(srv_use_sys_malloc)) {
+	if (ptr == NULL) {
+		return;
+	} else if (UNIV_LIKELY(srv_use_sys_malloc)) {
 		free(ptr);
 		return;
 	}


Attachment: [text/bzr-bundle] bzr/jimmy.yang@oracle.com-20100804030519-k3mkpebu8ilqa10d.bundle
Thread
bzr push into mysql-5.1-innodb branch (jimmy.yang:3543 to 3544) Bug#55627Jimmy Yang4 Aug