GNU bug report logs - #43513
readdir misbehaves when running 32-bit user space on a 64-bit-kernel - kernel/userspace interface mismatch in getdents64

Previous Next

Package: guix;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Sat, 19 Sep 2020 15:38:01 UTC

Severity: critical

Merged with 42448

Full log


Message #50 received at 43513 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 43513 <at> debbugs.gnu.org
Subject: Re: bug#43513: json-c build failure (on armhf-linux) while trying
 to build u-boot
Date: Sat, 26 Sep 2020 12:53:20 +0200
[Message part 1 (text/plain, inline)]
Hi Ludo,

On Fri, 25 Sep 2020 18:25:42 +0200
Danny Milosavljevic <dannym <at> scratchpost.org> wrote:

> On Fri, 25 Sep 2020 18:00:05 +0200
> Ludovic Courtès <ludo <at> gnu.org> wrote:
> 
> > You’re listed in overdrive.scm in maintenance.git, so you must have
> > access to overdrive1.guixsd.org:52522.  
> 
> Indeed, I do.
> 
> Thanks!

I'd like to test what happens if one builds json-c on an aarch64 host
for i686.

Could we enable qemu-binfmt for i686 on an aarch64 host for me to test it?

One machine is enough--I'd just run

  guix environment -s i686-linux gcc-toolchain -- gcc -o a00 -D_FILE_OFFSET_BITS=xxx a00.c

and then later

  guix build -s i686-linux json-c

on it.

a00.c:

#include <stdio.h>
#include <errno.h>
#include <assert.h>
#include <dirent.h>
#if defined( __ILP32__ )
#warning ILP32
#endif

int main() {
        DIR* d;
        struct dirent* ent;
        d = opendir("tmp");
        errno = 0;
        assert(sizeof(ent->d_off) == sizeof(off_t));
        while ((ent = readdir(d)) != NULL) {
                printf("off=%llX, ino=%llX\n", (unsigned long long) ent->d_off, (unsigned long long) ent->d_ino);
        }
        if (errno)
                perror("readdir");
        return sizeof(off_t);
}
[Message part 2 (application/pgp-signature, inline)]

This bug report was last modified 4 years and 316 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.