未验证 提交 24ed5644 编写于 作者: O openharmony_ci 提交者: Gitee

!429 修复asan误报:attempting free on address which was not malloc()-ed

Merge pull request !429 from Caoruihong/fix_asan_dlopen_deadlock
......@@ -204,10 +204,6 @@ template("musl_libs") {
"-Wl,--exclude-libs=ALL",
"-Wl,--dynamic-list=${dynamic_list}",
]
if (is_asan) {
ldflags -= [ "-Wl,--dynamic-list=${dynamic_list}" ]
ldflags += [ "-Wl,-Bsymbolic-functions" ]
}
asmflags = cflags
}
......@@ -427,6 +423,13 @@ template("musl_libs") {
"-fPIC",
"-fno-stack-protector",
]
if (is_asan) {
defines = [
"NSLIST_DEFAULT_SIZE=1600",
"DSOLIST_DEFAULT_SIZE=1600",
"INHERIT_DEFAULT_SIZE=1600",
]
}
deps = porting_deps
}
......
......@@ -6,9 +6,15 @@
static ns_t g_ns_default;
static nslist g_ns_list;
#ifndef NSLIST_DEFAULT_SIZE
#define NSLIST_DEFAULT_SIZE 16
#endif
#ifndef DSOLIST_DEFAULT_SIZE
#define DSOLIST_DEFAULT_SIZE 16
#endif
#ifndef INHERIT_DEFAULT_SIZE
#define INHERIT_DEFAULT_SIZE 16
#endif
static ns_inherit_list *nsinherits_alloc()
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册