This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/4] Consolidate pread/pread64 implementations
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org, Adhemerval Zanella <adhemerval dot zanella at linaro dot com>
- Date: Thu, 14 Apr 2016 16:38:31 -0300
- Subject: Re: [PATCH 3/4] Consolidate pread/pread64 implementations
- Authentication-results: sourceware.org; auth=none
- References: <1456431555-14182-1-git-send-email-adhemerval dot zanella at linaro dot org> <1456431555-14182-4-git-send-email-adhemerval dot zanella at linaro dot org> <570FE76E dot 4010503 at redhat dot com>
On 14-04-2016 15:54, Florian Weimer wrote:
> On 02/25/2016 09:19 PM, Adhemerval Zanella wrote:
>> From: Adhemerval Zanella<adhemerval.zanella@linaro.com>
>>
>> This patch consolidates all the pread/pread64 implementation for Linux
>> in only one (sysdeps/unix/sysv/linux/pread.c). It also removes the
>> syscall from the auto-generation using assembly macros.
>
> This may have broken pread and pread64 on 32-bit arm. I'm trying to get more details.
>
> FAIL: debug/tst-chk1
> FAIL: debug/tst-chk2
> FAIL: debug/tst-chk3
> FAIL: debug/tst-chk4
> FAIL: debug/tst-chk5
> FAIL: debug/tst-chk6
> FAIL: debug/tst-lfschk1
> FAIL: debug/tst-lfschk2
> FAIL: debug/tst-lfschk3
> FAIL: debug/tst-lfschk4
> FAIL: debug/tst-lfschk5
> FAIL: debug/tst-lfschk6
> FAIL: posix/tst-preadwrite
> FAIL: posix/tst-preadwrite64
>
> The debug/* failures have:
>
> Failure on line 1006
> Failure on line 1009
> Failure on line 1013
> Failure on line 1032
> Failure on line 1035
> Failure on line 1039
>
> Also corresponding to pread, pread64.
>
> Florian
It is because sysdeps/unix/sysv/linux/sysdep.h now requires if
__ASSUME_ALIGNED_REGISTER_PAIRS is defined or not to correctly
set __ALIGNMENT_ARG and __ALIGNMENT_COUNT.
Previously arm pread64 set a 0 after the count argument, which
is not set by __ALIGNMENT_ARG. The following patch fixes it:
---
diff --git a/sysdeps/unix/sysv/linux/sysdep.h b/sysdeps/unix/sysv/linux/sysdep.h
index 4ac4c00..f2d7e05 100644
--- a/sysdeps/unix/sysv/linux/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sysdep.h
@@ -16,6 +16,7 @@
<http://www.gnu.org/licenses/>. */
#include <bits/wordsize.h>
+#include <kernel-features.h>
/* Set error number and return -1. A target may choose to return the
internal function, __syscall_error, which sets errno and returns -1.
---
This was an overlook from my part: the __ALIGNMENT_{ARG,COUNT} definition
was moved from another header to this one in a patch iteration and I did
not care to actually remake the tests on arm to check if everthing was ok.
I will push it soon.