Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 24 Aug 2014 17:05:39 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: Bug on fstat()?

On Sun, Aug 24, 2014 at 10:51:09PM +0200, piranna@...il.com wrote:
> The values that fstat() is returning are:
> 
> { dev: 2051,
>   mode: 33261,
>   nlink: 1,
>   uid: 1000,
>   gid: 1000,
>   rdev: 0,
>   blksize: 8,
>   ino: 584753551390482400,
>   size: 17592186044477,
>   blocks: 1485010404567043000,
>   atime: Sun Aug 24 2014 22:33:06 GMT+0200 (CEST),
>   mtime: Sun Aug 24 2014 22:33:06 GMT+0200 (CEST),
>   ctime: Thu Jan 01 1970 01:00:00 GMT+0100 (CET),
>   birthtime: Thu Jan 01 1970 01:00:00 GMT+0100 (CET) }
> 
> As you can see, is giving a size of 164GBs for a file of just 68
> characters :-) ino, blocks and blksize have some strange values too,
> but the other fields seems to be normal. As I told you, fstat() give a
> correct output while compiling Node.js with glibc.
> 
> I'm using musl with the musl-gcc wrapper, and since it was giving me
> problems related to some includes not available, I've done some (not
> very clean, I know) symbolic links to them:
> 
>     sudo ln -s /usr/include/linux
> /usr/include/i386-linux-musl/linux
>     sudo ln -s /usr/include/i386-linux-gnu/asm /usr/include/i386-linux-musl/asm
>     sudo ln -s /usr/include/asm-generic
> /usr/include/i386-linux-musl/asm-generic
> 
> Any advice about what could be happening? How could I be able to solve it?

What prefix is musl-gcc installed in? And have you done anything to
modify it or added additional include paths for it? The above symlinks
don't make sense for a typical out-of-the-box installation. I suspect
you've somehow gotten -I/usr/include added to the CFLAGS during build
(either doing it yourself, or as a result of a broken build script) if
adding symlinks to /usr/include made a difference, in which case you
may be using glibc's headers, not musl's, and thus getting broken
results.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.