mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Solar Designer <solar@openwall.com>
To: musl@lists.openwall.com
Subject: Re: Weekly reports - B
Date: Mon, 13 Jun 2011 06:11:30 +0400	[thread overview]
Message-ID: <20110613021130.GA21268@openwall.com> (raw)
In-Reply-To: <4DF12B1D.7050106@gmail.com>

Luka, Rich -

On Thu, Jun 09, 2011 at 10:20:45PM +0200, Luka Mar??eti?? wrote:
> Anyway, here's something... *hangs head*
> https://github.com/paxcoder/cluts

Thanks for posting this.  I took a look.  This is good for the start,
but we obviously need a lot more. ;-)

Sorry to remind you, but we need Luka's code placed under an Open Source
license - and not only when cluts is "finished".  Each week's update
must be properly licensed.  Can one or both of you please propose a
license you're comfortable with?

Some assorted comments on the code, in arbitrary order:

For jumping out of a signal handler, you need to use sigjmp_buf,
sigsetjmp(), and siglongjmp().  Even so, some failed libc functions
might leave stdio (or something else) in an inconsistent state.  This is
probably irrelevant to simple string functions testing, but it will be
relevant to some other tests.  Thus, since we don't expect SIGSEGVs to
be frequent, maybe it'd be better to switch to forking child processes
(which must print something specific to fd 1 to indicate success)?
Or we can use both approaches - in different cases, as appropriate.

When you declare identifiers at the global scope in a file, but don't
need them exported to other source files, please make them "static" to
prevent inadvertent use from another source file.

What do you mean by "#define _XOPEN_SOURCE 9001"?  I think the highest
value currently defined is 700, and going too high may actually prevent
this from working (e.g., on Solaris).

Please avoid assignments to errno.  Use your own variable instead.

Overall, I think the code could be made prettier.  I'll post an idea
(which you don't have to use, but you may) in another message.

Luka - when I say that something could be written better, etc., please
don't be discouraged.  On the contrary, this indicates that you're doing
something interesting, comment-worthy. :-)  I am merely trying to
provide constructive criticism and help the project in this way.

Thanks again,

Alexander


  parent reply	other threads:[~2011-06-13  2:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09 20:20 Luka Marčetić
2011-06-12 23:13 ` Rich Felker
2011-06-13  2:11 ` Solar Designer [this message]
2011-06-13  2:22   ` Rich Felker
2011-06-13  2:56     ` Solar Designer
2011-06-13  4:54       ` Rich Felker
2011-06-13  6:48         ` Solar Designer
2011-07-06 11:35         ` errno (was: Weekly reports - B) Solar Designer
2011-07-06 12:57           ` Szabolcs Nagy
2011-07-06 13:14             ` errno Solar Designer
2011-07-07  2:56           ` errno (was: Weekly reports - B) Rich Felker
2011-06-26 21:05     ` Weekly reports - X Luka Marčetić
2011-06-26 21:13       ` rich felker
2011-06-27 22:18         ` Solar Designer
2011-07-04 19:30           ` Luka Marčetić
2011-07-04 19:39             ` Rich Felker
2011-06-13  2:22   ` specification of cluts tests - code or/and data? (was: Weekly reports - B) Solar Designer
2011-06-13  9:19     ` specification of cluts tests - code or/and data? Solar Designer
2011-07-09  6:41 ` cluts repository (was: Weekly reports - B) Solar Designer
2011-07-09 11:31   ` cluts repository Solar Designer

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=20110613021130.GA21268@openwall.com \
    --to=solar@openwall.com \
    --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).