do { \
__asm__ __volatile__ ("movl $0, %ecx\n\t"); \
} while (0)
+#elif defined (__clang__) && defined(VGA_amd64)
+#define CLEAR_CALLER_SAVED_REGS \
+ do { \
+ __asm__ __volatile__ ("movq $0, %r11\n\t"); \
+ } while (0)
#elif defined(__arm__)
/* 32bit arm */
#define CLEAR_CALLER_SAVED_REGS \
#include <string>
#include <sstream>
#include "../memcheck.h"
+#include "leak.h"
// Derived from test provided by Timur Iskhodzhanov (bug 280271)
class MyClass
int main() {
doit();
+ CLEAR_CALLER_SAVED_REGS;
(void) VALGRIND_MONITOR_COMMAND("v.set log_output");
fprintf(stderr, "VALGRIND_DO_LEAK_CHECK\n");
valgrind output will go to log
VALGRIND_DO_LEAK_CHECK
x bytes in 1 blocks are definitely lost in loss record ... of ...
- by 0x........: doit() (leak_cpp_interior.cpp:119)
- by 0x........: main (leak_cpp_interior.cpp:134)
+ by 0x........: doit() (leak_cpp_interior.cpp:120)
+ by 0x........: main (leak_cpp_interior.cpp:135)
LEAK SUMMARY:
definitely lost: x bytes in 1 blocks
valgrind output will go to log
VALGRIND_DO_LEAK_CHECK
x bytes in 1 blocks are definitely lost in loss record ... of ...
- by 0x........: doit() (leak_cpp_interior.cpp:119)
- by 0x........: main (leak_cpp_interior.cpp:134)
+ by 0x........: doit() (leak_cpp_interior.cpp:120)
+ by 0x........: main (leak_cpp_interior.cpp:135)
LEAK SUMMARY:
definitely lost: x bytes in 1 blocks
valgrind output will go to log
VALGRIND_DO_LEAK_CHECK
x bytes in 1 blocks are definitely lost in loss record ... of ...
- by 0x........: doit() (leak_cpp_interior.cpp:119)
- by 0x........: main (leak_cpp_interior.cpp:134)
+ by 0x........: doit() (leak_cpp_interior.cpp:120)
+ by 0x........: main (leak_cpp_interior.cpp:135)
x bytes in 1 blocks are possibly lost in loss record ... of ...
by 0x........: doit() (leak_cpp_interior.cpp:109)
valgrind output will go to log
VALGRIND_DO_LEAK_CHECK
x bytes in 1 blocks are definitely lost in loss record ... of ...
- by 0x........: doit() (leak_cpp_interior.cpp:119)
- by 0x........: main (leak_cpp_interior.cpp:134)
+ by 0x........: doit() (leak_cpp_interior.cpp:120)
+ by 0x........: main (leak_cpp_interior.cpp:135)
LEAK SUMMARY:
definitely lost: x bytes in 1 blocks
valgrind output will go to log
VALGRIND_DO_LEAK_CHECK
x bytes in 1 blocks are definitely lost in loss record ... of ...
- by 0x........: doit() (leak_cpp_interior.cpp:119)
- by 0x........: main (leak_cpp_interior.cpp:134)
+ by 0x........: doit() (leak_cpp_interior.cpp:120)
+ by 0x........: main (leak_cpp_interior.cpp:135)
LEAK SUMMARY:
definitely lost: x bytes in 1 blocks