From 09045ed579eabab71e3e065eedfb57c579cafc1b Mon Sep 17 00:00:00 2001 From: wanghao Date: Thu, 5 Dec 2024 18:46:18 +0800 Subject: [PATCH] [sanitizer] Resolve opening garbled code files Issue:https://gitee.com/openharmony/third_party_llvm-project/issues/IB9D0G Signed-off-by: wanghao --- compiler-rt/test/sanitizer_common/remote_interfaces/hdc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/test/sanitizer_common/remote_interfaces/hdc.py b/compiler-rt/test/sanitizer_common/remote_interfaces/hdc.py index c99f73b77cc1..ab8c0c4d0dab 100644 --- a/compiler-rt/test/sanitizer_common/remote_interfaces/hdc.py +++ b/compiler-rt/test/sanitizer_common/remote_interfaces/hdc.py @@ -61,7 +61,7 @@ def pull_from_device(path): tmp = tempfile.mktemp() hdc(['file', 'recv', path, tmp], attempts=5, check_stdout='FileTransfer finish') - text = open(tmp, 'r').read() + text = open(tmp, 'r', errors='replace').read() os.unlink(tmp) return text -- Gitee