Skip to content

Commit

Permalink
[libc] Another fix to add a null-terminator to the pthread name.
Browse files Browse the repository at this point in the history
This fix is similar to the one done in https://reviews.llvm.org/D148844.
This miss was caught by the risv64 builder.

Differential Revision: https://reviews.llvm.org/D148871
  • Loading branch information
Siva Chandra Reddy committed Apr 21, 2023
1 parent 7d98590 commit 596d87c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libc/src/__support/threads/linux/thread.cpp
Expand Up @@ -358,7 +358,7 @@ int Thread::get_name(cpp::StringStream &name) const {
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;
}

Expand Down

0 comments on commit 596d87c

Please sign in to comment.