All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Adrian Bunk" <bunk@stusta.de>
To: Andr? Draszik <git@andred.net>
Cc: yocto@lists.yoctoproject.org
Subject: Re: [yocto][meta-gplv2][PATCH 2/2 v2] diffutils: musl has working malloc() and realloc()
Date: Wed, 8 Jan 2020 20:04:27 +0200	[thread overview]
Message-ID: <20200108180427.GA8831@localhost> (raw)
In-Reply-To: <cce968f63ba8eaa3d77bc86b3a55e3b4a8532998.camel@andred.net>

On Wed, Jan 08, 2020 at 04:52:36PM +0000, Andr? Draszik wrote:
> On Wed, 2020-01-08 at 16:18 +0000, Ross Burton wrote:
> > On 08/01/2020 16:15, Andr? Draszik wrote:
> > > +CACHED_CONFIGUREVARS_libc-musl = "\
> > > +    jm_cv_func_working_malloc=yes \
> > > +    jm_cv_func_working_realloc=yes \
> > > +"
> > 
> > Why is this musl-specific?  Does the configure explicitly detect glibc 
> > and know it's good, or should we do this for glibc too?
> 
> That's musl specific, because it's a property of the C-library in use.
> 
> E.g. somebody could be using this with an outdated vendor(?) toolchain
> using an old glibc which could behave incorrectly...
>...

The jm_cv_func_working_malloc test is:
    main ()
    {
      exit (malloc (0) ? 0 : 1);
    }

The C standard says that this is implementation defined,
both results are permitted.

glibc has the same behaviour forever,
musl switched to the glibc behaviour a few years ago.

> Cheers,
> Andre'

cu
Adrian

  reply	other threads:[~2020-01-08 18:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <15E7F1D320E9D777.2841@lists.yoctoproject.org>
2020-01-08 16:15 ` [yocto][meta-gplv2][PATCH 2/2 v2] diffutils: musl has working malloc() and realloc() Andr? Draszik
2020-01-08 16:18   ` Ross Burton
2020-01-08 16:52     ` Andr? Draszik
2020-01-08 18:04       ` Adrian Bunk [this message]
2020-01-08 21:11         ` Andr? Draszik
2020-01-08 21:10     ` Andr? Draszik

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=20200108180427.GA8831@localhost \
    --to=bunk@stusta.de \
    --cc=git@andred.net \
    --cc=yocto@lists.yoctoproject.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.