I set TCMALLOC_PAGE_FENCE to true, and added the --enable-frame-poin option in the compilation. However, it does not work.
The code is as follows:
#include <unistd.h>
#include <string.h>
#include <stdio.h>
void foo(char* p){
memcpy(p, "01234567890abcdef", 16);
}
int main(int argc, char** argv){
char* p = new char[10];
foo(p);
return 0;
}
I've tried version 2.1.90 and above but couldn't find the problem, however, it is identifiable in version 2.1.