We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fstatat()
It looks like libfaketime does not intercept fstatat().
This can be reproduced with the following example:
#include <fcntl.h> #include <sys/stat.h> #include <stdio.h> int main() { struct stat st; stat("1", &st); printf("%ld\n", st.st_mtime); fstatat(AT_FDCWD, "1", &st, 0); printf("%ld\n", st.st_mtime); return 0; }
$ touch 1 $ FAKETIME='2024-01-01 00:00:00' LD_PRELOAD=/tmp/libfaketime/src/libfaketime.so.1 ./a.out 1704063600 1727378293
Apparently the code is referring to __fxstatat*() but it looks like glibc is using plain fstatat and fstatat64 since 2.33:
__fxstatat*()
fstatat
fstatat64
$ readelf -W -s /usr/lib64/libc.so.6 | grep f.*statat 607: 00000000001043f0 50 FUNC WEAK DEFAULT 13 fstatat@@GLIBC_2.33 725: 00000000001043f0 50 FUNC WEAK DEFAULT 13 fstatat64@@GLIBC_2.33 2588: 00000000001163a0 100 FUNC GLOBAL DEFAULT 13 __fxstatat@@GLIBC_2.4 3033: 00000000001163a0 100 FUNC GLOBAL DEFAULT 13 __fxstatat64@@GLIBC_2.4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It looks like libfaketime does not intercept
fstatat()
.This can be reproduced with the following example:
Apparently the code is referring to
__fxstatat*()
but it looks like glibc is using plainfstatat
andfstatat64
since 2.33:The text was updated successfully, but these errors were encountered: