Subject: Re: port-xen/29887: sysctl kern.consdev coredumps
To: Greywolf <>
From: Jason Thorpe <>
List: netbsd-bugs
Date: 06/17/2005 15:28:57
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