Article View: gnu.gcc.help
Article #53421Re: RPC and gcc
From: Daniel I. Rosenblatt
Date: Thu, 23 Jan 1992 17:03
Date: Thu, 23 Jan 1992 17:03
18 lines
1561 bytes
1561 bytes
In article <1992Jan22.233901.29599@mprgate.mpr.ca>, murphy@photon.mpr.ca (Gail Murphy) writes: > We are experiencing segmentation violations when we attempt to use rpc > calls from a program compiled with gcc (1.37.1). This is on a SparcStation. > > I have re-compiled rpclib with gcc, but the segementation violations persist > (generally when a call to gethostbyname) is made. > > The same program runs fine when compiled with the default version of cc > on the SparcStation. > > Has anyone else experienced these problems? Any ideas? Try adding -fwritable-strings to the gcc command line. Gcc puts constant strings into read-only memory and there are some anti-social libc.a routines that try to write to their string parameters (recalling a discussion of scanf writing to its format string). Dan R
Technical Details
Message-ID:
<1992Jan23.170311.3952@cherokee.uswest.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!csn!cherokee!lookout!dirReferences:
<1992Jan22.233901.29599@mprgate.mpr.ca>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,7808c10d03c80e0e X-Google-Attributes: gid11318c,public X-Google-Thread: fc89c,7808c10d03c80e0e X-Google-Attributes: gidfc89c,public X-Google-ArrivalTime: 1992-01-23 10:03:47 PST Newsgroups: gnu.gcc.help,comp.unix.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!csn!cherokee!lookout!dir From: dir@lookout.uswest.com (Daniel I. Rosenblatt) Subject: Re: RPC and gcc Message-ID: <1992Jan23.170311.3952@cherokee.uswest.com> Sender: dir@lookout (Daniel I. Rosenblatt) Nntp-Posting-Host: lookout.uswest.com Organization: US WEST Communications References: <1992Jan22.233901.29599@mprgate.mpr.ca> Date: Thu, 23 Jan 1992 17:03:11 GMT