提交 b7d59b10 编写于 作者: S shuxinyiA 提交者: shuxinyiA

fixed a7f050f0 from https://gitee.com/shuxinyia/third_party_musl/pulls/302

 native hook 修改musl 影响了性能
Signed-off-by: NshuxinyiA <zhangcui11@huawei.com>
Signed-off-by: NshuxinyiA <zhangcui11@huawei.com>
上级 21b33e18
......@@ -378,23 +378,6 @@ __attribute__((constructor(1))) static void __musl_initialize()
atomic_store_explicit(&__hook_enable_hook_flag, (volatile bool)false, memory_order_seq_cst);
__set_default_malloc();
//__init_musl_log();
parse_hook_variable(&__hook_mode, __hook_process_path, sizeof(__hook_process_path));
if (__hook_mode == STATRUP_HOOK_MODE) {
readlink("/proc/self/exe", __progname, sizeof(__progname) - 1);
const char *pos = strrchr(__progname, '/');
const char* filename;
if (pos) {
filename = pos + 1;
} else {
filename = __progname;
}
if (strcmp(filename, __hook_process_path) == 0) {
atomic_store_explicit(&__hook_enable_hook_flag, (volatile bool)true, memory_order_seq_cst);
init_ohos_malloc_hook();
} else {
__hook_mode = STEP_HOOK_MODE;
}
}
__initialize_malloc();
}
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册