[PATCH v2] linux: Add linux statx(fd, NULL, AT_EMPTY_PATH) support
Miao Wang
shankerwangmiao@gmail.com
Fri Aug 23 17:20:21 GMT 2024
Hi, all
I've received a notification from patchwork stating this patch caused a
regression for the test tst-valgrind-smoke [1].
I'm able to reproduce this in my working environment, using qemu userspace
emulation. The output of valgrind is:
> ==469== Syscall param statx(filename) points to unaddressable byte(s)
> ==469== at 0x11A536: __libc_do_syscall (libc-do-syscall.S:47)
> ==469== by 0x11BAF1: __statx_empty_path (internal-stat.h:47)
> ==469== by 0x11BAF1: fstatat64_time64_statx (fstatat64.c:53)
> ==469== by 0x11BAF1: __fstatat64_time64 (fstatat64.c:154)
> ==469== by 0x10C4EF: _dl_get_file_id (dl-fileid.h:37)
> ==469== by 0x10C4EF: _dl_map_object_from_fd (dl-load.c:955)
> ==469== by 0x10D0E3: _dl_map_object (dl-load.c:2190)
> ==469== by 0x116E39: map_doit (rtld.c:644)
> ==469== by 0x108DDF: _dl_catch_exception (dl-catch.c:241)
> ==469== by 0x108EAB: _dl_catch_error (dl-catch.c:260)
> ==469== by 0x116DE7: do_preload (rtld.c:818)
> ==469== by 0x117ACD: handle_preload_list (rtld.c:894)
> ==469== by 0x119B0B: dl_main (rtld.c:1849)
> ==469== by 0x1167B3: _dl_sysdep_start (dl-sysdep.c:141)
> ==469== by 0x117817: _dl_start_final (rtld.c:494)
> ==469== by 0x117817: _dl_start (rtld.c:581)
> ==469== Address 0x0 is not stack'd, malloc'd or (recently) free'd
> ==469==
It is because valgrind has not been updated to adapt for the newly
introduced statx(fd, NULL, AT_EMPTY_PATH). The related code of valgrind
is at [2].
[1]: https://ci.linaro.org/job/tcwg_glibc_check--master-arm-precommit/2361/artifact/artifacts/artifacts.precommit/notify/mail-body.txt
[2]: https://sourceware.org/git/?p=valgrind.git;a=blob;f=coregrind/m_syswrap/syswrap-linux.c;h=9f3c51c17948378e501f2200be8b141aa13016b6;hb=HEAD#l4211
Cheers,
Miao Wang
More information about the Libc-alpha
mailing list