Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jan 2003 11:42:34 -0700
From:      John Reynolds~ <jreynold@sedona.ch.intel.com>
To:        Conrad Sabatier <conrads@cox.net>
Subject:   Re: is our printf(1) behavior correct w.r.t \0 escapes?
Message-ID:  <15926.53018.149389.480465@chlx255.ch.intel.com>
In-Reply-To: <XFMail.20030128124023.conrads@cox.net>
References:  <15926.50047.494451.473350@chlx255.ch.intel.com> <XFMail.20030128124023.conrads@cox.net>

next in thread | previous in thread | raw e-mail | index | archive | help

[ On Tuesday, January 28, Conrad Sabatier wrote: ]
> 
> Works fine under -current:
> 
> $ printf "foo\0bar\0" | od -c
> 0000000    f   o   o  \0   b   a   r  \0
> 
> This also works under -current:
> 
> $ printf "foo\0000" | od -c
> 0000000    f   o   o  \0                                                
> 0000004
> 
> This also works under -current:
> 
> $ printf "foo\0%d" 4 | od -c
> 0000000    f   o   o  \0   4                                            
> 0000005

That's good that all of those work under -current.

> It may very well be that printf (or libc?) has a bug under -stable.  Are you
> using any unusual optimization settings in /etc/make.conf, by the way?  When
> did you last upgrade?

nope, nothing unusual.

 CFLAGS= -O -pipe

The last time I updated and installed world/kernel was Dec 26th of 2002
(4.7-STABLE). 

Maybe if it's not a libc problem but just a printf(1) src problem we could get
an MFC done ...

Thanks for the info. At least we know that -current acts like other OS's.

-Jr

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|John Reynolds       Sr. Component Design Engineer - ICG/EID/Si Engineering |
|Intel Corporation   MS: CH6-302   Phone: 480-554-9092   pgr: 602-868-6512  |
|jreynold@sedona.ch.intel.com  http://www-aec.ch.intel.com/~jreynold/       |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15926.53018.149389.480465>