Commit 513d4c8e authored by marko's avatar marko

UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Display also __FILE__ and __LINE__

when these Valgrind checks fail.
parent e41bf72d
...@@ -312,7 +312,8 @@ typedef void* os_thread_ret_t; ...@@ -312,7 +312,8 @@ typedef void* os_thread_ret_t;
const void* _p = (const void*) \ const void* _p = (const void*) \
VALGRIND_CHECK_MEM_IS_DEFINED(addr, size); \ VALGRIND_CHECK_MEM_IS_DEFINED(addr, size); \
if (UNIV_LIKELY_NULL(_p)) \ 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 void*) (addr), (unsigned) (size), \
((const char*) _p) - ((const char*) (addr))); \ ((const char*) _p) - ((const char*) (addr))); \
} while (0) } while (0)
...@@ -320,7 +321,8 @@ typedef void* os_thread_ret_t; ...@@ -320,7 +321,8 @@ typedef void* os_thread_ret_t;
const void* _p = (const void*) \ const void* _p = (const void*) \
VALGRIND_CHECK_MEM_IS_ADDRESSABLE(addr, size); \ VALGRIND_CHECK_MEM_IS_ADDRESSABLE(addr, size); \
if (UNIV_LIKELY_NULL(_p)) \ 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 void*) (addr), (unsigned) (size), \
((const char*) _p) - ((const char*) (addr))); \ ((const char*) _p) - ((const char*) (addr))); \
} while (0) } while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment