[libc-commits] [PATCH] D148844: [libc] Add null-terminator to the thread name obtained from the syscall.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Apr 20 14:35:19 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 rG8972c0df42e0: [libc] Add null-terminator to the thread name obtained from the syscall. (authored by sivachandra).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148844

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
@@ -385,7 +385,7 @@
     name_buffer[retval - 1] = '\0';
   else
     name_buffer[retval] = '\0';
-  name << name_buffer;
+  name << name_buffer << cpp::StringStream::ENDS;
   return 0;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148844.515490.patch
Type: text/x-patch
Size: 406 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230420/194b7ab2/attachment-0001.bin>


More information about the libc-commits mailing list