Using static asan
This commit is contained in:
parent
ffd5b64177
commit
9a5aa1d42b
@ -10,7 +10,7 @@ set(TEASPEAK_SERVER ON)
|
|||||||
#set(MEMORY_DEBUG_FLAGS " -fsanitize=leak -fsanitize=address -fstack-protector-all ")
|
#set(MEMORY_DEBUG_FLAGS " -fsanitize=leak -fsanitize=address -fstack-protector-all ")
|
||||||
#set(MEMORY_DEBUG_FLAGS "-fsanitize=address -fstack-protector-all")
|
#set(MEMORY_DEBUG_FLAGS "-fsanitize=address -fstack-protector-all")
|
||||||
#set(MEMORY_DEBUG_FLAGS "-fstack-protector-all")
|
#set(MEMORY_DEBUG_FLAGS "-fstack-protector-all")
|
||||||
set(MEMORY_DEBUG_FLAGS " -fsanitize=address ")
|
set(MEMORY_DEBUG_FLAGS " -fsanitize=address -static-libasan")
|
||||||
|
|
||||||
if (NOT BUILD_OS_ARCH)
|
if (NOT BUILD_OS_ARCH)
|
||||||
set(BUILD_OS_ARCH $ENV{build_os_arch})
|
set(BUILD_OS_ARCH $ENV{build_os_arch})
|
||||||
|
@ -299,9 +299,17 @@ int main(int argc, char** argv) {
|
|||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
{
|
{
|
||||||
void* ptr = malloc(1234);
|
auto a = malloc(10); // 0xa04010
|
||||||
free(ptr);
|
auto b = malloc(10); // 0xa04030
|
||||||
free(ptr);
|
auto c = malloc(10); // 0xa04050
|
||||||
|
|
||||||
|
free(a);
|
||||||
|
free(b); // To bypass "double free or corruption (fasttop)" check
|
||||||
|
free(a); // Double Free !!
|
||||||
|
|
||||||
|
auto d = malloc(10); // 0xa04010
|
||||||
|
auto e = malloc(10); // 0xa04030
|
||||||
|
auto f = malloc(10); // 0xa04010 - Same as 'd' !
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user