[all-commits] [llvm/llvm-project] 63a966: [libc] Fix readlink tests on 32-bit systems (#98168)
Mikhail R. Gadelha via All-commits
all-commits at lists.llvm.org
Tue Jul 9 13:18:52 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 63a9662f6cc41658f36ccddfb565d3dc5ad0135f
https://github.com/llvm/llvm-project/commit/63a9662f6cc41658f36ccddfb565d3dc5ad0135f
Author: Mikhail R. Gadelha <mikhail at igalia.com>
Date: 2024-07-09 (Tue, 09 Jul 2024)
Changed paths:
M libc/test/src/unistd/CMakeLists.txt
M libc/test/src/unistd/readlink_test.cpp
M libc/test/src/unistd/readlinkat_test.cpp
Log Message:
-----------
[libc] Fix readlink tests on 32-bit systems (#98168)
This patch removes the call sizeof(<Cstring>) and makes buf a
fixed-length array.
The test case worked in 64-bit systems because the sizeof(CString) was
big enough (19 bytes) to hold the contents of FILENAME, but in 32-bit
systems sizeof(CString) is only 12 bytes long, causing a truncation of
FILENAME when placing it in buf.
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