Subject: Re: port-xen/29887: sysctl kern.consdev coredumps
To: None <port-xen-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: Jason Thorpe <thorpej@shagadelic.org>
List: netbsd-bugs
Date: 06/17/2005 22:30:02
The following reply was made to PR port-xen/29887; it has been noted by GNATS.

From: Jason Thorpe <thorpej@shagadelic.org>
To: Greywolf <greywolf@starwolf.com>
Cc: James Chacon <jmc@NetBSD.org>,
	YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>, christos@zoulas.com,
	gnats-bugs@NetBSD.org, port-xen-maintainer@NetBSD.org,
	gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org,
	tech-userlevel@NetBSD.org
Subject: Re: port-xen/29887: sysctl kern.consdev coredumps
Date: Fri, 17 Jun 2005 15:28:57 -0700

 On Jun 17, 2005, at 12:49 PM, Greywolf wrote:
 
 > [Thus spake James Chacon ("JC: ") 1:20pm...]
 >
 > JC: The bug you cite doesn't discuss that. It's simply noting that
 > JC: printf("%s", NULL) is undefined behavior so basically they're  
 > allowed
 > JC: to core dump there even on translations to puts().
 >
 > This is confusing:  Why does printf("%s", NULL) attempt to translate
 > into puts() (or am I misreading something here)?
 
 It is a valid optimization that the compiler is making -- puts() is  
 faster than printf() because it does not do format expansion.
 
 -- thorpej