[libc-commits] [PATCH] D148871: [libc] Another fix to add a null-terminator to the pthread name.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Apr 20 20:34:46 PDT 2023


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG596d87c4cce1: [libc] Another fix to add a null-terminator to the pthread name. (authored by sivachandra).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148871/new/

https://reviews.llvm.org/D148871

Files:
  libc/src/__support/threads/linux/thread.cpp


Index: libc/src/__support/threads/linux/thread.cpp
===================================================================
--- libc/src/__support/threads/linux/thread.cpp
+++ libc/src/__support/threads/linux/thread.cpp
@@ -358,7 +358,7 @@
     int retval = __llvm_libc::syscall_impl(SYS_prctl, PR_GET_NAME, name_buffer);
     if (retval < 0)
       return -retval;
-    name << name_buffer;
+    name << name_buffer << cpp::StringStream::ENDS;
     return 0;
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148871.515569.patch
Type: text/x-patch
Size: 462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230421/42616f8b/attachment.bin>


More information about the libc-commits mailing list