From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2573 Path: news.gmane.org!not-for-mail From: Vasily Kulikov Newsgroups: gmane.linux.lib.musl.general Subject: musl as a framework to test applications' compatibility with POSIX (was: NULL) Date: Mon, 14 Jan 2013 12:45:27 +0400 Message-ID: <20130114084527.GA4055@cachalot> References: <20130113174731.GS4468@port70.net> <1358106388.32505.17@driftwood> <20130114061135.GM20323@brightrain.aerifal.cx> 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 1358153143 24658 80.91.229.3 (14 Jan 2013 08:45:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Jan 2013 08:45:43 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2574-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jan 14 09:46:01 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Tufg8-000575-7R for gllmg-musl@plane.gmane.org; Mon, 14 Jan 2013 09:46:00 +0100 Original-Received: (qmail 30242 invoked by uid 550); 14 Jan 2013 08:45:42 -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 30234 invoked from network); 14 Jan 2013 08:45:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=oWNp+K8PFMVbrwlbwCmgFXJcDObESS99syGnNeP9Zco=; b=fAXBSR25DI/7qOpZOq1qQ/sjZsL9sOpiYHqjSqjasfR1Hh2vNBW1p4uzeuDbNWCPEq PsQTyClOb2YmzHXYc5ZwsxKD9EKS3cD3cuY+WJPY/nzcG571Qb8hpK2Lg4U2QtQb1bVn usFyc/JyqHxtkGXzx80D8yKWXrbRf5PkoCfYEsSA07z5EIuIs5ALv6HyJV+GkdiYP66V fe290cv1doN2eYbnS9WuG+AzPlQCiG0l2nirFUCRbFsIrVVmVLIbtrHN9lYWo7TlkteI fWhLaIhOCXB4j5FKdBhAcSckeUrMsuCu9XY2WDfvoH3ENQBWQVfUpJyneRinvEjeEKGe KypQ== X-Received: by 10.152.124.15 with SMTP id me15mr81895324lab.5.1358153130884; Mon, 14 Jan 2013 00:45:30 -0800 (PST) Original-Sender: Vasiliy Kulikov Content-Disposition: inline In-Reply-To: <20130114061135.GM20323@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2573 Archived-At: Hi, On Mon, Jan 14, 2013 at 01:11 -0500, Rich Felker wrote: > In any case, this thread has gotten WAY off-topic, going all over the > place into territory about the merits and demerits of different > languages and anti-FSF politics. Those topics may be worth discussing > in some contexts, but it seems to have left everybody really confused > about the issues at hand, which are: > > - whether we should work around broken programs that pass NULL to > variadic functions > > - and if so, how > > The emerging consensus seems to be using > > #define NULL 0L > > unconditionally in both C and C++ mode. If such slick and unobvious places of C/POSIX/C++/gcc/etc. applications are explicitly detected and handled, then probably it worth implementing some checker in libc/toolchain which is detected (probably at runtime) and warning is emitted at runtime/compile-time? gcc'isms, UBs, etc. In musl libc it can be implemented as -DI_WANT_TO_DETECT_GCCISMS. Thanks, -- Vasily Kulikov http://www.openwall.com - bringing security into open computing environments