From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b75,85404311f8041f7a X-Google-Attributes: gid102b75,public X-Google-Thread: 1164f8,5747331edea7cbab X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2001-07-19 04:14:34 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!newspeer.highwayone.net!newsfeed1.telenordia.se!algonet!newsfeed1.funet.fi!newsfeeds.funet.fi!newsfeed.uninet.ee!news.ut.ee!not-for-mail From: Sander Vesik Newsgroups: comp.sys.dec,comp.arch Subject: Re: using memory beyond the "top" of stack Date: Thu, 19 Jul 2001 11:10:11 +0000 (UTC) Message-ID: <995541016.30345@haldjas.folklore.ee> References: <994616870.688233@haldjas.folklore.ee> <9iuka3$rku$1@mach.thp.univie.ac.at> <9j0jts$r2u$1@sword.avalon.net> <1bn163xzf0.fsf@cs.nmsu.edu> <995458767.205555@haldjas.folklore.ee> <9j45pg$7qe$1@sunnews.cern.ch> <995470891.294985@haldjas.folklore.ee> <9j4vtr$k55$1@sunnews.cern.ch> <9j54jc$mh0$1@sunnews.cern.ch> NNTP-Posting-Host: haldjas.folklore.ee X-Trace: kadri.ut.ee 995541011 5164 193.40.6.121 (19 Jul 2001 11:10:11 GMT) X-Complaints-To: usenet@kadri.ut.ee NNTP-Posting-Date: Thu, 19 Jul 2001 11:10:11 +0000 (UTC) User-Agent: tin/pre-1.4-19990413 ("Endemoniada") (UNIX) (FreeBSD/4.3-RELEASE (i386)) Cache-Post-Path: haldjas.folklore.ee!unknown@localhost X-Cache: nntpcache 2.3.2 (see http://www.nntpcache.org/) Xref: archiver1.google.com comp.sys.dec:6005 comp.arch:14310 In comp.arch Dan Pop wrote: > In Michael Ash writes: >>In article <9j4vtr$k55$1@sunnews.cern.ch>, Dan.Pop@cern.ch (Dan Pop) >>wrote: >> >>>Also, please show us a single instance where Linux treats a null pointer >>>as an empty string, which is exactly what you've claimed above. >> >>Two printfs, only one (null) in the output, so I'd say you have an >>instance where it's treated as an empty string right there! > Right. I've somehow managed to completely ignore the printf(NULL) call. > Note, however, that calling printf with a null pointer as the format > string is HIGHLY unlikely to occur in real life code, where the vast > majority of such strings are either hardcoded or obtained from arrays > of strings. Heh. The problem only really arises when you are porting that program relying on NULL pointer arguments to printf in place of pointers to empty strings to something that uses a different libc. In which case it is a *REAL* pain. > Dan > -- > Dan Pop > CERN, IT Division > Email: Dan.Pop@cern.ch > Mail: CERN - IT, Bat. 31 1-014, CH-1211 Geneve 23, Switzerland -- Sander FLW: "I can banish that demon"