From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: Musl git 0d......455eee8 and recent compilers
Date: Mon, 6 Jun 2011 12:27:42 +0200 [thread overview]
Message-ID: <20110606102742.GM6142@port70.net> (raw)
In-Reply-To: <EE6BD40A-A13D-4A86-843D-A7EA35801573@palsenberg.com>
* Igmar Palsenberg <musl@palsenberg.com> [2011-06-06 10:48:08 +0200]:
> I was using Musle as a test for..
musl
> 1) The struct dirent in include/dirent.h uses a 1 byte array for d_name. In reality, it's larger : We allocate more space than the struct. Since muscle requires a C99 compiler anyway, what's keeping use from using d_name[0] or d_name[] ? If a C89 compiler includes dirent.h, we're screwed anyway :). That will probably silence GCC 4.5 and clang, and severely reduce the warnings it gives in similar cases.
>
what kind of warnings do you get?
char foo[1] gives warning but a flexible array member char foo[] does not?
> 2) The NULL pointer dereference in src/time/__asctime.c won't work with clang : It removes it. I suggest using either __builtin_trap() or an abort(). If you get to that point, you're in trouble anyway.
>
i guess __builtin_trap is compiler specific
i don't think it's a big deal..
there could be 0/0 as well i guess
i wonder what
main(){ return *(int*)0; }
or even
main(){ return ((int(*)())0)(); }
does on clang..
> 3) Clang does't seem to grasp the weak_alias thingy. It need to check if those parts actually are correct
>
well it uses the alias __attribute__ extension of gcc
> 4) Is there a muscl testsuite somewhere ?
>
musl
http://git.etalabs.net/cgi-bin/gitweb.cgi
next prev parent reply other threads:[~2011-06-06 10:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-06 8:48 Igmar Palsenberg
2011-06-06 10:27 ` Szabolcs Nagy [this message]
2011-06-06 10:47 ` Igmar Palsenberg
2011-06-06 16:47 ` Rich Felker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110606102742.GM6142@port70.net \
--to=nsz@port70.net \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).