From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7489 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: setenv if value=NULL, what say standard? Bug? Date: Thu, 23 Apr 2015 15:22:59 +0200 Message-ID: <20150423132259.GS2875@port70.net> References: <553837F1.5080808@safe.ca> <55383E43.8010505@skarnet.org> <55384A61.5020001@safe.ca> <20150423021507.GG6817@brightrain.aerifal.cx> <5538740E.1030306@safe.ca> <20150423101039.GC17573@brightrain.aerifal.cx> <5538EC8A.5080206@safe.ca> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1429795404 9791 80.91.229.3 (23 Apr 2015 13:23:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Apr 2015 13:23:24 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7502-gllmg-musl=m.gmane.org@lists.openwall.com Thu Apr 23 15:23:20 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YlH61-0003zH-D0 for gllmg-musl@m.gmane.org; Thu, 23 Apr 2015 15:23:13 +0200 Original-Received: (qmail 5701 invoked by uid 550); 23 Apr 2015 13:23:12 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5678 invoked from network); 23 Apr 2015 13:23:11 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <5538EC8A.5080206@safe.ca> User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:7489 Archived-At: * Jean-Marc Pigeon [2015-04-23 08:58:50 -0400]: > > > >> so the library (glibc and old libc) used for linux over the years > >> defined an expected behavior to this "UB". > > > > No, that was merely a bug in glibc, not a feature. > > Hmmm... glibc-2.21, setenv.c explicitly check the value NULL > condition, so situation is checked, you could object about > the way program handle it, but it is not a bug (situation > expected and addressed). > you are wrong, glibc actually corrupted then environ on NULL argument and this was fixed recently http://sourceware.org/git/?p=glibc.git;a=commit;h=03c1e456b079929a8290aeb4aadb05c0df73bfd2 stop mixing runtime failure with ub, that leads to nonsense discussions.