From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,f44020e1e23d2af6 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-02-17 19:42:10 PST Path: gmd.de!newsserver.jvnc.net!news.edu.tw!news!nctuccca.edu.tw!howland.reston.ans.net!cs.utexas.edu!asuvax!names.maricopa.edu!not-for-mail From: zagar@names.maricopa.edu (Chris Zagar) Newsgroups: comp.unix.osf.osf1 Subject: Re: sprintf problem under OSF/1 on Alpha Date: 17 Feb 1994 20:42:10 -0700 Organization: Maricopa Community Colleges Sender: Chris Zagar Message-ID: <2k1dei$bdd@names.maricopa.edu> References: <2js8kl$mhc@names.maricopa.edu> NNTP-Posting-Host: names.maricopa.edu Well, I have some further information and I'm still hoping it will trigger something in someone's mind. The problem occurs whether I use -taso or not. This simple statement causes the problem: char temp[80]; char temp1[80]; strcpy(temp1, "Testing"); sprintf(temp, "%s", temp1); Now, what is really interesting is that a code fragment like this will work if I compile it by itself. However, if I then link this with the object modules of my application (minus the main section of the application), with no reference out of main to any of the modules, then run the relinked program, I get a segmentation fault on the sprintf statement. >I'm sorry if I'm asking a common problem, but we just got our first >Alpha and it is driving me crazy. I have an existing application that >I am trying to port. I have compiled it with the -taso option, and it >compiles and links without error. However, when I run it, every time >it encounters simple sprintf errors, it dies with a segmentation >fault. Does this sound familiar to anyone? Also, is there any >place that I can find information on what is required to port applications >to OSF/1? --------------------------------------------------------------------------- /\ /\ Chris Zagar Maricopa Community Colleges / \ / \ Asst. Prog. Mgr./Networking 2411 West 14th Street / /\// /\ \ Bitnet: ZAGAR@MARICOPA Tempe, AZ 85281 \/ \/ \/ Internet: zagar@names.maricopa.edu (602) 731-8838