diff mbox

[sh] : glibc file offset problems since 2.24

Message ID c2564977-0bce-67e1-42e3-f573d46fe466@physik.fu-berlin.de (mailing list archive)
State New, archived
Headers show

Commit Message

John Paul Adrian Glaubitz Oct. 21, 2016, 7:30 p.m. UTC
On 10/21/2016 08:36 PM, Rich Felker wrote:
> glibc commit 071af4769fcdfe2cd349157b01f27c9571478ace looks like a
> likely culprit. It was between 2.23 and 2.24 and is related to this
> musl commit which may be easier to understand:

Indeed that looks very suspicious, thanks for pointing this out.

James Clarke (CC'ed) has suggested the attached patch on IRC which I'm testing
right now.

Adrian
diff mbox

Patch

diff --git a/sysdeps/unix/sysv/linux/sh/pread.c b/sysdeps/unix/sysv/linux/sh/pread.c
index d3f99f3..be8efb1 100644
--- a/sysdeps/unix/sysv/linux/sh/pread.c
+++ b/sysdeps/unix/sysv/linux/sh/pread.c
@@ -19,5 +19,5 @@ 
 /* SH4 ABI does not really require argument alignment for 64-bits, but
    the kernel interface for pread adds a dummy long argument before the
    offset.  */
-#define __ALIGNMENT_ARG
+#define __ALIGNMENT_ARG 0,
 #include <sysdeps/unix/sysv/linux/pread.c>
diff --git a/sysdeps/unix/sysv/linux/sh/pread64.c b/sysdeps/unix/sysv/linux/sh/pread64.c
index b2e8a25..5d1eaac 100644
--- a/sysdeps/unix/sysv/linux/sh/pread64.c
+++ b/sysdeps/unix/sysv/linux/sh/pread64.c
@@ -19,5 +19,5 @@ 
 /* SH4 ABI does not really require argument alignment for 64-bits, but
    the kernel interface for pread adds a dummy long argument before the
    offset.  */
-#define __ALIGNMENT_ARG
+#define __ALIGNMENT_ARG 0,
 #include <sysdeps/unix/sysv/linux/pread64.c>
diff --git a/sysdeps/unix/sysv/linux/sh/pwrite.c b/sysdeps/unix/sysv/linux/sh/pwrite.c
index 391ed5e..329c64f 100644
--- a/sysdeps/unix/sysv/linux/sh/pwrite.c
+++ b/sysdeps/unix/sysv/linux/sh/pwrite.c
@@ -19,5 +19,5 @@ 
 /* SH4 ABI does not really require argument alignment for 64-bits, but
    the kernel interface for pwrite adds a dummy long argument before the
    offset.  */
-#define __ALIGNMENT_ARG
+#define __ALIGNMENT_ARG 0,
 #include <sysdeps/unix/sysv/linux/pwrite.c>
diff --git a/sysdeps/unix/sysv/linux/sh/pwrite64.c b/sysdeps/unix/sysv/linux/sh/pwrite64.c
index 683a5d9..d510780 100644
--- a/sysdeps/unix/sysv/linux/sh/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/sh/pwrite64.c
@@ -17,7 +17,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 /* SH4 ABI does not really require argument alignment for 64-bits, but
-   the kernel interface for pread adds a dummy long argument before the
+   the kernel interface for pwrite adds a dummy long argument before the
    offset.  */
-#define __ALIGNMENT_ARG
+#define __ALIGNMENT_ARG 0,
 #include <sysdeps/unix/sysv/linux/pwrite64.c>