From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,c861082fad38cbf4 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-08-17 01:56:29 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!news.compaq.com!news.cpqcorp.net!not-for-mail Message-ID: <3B7CDC3C.74ACCA96@digital.com> From: Venkatesh Prasad X-Mailer: Mozilla 4.75 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.unix.tru64 Subject: Re: vsprintf problems. References: <3B7BCE16.BFF56779@digital.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 17 Aug 2001 10:56:28 +0200 NNTP-Posting-Host: 16.188.156.25 X-Complaints-To: abuse@Compaq.com X-Trace: news.cpqcorp.net 998038589 16.188.156.25 (Fri, 17 Aug 2001 01:56:29 PDT) NNTP-Posting-Date: Fri, 17 Aug 2001 01:56:29 PDT Organization: Compaq Computer Corporation Xref: archiver1.google.com comp.unix.tru64:4231 Hi all, I got the information I was looking for and deemed it appropriate to share it with the group. There is a problem with sprintf , printf, vsprintf etc. when you use RWCString or SString. For example if you do: RWCString s("Hello World"); char buf[32]; sprintf(buf,"%s",s); You get a Seg Fault! You should therefore use: sprintf(buf,"%s",(const char *)s); With warm regards, -Venkatesh Prasad R. Venkatesh Prasad wrote: > Hi all, > I am using the latest cxx (version V6.3-012) on tru 64 unix OSF1 V5.1 > 732 alpha. > > When I do a vsprintf as follows: > > vsprintf(msg_buf,format,va_args); > > I get a core dump. The core trac points to the vsprintf statement. > > This did not use to happen in the previous release of the cxx compiler. > > Thanks in advance for your help. > > With warm regards, > -Venkatesh Prasad R.