Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
8ae42ceb
Commit
8ae42ceb
authored
May 20, 2010
by
Vasil Dimov
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql-5.1-innodb from bk-internal into my local tree
parents
56586334
98406ba4
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
47 additions
and
16 deletions
+47
-16
BUILD/SETUP.sh
BUILD/SETUP.sh
+5
-1
BUILD/build_mccge.sh
BUILD/build_mccge.sh
+2
-1
BUILD/compile-amd64-valgrind-max
BUILD/compile-amd64-valgrind-max
+1
-1
BUILD/compile-pentium-icc-valgrind-max
BUILD/compile-pentium-icc-valgrind-max
+1
-1
BUILD/compile-pentium-valgrind-max
BUILD/compile-pentium-valgrind-max
+1
-1
BUILD/compile-pentium-valgrind-max-no-ndb
BUILD/compile-pentium-valgrind-max-no-ndb
+1
-1
BUILD/compile-pentium64-valgrind-max
BUILD/compile-pentium64-valgrind-max
+1
-1
configure.in
configure.in
+11
-0
include/m_string.h
include/m_string.h
+0
-3
include/my_sys.h
include/my_sys.h
+15
-2
mysys/safemalloc.c
mysys/safemalloc.c
+5
-0
storage/innobase/include/univ.i
storage/innobase/include/univ.i
+2
-2
storage/innodb_plugin/include/univ.i
storage/innodb_plugin/include/univ.i
+2
-2
No files found.
BUILD/SETUP.sh
View file @
8ae42ceb
...
@@ -119,8 +119,12 @@ fi
...
@@ -119,8 +119,12 @@ fi
# Set flags for various build configurations.
# Set flags for various build configurations.
# Used in -valgrind builds
# Used in -valgrind builds
valgrind_flags
=
"-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify "
# Override -DFORCE_INIT_OF_VARS from debug_cflags. It enables the macro
# LINT_INIT(), which is only useful for silencing spurious warnings
# of static analysis tools. We want LINT_INIT() to be a no-op in Valgrind.
valgrind_flags
=
"-UFORCE_INIT_OF_VARS -DHAVE_purify "
valgrind_flags
=
"
$valgrind_flags
-DMYSQL_SERVER_SUFFIX=-valgrind-max"
valgrind_flags
=
"
$valgrind_flags
-DMYSQL_SERVER_SUFFIX=-valgrind-max"
valgrind_configs
=
"--with-valgrind"
#
#
# Used in -debug builds
# Used in -debug builds
debug_cflags
=
"-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
debug_cflags
=
"-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
...
...
BUILD/build_mccge.sh
View file @
8ae42ceb
...
@@ -938,9 +938,10 @@ set_up_ccache()
...
@@ -938,9 +938,10 @@ set_up_ccache()
set_valgrind_flags
()
set_valgrind_flags
()
{
{
if
test
"x
$valgrind_flag
"
=
"xyes"
;
then
if
test
"x
$valgrind_flag
"
=
"xyes"
;
then
loc_valgrind_flags
=
"-U
SAFEMALLOC -U
FORCE_INIT_OF_VARS -DHAVE_purify "
loc_valgrind_flags
=
"-UFORCE_INIT_OF_VARS -DHAVE_purify "
loc_valgrind_flags
=
"
$loc_valgrind_flags
-DMYSQL_SERVER_SUFFIX=-valgrind-max"
loc_valgrind_flags
=
"
$loc_valgrind_flags
-DMYSQL_SERVER_SUFFIX=-valgrind-max"
compiler_flags
=
"
$compiler_flags
$loc_valgrind_flags
"
compiler_flags
=
"
$compiler_flags
$loc_valgrind_flags
"
with_flags
=
"
$with_flags
--with-valgrind"
fi
fi
}
}
...
...
BUILD/compile-amd64-valgrind-max
View file @
8ae42ceb
...
@@ -4,7 +4,7 @@ path=`dirname $0`
...
@@ -4,7 +4,7 @@ path=`dirname $0`
.
"
$path
/SETUP.sh"
.
"
$path
/SETUP.sh"
extra_flags
=
"
$amd64_cflags
$debug_cflags
$valgrind_flags
"
extra_flags
=
"
$amd64_cflags
$debug_cflags
$valgrind_flags
"
extra_configs
=
"
$amd64_configs
$debug_configs
$max_configs
"
extra_configs
=
"
$amd64_configs
$debug_configs
$
valgrind_configs
$
max_configs
"
.
"
$path
/FINISH.sh"
.
"
$path
/FINISH.sh"
...
...
BUILD/compile-pentium-icc-valgrind-max
View file @
8ae42ceb
...
@@ -29,6 +29,6 @@ extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
...
@@ -29,6 +29,6 @@ extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
c_warnings
=
"-Wall -Wcheck -wd161,444,279,810,981,1292,1469,1572"
c_warnings
=
"-Wall -Wcheck -wd161,444,279,810,981,1292,1469,1572"
cxx_warnings
=
"
$c_warnings
-wd869,874"
cxx_warnings
=
"
$c_warnings
-wd869,874"
base_cxxflags
=
"-fno-exceptions -fno-rtti"
base_cxxflags
=
"-fno-exceptions -fno-rtti"
extra_configs
=
"
$pentium_configs
$debug_configs
"
extra_configs
=
"
$pentium_configs
$debug_configs
$valgrind_configs
"
.
"
$path
/FINISH.sh"
.
"
$path
/FINISH.sh"
BUILD/compile-pentium-valgrind-max
View file @
8ae42ceb
...
@@ -4,7 +4,7 @@ path=`dirname $0`
...
@@ -4,7 +4,7 @@ path=`dirname $0`
.
"
$path
/SETUP.sh"
.
"
$path
/SETUP.sh"
extra_flags
=
"
$pentium_cflags
$debug_cflags
$valgrind_flags
"
extra_flags
=
"
$pentium_cflags
$debug_cflags
$valgrind_flags
"
extra_configs
=
"
$pentium_configs
$debug_configs
$max_configs
"
extra_configs
=
"
$pentium_configs
$debug_configs
$
valgrind_configs
$
max_configs
"
.
"
$path
/FINISH.sh"
.
"
$path
/FINISH.sh"
...
...
BUILD/compile-pentium-valgrind-max-no-ndb
View file @
8ae42ceb
...
@@ -4,7 +4,7 @@ path=`dirname $0`
...
@@ -4,7 +4,7 @@ path=`dirname $0`
.
"
$path
/SETUP.sh"
.
"
$path
/SETUP.sh"
extra_flags
=
"
$pentium_cflags
$debug_cflags
$valgrind_flags
"
extra_flags
=
"
$pentium_cflags
$debug_cflags
$valgrind_flags
"
extra_configs
=
"
$pentium_configs
$debug_configs
$max_no_ndb_configs
"
extra_configs
=
"
$pentium_configs
$debug_configs
$
valgrind_configs
$
max_no_ndb_configs
"
.
"
$path
/FINISH.sh"
.
"
$path
/FINISH.sh"
...
...
BUILD/compile-pentium64-valgrind-max
View file @
8ae42ceb
...
@@ -4,7 +4,7 @@ path=`dirname $0`
...
@@ -4,7 +4,7 @@ path=`dirname $0`
.
"
$path
/SETUP.sh"
.
"
$path
/SETUP.sh"
extra_flags
=
"
$pentium64_cflags
$debug_cflags
$valgrind_flags
"
extra_flags
=
"
$pentium64_cflags
$debug_cflags
$valgrind_flags
"
extra_configs
=
"
$pentium_configs
$debug_configs
$max_configs
"
extra_configs
=
"
$pentium_configs
$debug_configs
$
valgrind_configs
$
max_configs
"
.
"
$path
/FINISH.sh"
.
"
$path
/FINISH.sh"
...
...
configure.in
View file @
8ae42ceb
...
@@ -1729,6 +1729,17 @@ else
...
@@ -1729,6 +1729,17 @@ else
CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS"
CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS"
fi
fi
AC_ARG_WITH([valgrind],
[AS_HELP_STRING([--with-valgrind],
[Valgrind instrumentation @<:@default=no@:>@])],
[], [with_valgrind=no])
if test "$with_valgrind" != "no"
then
AC_CHECK_HEADERS([valgrind/valgrind.h valgrind/memcheck.h],
[AC_DEFINE([HAVE_VALGRIND], [1], [Define for Valgrind support])])
fi
# Debug Sync Facility. NOTE: depends on '
with_debug
'. Must be behind it.
# Debug Sync Facility. NOTE: depends on '
with_debug
'. Must be behind it.
AC_MSG_CHECKING(if Debug Sync Facility should be enabled.)
AC_MSG_CHECKING(if Debug Sync Facility should be enabled.)
AC_ARG_ENABLE(debug_sync,
AC_ARG_ENABLE(debug_sync,
...
...
include/m_string.h
View file @
8ae42ceb
...
@@ -127,9 +127,6 @@ extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len);
...
@@ -127,9 +127,6 @@ extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len);
extern
size_t
my_bcmp
(
const
uchar
*
s1
,
const
uchar
*
s2
,
size_t
len
);
extern
size_t
my_bcmp
(
const
uchar
*
s1
,
const
uchar
*
s2
,
size_t
len
);
#undef bcmp
#undef bcmp
#define bcmp(A,B,C) my_bcmp((A),(B),(C))
#define bcmp(A,B,C) my_bcmp((A),(B),(C))
#define bzero_if_purify(A,B) bzero(A,B)
#else
#define bzero_if_purify(A,B)
#endif
/* HAVE_purify */
#endif
/* HAVE_purify */
#ifndef bmove512
#ifndef bmove512
...
...
include/my_sys.h
View file @
8ae42ceb
...
@@ -25,6 +25,19 @@ typedef struct my_aio_result {
...
@@ -25,6 +25,19 @@ typedef struct my_aio_result {
}
my_aio_result
;
}
my_aio_result
;
#endif
#endif
#ifdef HAVE_VALGRIND
# include <valgrind/memcheck.h>
# define MEM_UNDEFINED(a,len) VALGRIND_MAKE_MEM_UNDEFINED(a,len)
# define MEM_NOACCESS(a,len) VALGRIND_MAKE_MEM_NOACCESS(a,len)
# define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,len)
# define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len)
#else
/* HAVE_VALGRIND */
# define MEM_UNDEFINED(a,len) ((void) 0)
# define MEM_NOACCESS(a,len) ((void) 0)
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
#endif
/* HAVE_VALGRIND */
#ifndef THREAD
#ifndef THREAD
extern
int
NEAR
my_errno
;
/* Last error in mysys */
extern
int
NEAR
my_errno
;
/* Last error in mysys */
#else
#else
...
@@ -141,7 +154,7 @@ extern int NEAR my_errno; /* Last error in mysys */
...
@@ -141,7 +154,7 @@ extern int NEAR my_errno; /* Last error in mysys */
#define my_memdup(A,B,C) _my_memdup((A),(B), __FILE__,__LINE__,C)
#define my_memdup(A,B,C) _my_memdup((A),(B), __FILE__,__LINE__,C)
#define my_strdup(A,C) _my_strdup((A), __FILE__,__LINE__,C)
#define my_strdup(A,C) _my_strdup((A), __FILE__,__LINE__,C)
#define my_strndup(A,B,C) _my_strndup((A),(B),__FILE__,__LINE__,C)
#define my_strndup(A,B,C) _my_strndup((A),(B),__FILE__,__LINE__,C)
#define TRASH(A,B)
bfill(A, B, 0x8F
)
#define TRASH(A,B)
do { bfill(A, B, 0x8F); MEM_UNDEFINED(A, B); } while (0
)
#define QUICK_SAFEMALLOC sf_malloc_quick=1
#define QUICK_SAFEMALLOC sf_malloc_quick=1
#define NORMAL_SAFEMALLOC sf_malloc_quick=0
#define NORMAL_SAFEMALLOC sf_malloc_quick=0
extern
uint
sf_malloc_prehunc
,
sf_malloc_endhunc
,
sf_malloc_quick
;
extern
uint
sf_malloc_prehunc
,
sf_malloc_endhunc
,
sf_malloc_quick
;
...
@@ -169,7 +182,7 @@ extern char *my_strndup(const char *from, size_t length,
...
@@ -169,7 +182,7 @@ extern char *my_strndup(const char *from, size_t length,
#define CALLER_INFO_PROTO
/* nothing */
#define CALLER_INFO_PROTO
/* nothing */
#define CALLER_INFO
/* nothing */
#define CALLER_INFO
/* nothing */
#define ORIG_CALLER_INFO
/* nothing */
#define ORIG_CALLER_INFO
/* nothing */
#define TRASH(A,B)
/* nothing */
#define TRASH(A,B)
do{MEM_CHECK_ADDRESSABLE(A,B);MEM_UNDEFINED(A,B);} while (0)
#endif
#endif
#if defined(ENABLED_DEBUG_SYNC)
#if defined(ENABLED_DEBUG_SYNC)
...
...
mysys/safemalloc.c
View file @
8ae42ceb
...
@@ -190,9 +190,12 @@ void *_mymalloc(size_t size, const char *filename, uint lineno, myf MyFlags)
...
@@ -190,9 +190,12 @@ void *_mymalloc(size_t size, const char *filename, uint lineno, myf MyFlags)
sf_malloc_count
++
;
sf_malloc_count
++
;
pthread_mutex_unlock
(
&
THR_LOCK_malloc
);
pthread_mutex_unlock
(
&
THR_LOCK_malloc
);
MEM_CHECK_ADDRESSABLE
(
data
,
size
);
/* Set the memory to the aribtrary wierd value */
/* Set the memory to the aribtrary wierd value */
if
((
MyFlags
&
MY_ZEROFILL
)
||
!
sf_malloc_quick
)
if
((
MyFlags
&
MY_ZEROFILL
)
||
!
sf_malloc_quick
)
bfill
(
data
,
size
,
(
char
)
(
MyFlags
&
MY_ZEROFILL
?
0
:
ALLOC_VAL
));
bfill
(
data
,
size
,
(
char
)
(
MyFlags
&
MY_ZEROFILL
?
0
:
ALLOC_VAL
));
if
(
!
(
MyFlags
&
MY_ZEROFILL
))
MEM_UNDEFINED
(
data
,
size
);
/* Return a pointer to the real data */
/* Return a pointer to the real data */
DBUG_PRINT
(
"exit"
,(
"ptr: %p"
,
data
));
DBUG_PRINT
(
"exit"
,(
"ptr: %p"
,
data
));
if
(
sf_min_adress
>
data
)
if
(
sf_min_adress
>
data
)
...
@@ -309,7 +312,9 @@ void _myfree(void *ptr, const char *filename, uint lineno, myf myflags)
...
@@ -309,7 +312,9 @@ void _myfree(void *ptr, const char *filename, uint lineno, myf myflags)
if
(
!
sf_malloc_quick
)
if
(
!
sf_malloc_quick
)
bfill
(
ptr
,
irem
->
datasize
,
(
pchar
)
FREE_VAL
);
bfill
(
ptr
,
irem
->
datasize
,
(
pchar
)
FREE_VAL
);
#endif
#endif
MEM_NOACCESS
(
ptr
,
irem
->
datasize
);
*
((
uint32
*
)
((
char
*
)
ptr
-
sizeof
(
uint32
)))
=
~
MAGICKEY
;
*
((
uint32
*
)
((
char
*
)
ptr
-
sizeof
(
uint32
)))
=
~
MAGICKEY
;
MEM_NOACCESS
((
char
*
)
ptr
-
sizeof
(
uint32
),
sizeof
(
uint32
));
/* Actually free the memory */
/* Actually free the memory */
free
((
char
*
)
irem
);
free
((
char
*
)
irem
);
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
...
...
storage/innobase/include/univ.i
View file @
8ae42ceb
...
@@ -82,9 +82,9 @@ memory is read outside the allocated blocks. */
...
@@ -82,9 +82,9 @@ memory is read outside the allocated blocks. */
/* Make a non-inline debug version */
/* Make a non-inline debug version */
#
if
def
HAVE_purify
#
if
defined
HAVE_VALGRIND
#
define
UNIV_DEBUG_VALGRIND
#
define
UNIV_DEBUG_VALGRIND
#
endif
/* HAVE_
purify
*/
#
endif
/* HAVE_
VALGRIND
*/
#
if
0
#
if
0
#
define
UNIV_DEBUG_VALGRIND
/* Enable extra
#
define
UNIV_DEBUG_VALGRIND
/* Enable extra
Valgrind instrumentation */
Valgrind instrumentation */
...
...
storage/innodb_plugin/include/univ.i
View file @
8ae42ceb
...
@@ -165,9 +165,9 @@ command. Not tested on Windows. */
...
@@ -165,9 +165,9 @@ command. Not tested on Windows. */
#define UNIV_COMPILE_TEST_FUNCS
#define UNIV_COMPILE_TEST_FUNCS
*/
*/
#
if
def
HAVE_purify
#
if
defined
HAVE_VALGRIND
#
define
UNIV_DEBUG_VALGRIND
#
define
UNIV_DEBUG_VALGRIND
#
endif
/* HAVE_
purify
*/
#
endif
/* HAVE_
VALGRIND
*/
#
if
0
#
if
0
#
define
UNIV_DEBUG_VALGRIND
/* Enable extra
#
define
UNIV_DEBUG_VALGRIND
/* Enable extra
Valgrind instrumentation */
Valgrind instrumentation */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment