[all-commits] [llvm/llvm-project] 415185: [libc] Fix gmtime test on systems with sizeof(time...
Mikhail R. Gadelha via All-commits
all-commits at lists.llvm.org
Thu Sep 7 06:29:02 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 41518597705c558409725d4ba2d3c1af9110ca0d
https://github.com/llvm/llvm-project/commit/41518597705c558409725d4ba2d3c1af9110ca0d
Author: Mikhail R. Gadelha <mikhail at igalia.com>
Date: 2023-09-07 (Thu, 07 Sep 2023)
Changed paths:
M libc/test/src/time/gmtime_test.cpp
Log Message:
-----------
[libc] Fix gmtime test on systems with sizeof(time_t) == 4 (#65388)
This test creates a time_t variable and assigns 0xfffffffffe1d7b01 which
overflows the maximum time_t value for 64-bit time_t, then checks if the
syscall fails and errno was set.
In systems with sizeof(time_t) == 4, the value is narrowed down to
0xfe1d7b01 and doesn't overflow, causing the test to fail.
This patch then disables the test on systems with 32 bits long time_t.
More information about the All-commits
mailing list