mariadb/BUILD
Davi Arnaut f56dd32bf7 Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.

Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.

Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost. 

The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.

Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.

client/mysqldump.c:
  Pass my_free directly as its signature is compatible with the
  callback type -- which wasn't the case for free_table_ent.
2010-07-08 18:20:08 -03:00
..
autorun.sh WL#5161 : Cross-platform build with CMake 2009-11-09 12:32:48 +01:00
build_mccge.sh Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
check-cpu Merge from mysql-5.1-bugteam. 2009-09-16 10:52:43 +04:00
choose_configure.sh Remove confusing comment 2010-04-19 13:05:07 +02:00
cleanup hanged UDF interface to use clear() instead of reset() 2003-08-27 22:30:50 +03:00
compile-alpha Update to autoconf 2.52 2002-02-07 21:34:35 +02:00
compile-alpha-debug BUILD scripts: s/(dist)?clean/maintainer-clean/ 2007-01-28 21:09:54 +01:00
compile-amd64-debug-max Remove dead code from BUILD/ scripts: $debug_extra_warnings is 2006-04-05 17:50:33 +04:00
compile-amd64-debug-max-no-ndb Remove dead code from BUILD/ scripts: $debug_extra_warnings is 2006-04-05 17:50:33 +04:00
compile-amd64-gcov Bug#23062 (GCOV build: helper scripts missing in the BUILD directory) 2007-08-15 18:10:16 -06:00
compile-amd64-gprof Bug#23062 (GCOV build: helper scripts missing in the BUILD directory) 2007-08-15 18:10:16 -06:00
compile-amd64-max Remove dead code from BUILD/ scripts. 2006-04-05 16:50:12 +04:00
compile-amd64-max-sci New SCI Transporter Build scripts 2007-05-07 15:33:27 +02:00
compile-amd64-valgrind-max Merge a change from mysql-5.1-innodb: 2010-05-20 14:43:06 +03:00
compile-darwin-mwcc Remove dead code from BUILD/ scripts: $debug_extra_warnings is 2006-04-05 17:50:33 +04:00
compile-dist WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
compile-hpux11-parisc2-aCC BUILD scripts: s/(dist)?clean/maintainer-clean/ 2007-01-28 21:09:54 +01:00
compile-ia64-debug-max Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
compile-irix-mips64-mipspro BUILD scripts: s/(dist)?clean/maintainer-clean/ 2007-01-28 21:09:54 +01:00
compile-ndb-autotest ndb - 2006-08-02 09:08:21 +02:00
compile-pentium BUG#27701 don't pass arguments to sourced script if they're not modified as this is either a no-op (if done correctly), a different no-op with some shells (if done the bash way, but with correct quoting) or breaks arguments with whitespace for some shells (if done the bash way, without quotes). 2007-04-11 14:12:00 +02:00
compile-pentium-cybozu Add missing parts for the "Cybozu" custom build, to avoid future manual patches. 2005-04-08 13:56:48 +02:00
compile-pentium-debug Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-27701 2007-04-11 14:06:03 +02:00
compile-pentium-debug-max Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-27701 2007-04-11 14:06:03 +02:00
compile-pentium-debug-max-no-embedded Implement --warning-mode in SETUP.sh. The value of the 2006-04-07 02:25:59 +04:00
compile-pentium-debug-max-no-ndb Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-27701 2007-04-11 14:06:03 +02:00
compile-pentium-debug-openssl BUG#18818 configure: No longer finds OpenSSL on Mac OS X 2006-05-17 13:59:37 +02:00
compile-pentium-debug-yassl BUG#18818 configure: No longer finds OpenSSL on Mac OS X 2006-05-17 13:59:37 +02:00
compile-pentium-gcov Manual merge 2007-08-22 12:02:23 -06:00
compile-pentium-gprof Bug#23062 (GCOV build: helper scripts missing in the BUILD directory) 2007-08-15 18:10:16 -06:00
compile-pentium-icc Bug #12717 yassl: Crashes in "integer.cpp" when compiled with icc 2005-09-01 14:07:45 +02:00
compile-pentium-icc-valgrind-max Merge a change from mysql-5.1-innodb: 2010-05-20 14:43:06 +03:00
compile-pentium-icc-yassl Bug #12717 yassl: Crashes in "integer.cpp" when compiled with icc 2005-09-01 14:07:45 +02:00
compile-pentium-max Remove dead code from BUILD/ scripts. 2006-04-05 16:50:12 +04:00
compile-pentium-myodbc - cleaned up BUILD scripts 2000-12-18 23:24:19 +02:00
compile-pentium-mysqlfs-debug Remove dead code from BUILD/ scripts: $debug_extra_warnings is 2006-04-05 17:50:33 +04:00
compile-pentium-pgcc BUILD scripts: s/(dist)?clean/maintainer-clean/ 2007-01-28 21:09:54 +01:00
compile-pentium-valgrind-max Merge a change from mysql-5.1-innodb: 2010-05-20 14:43:06 +03:00
compile-pentium-valgrind-max-no-ndb Merge a change from mysql-5.1-innodb: 2010-05-20 14:43:06 +03:00
compile-pentium64 BUG#27701 don't pass arguments to sourced script if they're not modified as this is either a no-op (if done correctly), a different no-op with some shells (if done the bash way, but with correct quoting) or breaks arguments with whitespace for some shells (if done the bash way, without quotes). 2007-04-11 14:12:00 +02:00
compile-pentium64-debug Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-27701 2007-04-11 14:06:03 +02:00
compile-pentium64-debug-max Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-27701 2007-04-11 14:06:03 +02:00
compile-pentium64-gcov Bug#23062 (GCOV build: helper scripts missing in the BUILD directory) 2007-08-15 18:10:16 -06:00
compile-pentium64-gprof Bug#23062 (GCOV build: helper scripts missing in the BUILD directory) 2007-08-15 18:10:16 -06:00
compile-pentium64-max BUG#27701 don't pass arguments to sourced script if they're not modified as this is either a no-op (if done correctly), a different no-op with some shells (if done the bash way, but with correct quoting) or breaks arguments with whitespace for some shells (if done the bash way, without quotes). 2007-04-11 14:12:00 +02:00
compile-pentium64-max-sci New SCI Transporter Build scripts 2007-05-07 15:33:27 +02:00
compile-pentium64-valgrind-max Merge a change from mysql-5.1-innodb: 2010-05-20 14:43:06 +03:00
compile-ppc - fixed file permissions (need execute bits set) 2004-12-02 10:11:28 +01:00
compile-ppc-debug Remove dead code from BUILD/ scripts: $debug_extra_warnings is 2006-04-05 17:50:33 +04:00
compile-ppc-debug-max Remove dead code from BUILD/ scripts: $debug_extra_warnings is 2006-04-05 17:50:33 +04:00
compile-ppc-debug-max-no-ndb Remove dead code from BUILD/ scripts: $debug_extra_warnings is 2006-04-05 17:50:33 +04:00
compile-ppc-max Remove dead code from BUILD/ scripts. 2006-04-05 16:50:12 +04:00
compile-solaris-amd64 Adding build scripts for Solaris 10 on AMD64. 2007-11-10 11:03:07 +01:00
compile-solaris-amd64-debug Adding build scripts for Solaris 10 on AMD64. 2007-11-10 11:03:07 +01:00
compile-solaris-amd64-forte Bug#38727: BUILD/compile-solaris-* scripts should compile MySQL with libmtmalloc 2008-09-30 17:57:48 -03:00
compile-solaris-amd64-forte-debug Bug#38727: BUILD/compile-solaris-* scripts should compile MySQL with libmtmalloc 2008-09-30 17:57:48 -03:00
compile-solaris-sparc Bug#38727: BUILD/compile-solaris-* scripts should compile MySQL with libmtmalloc 2008-09-30 17:57:48 -03:00
compile-solaris-sparc-debug Fixes Bug#30127: --debug-info no longer prints memory usage in mysql 2007-08-01 22:59:05 +03:00
compile-solaris-sparc-forte Bug#38727: BUILD/compile-solaris-* scripts should compile MySQL with libmtmalloc 2008-09-30 17:57:48 -03:00
compile-solaris-sparc-purify Merge bk-internal.mysql.com:/home/bk/mysql-5.1 2007-02-26 16:12:40 +01:00
FINISH.sh BUILD scripts: s/(dist)?clean/maintainer-clean/ 2007-01-28 21:09:54 +01:00
Makefile.am Remove build files which relied on the now defunct make-ccc files. 2010-05-28 18:17:02 -03:00
SETUP.sh Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00