mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 17:33:44 +01:00
UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Display also __FILE__ and __LINE__
when these Valgrind checks fail.
This commit is contained in:
parent
e41bf72db5
commit
513d4c8ece
1 changed files with 4 additions and 2 deletions
|
@ -312,7 +312,8 @@ typedef void* os_thread_ret_t;
|
|||
const void* _p = (const void*) \
|
||||
VALGRIND_CHECK_MEM_IS_DEFINED(addr, size); \
|
||||
if (UNIV_LIKELY_NULL(_p)) \
|
||||
fprintf(stderr, "%p[%u] undefined at %d\n", \
|
||||
fprintf(stderr, "%s:%d: %p[%u] undefined at %d\n", \
|
||||
__FILE__, __LINE__, \
|
||||
(const void*) (addr), (unsigned) (size), \
|
||||
((const char*) _p) - ((const char*) (addr))); \
|
||||
} while (0)
|
||||
|
@ -320,7 +321,8 @@ typedef void* os_thread_ret_t;
|
|||
const void* _p = (const void*) \
|
||||
VALGRIND_CHECK_MEM_IS_ADDRESSABLE(addr, size); \
|
||||
if (UNIV_LIKELY_NULL(_p)) \
|
||||
fprintf(stderr, "%p[%u] unwritable at %d\n", \
|
||||
fprintf(stderr, "%s:%d: %p[%u] unwritable at %d\n", \
|
||||
__FILE__, __LINE__, \
|
||||
(const void*) (addr), (unsigned) (size), \
|
||||
((const char*) _p) - ((const char*) (addr))); \
|
||||
} while (0)
|
||||
|
|
Loading…
Add table
Reference in a new issue