Created attachment 116054 [details] Use statx in Coregrind Hello everyone, We are going to implement support for nanoMIPS architecture - patches will be ready soon. nanoMIPS has no support for [f]stat[64] syscalls, there is only statx and support for Linux 4.11+. In order to support nanoMIPS, we need Valgrind (Coregrind) to use statx (as one of candidates) for internal purposes. I'm suggesting this patch for the purpose, but it needs to be tested on all architectures/platforms. It is tested on AMD64/Linux and MIPS{32,64}/Linux. Aleksandar
Is everyone OK with this change?
I can see new failures with the change applied: == 238 tests, 4 stderr failures, 4 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == none/tests/bigcode (stdout) none/tests/bigcode (stderr) none/tests/map_unmap (stdout) none/tests/map_unmap (stderr) none/tests/sigstackgrowth (stdout) none/tests/sigstackgrowth (stderr) none/tests/stackgrowth (stdout) none/tests/stackgrowth (stderr) arch: x86_64 glibc version: 2.27 I am getting these kind of errors: +--18001:0: aspacem segment mismatch: V's seg 1st, kernel's 2nd: +--18001:0: aspacem 1: file 0000108000-0000108fff 4096 r-x-- SmFixed d=0x........ i=178667325 o=0 (1,64) /home/petarj/radni/valgrind/trunk/none/tests/sigstackgrowth +--18001:0: aspacem ...: .... 0000108000-0000108fff 4096 r-x.. ....... d=0x........ i=178667325 o=0 (.) m=. /home/petarj/radni/valgrind/trunk/none/tests/sigstackgrowth +--18001:0: aspacem sync check at m_aspacemgr/aspacemgr-linux.c:2053 (vgPlain_am_get_advisory): FAILED +--18001:0: aspacem +--18001:0: aspacem Valgrind: FATAL: aspacem assertion failed: +--18001:0: aspacem VG_(am_do_sync_check) (__PRETTY_FUNCTION__,__FILE__,__LINE__) +--18001:0: aspacem at m_aspacemgr/aspacemgr-linux.c:2053 (vgPlain_am_get_advisory) +--18001:0: aspacem Exiting now. According to the results on the valgrind-testresults mailing list, it seems these errors are already present on some arches and configurations.
Created attachment 122180 [details] Use statx in Coregrind The patch is re-based and `Device ID` conversion is fixed. There is no more regressions on x86 and MIPS systems which support statx.
This version looks better, thanks. I have just pushed it [1] after some testing, but I will leave the issue open so we can see over the weekend whether there have been regressions on other platforms or not. [1] https://sourceware.org/git/?p=valgrind.git;a=commit;h=c6a6cf929f3e2a9bf5d7f09f334ed4d67f2d6e18
(In reply to Petar Jovanovic from comment #4) > This version looks better, thanks. > I have just pushed it [1] after some testing, but I will leave the issue > open so we can see over the weekend whether there have been regressions on > other platforms or not. > > [1] > https://sourceware.org/git/?p=valgrind.git;a=commit; > h=c6a6cf929f3e2a9bf5d7f09f334ed4d67f2d6e18 Would be good to add the bug nr in NEWS fixed list. Thanks
(In reply to Philippe Waroquiers from comment #5) > (In reply to Petar Jovanovic from comment #4) > > This version looks better, thanks. > > I have just pushed it [1] after some testing, but I will leave the issue > > open so we can see over the weekend whether there have been regressions on > > other platforms or not. > > > > [1] > > https://sourceware.org/git/?p=valgrind.git;a=commit; > > h=c6a6cf929f3e2a9bf5d7f09f334ed4d67f2d6e18 > > Would be good to add the bug nr in NEWS fixed list. > > Thanks Done. I just wanted to see results on the mailing list before add it to the NEWS.
One more followup for linux-arm64: commit d2658f71c3d09034068bc6f7a115f44ce9535ad8 Author: Mark Wielaard <mark@klomp.org> Date: Fri Aug 23 22:17:57 2019 +0200 arm64 fixup for statx support on older kernels Turns out (older) arm64 linux kernels don't have statx, but also not stat64 and no stat syscalls. It uses fstatat instead. The new statx patch also added a check for stat. So That needs a special case for arm64. Follow up for bug #400593.