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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
03eb1593
Commit
03eb1593
authored
Jan 21, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve ASAN instrumentation: InnoDB/XtraDB
parent
d9c460b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
+19
-14
storage/innobase/include/univ.i
storage/innobase/include/univ.i
+10
-7
storage/xtradb/include/univ.i
storage/xtradb/include/univ.i
+9
-7
No files found.
storage/innobase/include/univ.i
View file @
03eb1593
...
...
@@ -162,7 +162,7 @@ command. Not tested on Windows. */
#define UNIV_COMPILE_TEST_FUNCS
*/
#
if
defined
(
HAVE_
valgrind
)
&
&
defined(HAVE_VALGRIND_MEMCHECK_H
)
#
if
defined
(
HAVE_
VALGRIND
)
&
&
defined(HAVE_valgrind
)
#
define
UNIV_DEBUG_VALGRIND
#
endif
/* HAVE_VALGRIND */
#
if
0
...
...
@@ -497,12 +497,17 @@ typedef void* os_thread_ret_t;
#
include
"ut0dbg.h"
#
include
"ut0ut.h"
#
include
"db0err.h"
#
include
<
my_valgrind
.
h
>
/* define UNIV macros in terms of my_valgrind.h */
#
define
UNIV_MEM_INVALID
(
addr
,
size
)
MEM_UNDEFINED
(
addr
,
size
)
#
define
UNIV_MEM_FREE
(
addr
,
size
)
MEM_NOACCESS
(
addr
,
size
)
#
define
UNIV_MEM_ALLOC
(
addr
,
size
)
UNIV_MEM_INVALID
(
addr
,
size
)
/* macros below cannot be defined in terms of my_valgrind.h */
#
ifdef
UNIV_DEBUG_VALGRIND
#
include
<
valgrind
/
memcheck
.
h
>
#
define
UNIV_MEM_VALID
(
addr
,
size
)
VALGRIND_MAKE_MEM_DEFINED
(
addr
,
size
)
#
define
UNIV_MEM_INVALID
(
addr
,
size
)
VALGRIND_MAKE_MEM_UNDEFINED
(
addr
,
size
)
#
define
UNIV_MEM_FREE
(
addr
,
size
)
VALGRIND_MAKE_MEM_NOACCESS
(
addr
,
size
)
#
define
UNIV_MEM_ALLOC
(
addr
,
size
)
VALGRIND_MAKE_MEM_UNDEFINED
(
addr
,
size
)
#
define
UNIV_MEM_DESC
(
addr
,
size
,
b
)
VALGRIND_CREATE_BLOCK
(
addr
,
size
,
b
)
#
define
UNIV_MEM_UNDESC
(
b
)
VALGRIND_DISCARD
(
b
)
#
define
UNIV_MEM_ASSERT_RW
(
addr
,
size
)
do
{
\
...
...
@@ -525,14 +530,12 @@ typedef void* os_thread_ret_t;
}
while
(
0
)
#
else
#
define
UNIV_MEM_VALID
(
addr
,
size
)
do
{}
while
(
0
)
#
define
UNIV_MEM_INVALID
(
addr
,
size
)
do
{}
while
(
0
)
#
define
UNIV_MEM_FREE
(
addr
,
size
)
do
{}
while
(
0
)
#
define
UNIV_MEM_ALLOC
(
addr
,
size
)
do
{}
while
(
0
)
#
define
UNIV_MEM_DESC
(
addr
,
size
,
b
)
do
{}
while
(
0
)
#
define
UNIV_MEM_UNDESC
(
b
)
do
{}
while
(
0
)
#
define
UNIV_MEM_ASSERT_RW
(
addr
,
size
)
do
{}
while
(
0
)
#
define
UNIV_MEM_ASSERT_W
(
addr
,
size
)
do
{}
while
(
0
)
#
endif
#
define
UNIV_MEM_ASSERT_AND_FREE
(
addr
,
size
)
do
{
\
UNIV_MEM_ASSERT_W
(
addr
,
size
)
;
\
UNIV_MEM_FREE
(
addr
,
size
)
;
\
...
...
storage/xtradb/include/univ.i
View file @
03eb1593
...
...
@@ -170,7 +170,7 @@ command. Not tested on Windows. */
#define UNIV_COMPILE_TEST_FUNCS
*/
#
if
defined
(
HAVE_
valgrind
)
&
&
defined(HAVE_VALGRIND_MEMCHECK_H
)
#
if
defined
(
HAVE_
VALGRIND
)
&
&
defined(HAVE_valgrind
)
#
define
UNIV_DEBUG_VALGRIND
#
endif
#
if
0
...
...
@@ -511,12 +511,17 @@ typedef void* os_thread_ret_t;
#
include
"ut0dbg.h"
#
include
"ut0ut.h"
#
include
"db0err.h"
#
include
<
my_valgrind
.
h
>
/* define UNIV macros in terms of my_valgrind.h */
#
define
UNIV_MEM_INVALID
(
addr
,
size
)
MEM_UNDEFINED
(
addr
,
size
)
#
define
UNIV_MEM_FREE
(
addr
,
size
)
MEM_NOACCESS
(
addr
,
size
)
#
define
UNIV_MEM_ALLOC
(
addr
,
size
)
UNIV_MEM_INVALID
(
addr
,
size
)
/* macros below cannot be defined in terms of my_valgrind.h */
#
ifdef
UNIV_DEBUG_VALGRIND
#
include
<
valgrind
/
memcheck
.
h
>
#
define
UNIV_MEM_VALID
(
addr
,
size
)
VALGRIND_MAKE_MEM_DEFINED
(
addr
,
size
)
#
define
UNIV_MEM_INVALID
(
addr
,
size
)
VALGRIND_MAKE_MEM_UNDEFINED
(
addr
,
size
)
#
define
UNIV_MEM_FREE
(
addr
,
size
)
VALGRIND_MAKE_MEM_NOACCESS
(
addr
,
size
)
#
define
UNIV_MEM_ALLOC
(
addr
,
size
)
VALGRIND_MAKE_MEM_UNDEFINED
(
addr
,
size
)
#
define
UNIV_MEM_DESC
(
addr
,
size
,
b
)
VALGRIND_CREATE_BLOCK
(
addr
,
size
,
b
)
#
define
UNIV_MEM_UNDESC
(
b
)
VALGRIND_DISCARD
(
b
)
#
define
UNIV_MEM_ASSERT_RW
(
addr
,
size
)
do
{
\
...
...
@@ -539,9 +544,6 @@ typedef void* os_thread_ret_t;
}
while
(
0
)
#
else
#
define
UNIV_MEM_VALID
(
addr
,
size
)
do
{}
while
(
0
)
#
define
UNIV_MEM_INVALID
(
addr
,
size
)
do
{}
while
(
0
)
#
define
UNIV_MEM_FREE
(
addr
,
size
)
do
{}
while
(
0
)
#
define
UNIV_MEM_ALLOC
(
addr
,
size
)
do
{}
while
(
0
)
#
define
UNIV_MEM_DESC
(
addr
,
size
,
b
)
do
{}
while
(
0
)
#
define
UNIV_MEM_UNDESC
(
b
)
do
{}
while
(
0
)
#
define
UNIV_MEM_ASSERT_RW
(
addr
,
size
)
do
{}
while
(
0
)
...
...
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