e4619f7719
malloc debug and malloc hooks have been broken for a long time and no one noticed. So add them to be run by default on bionic changes since that provides the most coverage. Change the malloc debug and malloc hooks tests to support isolated runs. Changed the name of the malloc hooks unit tests to system tests because they weren't really unit tests. Changed the verify leak malloc debug tests to print out extra information so it is possible to figure out what sized allocation failed. Test: Ran tests. Change-Id: Idea4c864f1d62598148ee78d7c9397e45234b1ca
75 lines
1.4 KiB
Text
75 lines
1.4 KiB
Text
// ==============================================================
|
|
// libc_malloc_hooks.so
|
|
// ==============================================================
|
|
cc_library {
|
|
name: "libc_malloc_hooks",
|
|
|
|
srcs: [
|
|
"malloc_hooks.cpp",
|
|
],
|
|
|
|
static_libs: [
|
|
"libasync_safe",
|
|
],
|
|
|
|
multilib: {
|
|
lib32: {
|
|
version_script: "exported32.map",
|
|
},
|
|
lib64: {
|
|
version_script: "exported64.map",
|
|
},
|
|
},
|
|
include_dirs: ["bionic/libc"],
|
|
|
|
sanitize: {
|
|
never: true,
|
|
},
|
|
native_coverage: false,
|
|
|
|
cflags: [
|
|
"-Wall",
|
|
"-Werror",
|
|
"-fno-stack-protector",
|
|
],
|
|
|
|
apex_available: [
|
|
"com.android.runtime",
|
|
],
|
|
static: {
|
|
apex_available: [
|
|
"//apex_available:platform",
|
|
],
|
|
},
|
|
}
|
|
|
|
// ==============================================================
|
|
// Unit Tests
|
|
// ==============================================================
|
|
cc_test {
|
|
name: "malloc_hooks_system_tests",
|
|
isolated: true,
|
|
|
|
srcs: [
|
|
"tests/malloc_hooks_tests.cpp",
|
|
],
|
|
|
|
whole_static_libs: ["libc_malloc_hooks"],
|
|
|
|
shared_libs: ["libbase"],
|
|
|
|
local_include_dirs: ["tests"],
|
|
include_dirs: [
|
|
"bionic/libc",
|
|
"bionic"
|
|
],
|
|
header_libs: [
|
|
"bionic_libc_platform_headers",
|
|
],
|
|
|
|
cflags: [
|
|
"-Wall",
|
|
"-Werror",
|
|
],
|
|
test_suites: ["general-tests"],
|
|
}
|