[all-commits] [llvm/llvm-project] c8e69f: [libc] Fix GPU 'printf' on strings with padding
Joseph Huber via All-commits
all-commits at lists.llvm.org
Sat Jul 20 20:36:41 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c8e69fa4a0bd158fbd63cdb4794dd1232184f155
https://github.com/llvm/llvm-project/commit/c8e69fa4a0bd158fbd63cdb4794dd1232184f155
Author: Joseph Huber <huberjn at outlook.com>
Date: 2024-07-20 (Sat, 20 Jul 2024)
Changed paths:
M libc/utils/gpu/server/rpc_server.cpp
Log Message:
-----------
[libc] Fix GPU 'printf' on strings with padding
Summary:
We get the `strlen` to know how much memory to allocate here, but it
wasn't taking into account if the padding was larger than the string
itself. This patch sets it to an empty string so we always add the
minimum size. This implementation is slightly wasteful with memory, but
I am not concerned with a few extra bytes here and there for some memory
that gets immediately free'd.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list