From 83864cec49f5ef168d14e432703e7889845e5450 Mon Sep 17 00:00:00 2001 From: cs1111 Date: Wed, 3 Sep 2025 15:11:53 +0800 Subject: [PATCH 1/2] fix: asan exit Signed-off-by: cs1111 Change-Id: I5ceb1dc18db12b3902f2349030ab78fbf9baeba8 --- 2073.diff:Zone.Identifier | 3 +++ .../innerkits/signal_handler/dfx_dumprequest.c | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 2073.diff:Zone.Identifier diff --git a/2073.diff:Zone.Identifier b/2073.diff:Zone.Identifier new file mode 100644 index 000000000..2981b3b4a --- /dev/null +++ b/2073.diff:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=https://gitee.com/openharmony/hiviewdfx_faultloggerd/pulls/2073.diff diff --git a/interfaces/innerkits/signal_handler/dfx_dumprequest.c b/interfaces/innerkits/signal_handler/dfx_dumprequest.c index be28a8955..ee0e2aeb5 100644 --- a/interfaces/innerkits/signal_handler/dfx_dumprequest.c +++ b/interfaces/innerkits/signal_handler/dfx_dumprequest.c @@ -395,16 +395,16 @@ static bool StartProcessdump(void) } else if (pid == 0) { if (!InitPipe()) { DFXLOGE("init pipe fail"); - _exit(errno); + syscall(SYS_exit, errno); } pid_t processDumpPid = ForkBySyscall(); if (processDumpPid < 0) { DFXLOGE("Failed to fork processdump(%{public}d)", errno); - _exit(errno); + syscall(SYS_exit, errno); } else if (processDumpPid > 0) { int ret = ReadProcessDumpGetRegsMsg() == true ? 0 : errno; DFXLOGI("exit the processdump parent process."); - _exit(ret); + syscall(SYS_exit, ret); } else { uint64_t endTime; int tid; @@ -422,7 +422,7 @@ static bool StartProcessdump(void) } else { DFXLOGI("current has spend all time, not execl processdump"); } - _exit(0); + syscall(SYS_exit, 0); } } return WaitProcessExitTimeout(pid, WAITPID_TIMEOUT); @@ -443,10 +443,10 @@ static bool StartVMProcessUnwind(void) GetAbsTimeMilliSecondsCInterce() - startTime); g_vmRealPid = GetRealPid(); DFXLOGI("vm prorcecc read pid = %{public}ld", g_vmRealPid); - _exit(0); + syscall(SYS_exit, 0); } else { DFXLOGI("exit dummy vm process"); - _exit(0); + syscall(SYS_exit, 0); } } -- Gitee From 446c0331a3af7c659f959f054c13b454173d5068 Mon Sep 17 00:00:00 2001 From: cs1111 Date: Wed, 3 Sep 2025 15:12:04 +0800 Subject: [PATCH 2/2] fix: asan exit Signed-off-by: cs1111 Change-Id: I0785302cf5733e862983701d8f8452da7f82fdb8 --- 2073.diff:Zone.Identifier | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 2073.diff:Zone.Identifier diff --git a/2073.diff:Zone.Identifier b/2073.diff:Zone.Identifier deleted file mode 100644 index 2981b3b4a..000000000 --- a/2073.diff:Zone.Identifier +++ /dev/null @@ -1,3 +0,0 @@ -[ZoneTransfer] -ZoneId=3 -HostUrl=https://gitee.com/openharmony/hiviewdfx_faultloggerd/pulls/2073.diff -- Gitee