This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 46504837ca4ba072c55a3715b711c6f15cf4f789
Author: chenxiaoyi <chenxia...@xiaomi.com>
AuthorDate: Thu May 8 15:05:05 2025 +0800

    clang/gcov: fix the open flags and mode
    
    Signed-off-by: chenxiaoyi <chenxia...@xiaomi.com>
---
 libs/libbuiltin/compiler-rt/coverage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/libbuiltin/compiler-rt/coverage.c 
b/libs/libbuiltin/compiler-rt/coverage.c
index ab24d5f7b2..94f58d3928 100644
--- a/libs/libbuiltin/compiler-rt/coverage.c
+++ b/libs/libbuiltin/compiler-rt/coverage.c
@@ -310,7 +310,7 @@ void __gcov_dump(void)
       return;
     }
 
-  fd = _NX_OPEN(path, O_WRONLY | O_CREAT);
+  fd = _NX_OPEN(path, O_WRONLY | O_CREAT | O_TRUNC, 0666);
   if (fd < 0)
     {
       _NX_SETERRNO(fd);

Reply via email to