mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] genimage segfaults with glibc 2.22
Date: Tue, 25 Aug 2015 14:42:52 +0200	[thread overview]
Message-ID: <20150825124250.GB20806@omega> (raw)
In-Reply-To: <20150825120915.GA25030@omega>

On Tue, Aug 25, 2015 at 02:09:15PM +0200, Alexander Aring wrote:
> On Tue, Aug 25, 2015 at 01:41:42PM +0200, Koch, Alexander wrote:
> > Hi,
> > 
> > I stumbled upon this as well, when upgrading glibc under Arch.
> > 
> > So to clarify, do we just need to wait until the patch mentioned by Alex in [0]
> > gets included in an updated glibc package, or is there a proper way to make
> > PTXdist (or better `genimage`) work again under Arch?
> > 
> > 
> 
> No, glibc will always segfault if setenv (..., NULL, ...) since glibc
> 2.22. So far I understand this is because setenv (..., NULL, ...) is
> not defined [0].
> 
> Before glibc 2.22 they handled like VAR="", but this differs when you
> not using glibc. Like uclibc will do a complete different handling
> then (don't know the handling on uclibc, but it's a undef behaviour in
> all libc implementations).
> 
> They also don't decide to return an errno value, because it's not
> defined at [0], so they introduced a core dump.
> 
> This need to be fixed in genimage, I recently send a patch for adding a
> workaround for that [1]. Simple don't call setenv when value is NULL.
> 
> 
> _IMPORTANT NOTE_
> 
> Don't calling setenv != setenv(..., "", ...), I think this differs, the
> different is getenv will return NULL, if name isn't found and if ""
> then getenv return "".
> 

I currently see issues with the workaround solution [1]. Please adapt
the changes which I suggest inside the reply.

- Alex

[1] http://article.gmane.org/gmane.comp.embedded.ptxdist.devel/13240

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2015-08-25 12:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25 11:41 Koch, Alexander
2015-08-25 12:09 ` Alexander Aring
2015-08-25 12:42   ` Alexander Aring [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-08-22 18:43 Alexander Aring
2015-08-23 16:46 ` Clemens Gruber

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=20150825124250.GB20806@omega \
    --to=alex.aring@gmail.com \
    --cc=ptxdist@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox