diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-12-12 22:58:24 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-12-12 22:58:24 +0100 |
commit | 6cc9d0ffa0b6d9d0f19cf9445fad0e0ba11e38f8 (patch) | |
tree | 6952bb89985c14f7ad5e362dd350d191cadd0d69 /dbug/tests.c | |
parent | 37c81d81b3940a21b500aff6aeb70e8b1df0b7e8 (diff) | |
download | mariadb-git-6cc9d0ffa0b6d9d0f19cf9445fad0e0ba11e38f8.tar.gz |
move safemalloc out of dbug.
remeber a real backtrace for every allocation.
make safemalloc to tract C++ new/delete too.
collateral fixes to make the test suite pass.
Diffstat (limited to 'dbug/tests.c')
-rw-r--r-- | dbug/tests.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dbug/tests.c b/dbug/tests.c index 5fb84d48ffc..d96388e9816 100644 --- a/dbug/tests.c +++ b/dbug/tests.c @@ -5,6 +5,7 @@ char *push1=0; #include <my_global.h> /* This includes dbug.h */ +#include <my_sys.h> #include <my_pthread.h> #include <string.h> @@ -44,7 +45,7 @@ int main (int argc, char *argv[]) if (argc == 1) return 0; - my_thread_global_init(); + MY_INIT("dbug-tests"); dup2(1, 2); for (i = 1; i < argc; i++) @@ -56,7 +57,6 @@ int main (int argc, char *argv[]) } { DBUG_ENTER ("main"); - DBUG_PROCESS ("dbug-tests"); func1(); DBUG_EXECUTE_IF("dump", { @@ -78,6 +78,9 @@ int main (int argc, char *argv[]) DBUG_PRINT("explain", ("dbug explained: %s", s)); } func2(); - DBUG_RETURN (0); + DBUG_LEAVE; } + DBUG_SET(""); /* to not have my_end() in the traces */ + my_end(0); + return 0; } |