From: Ulrich Weigand <weigand@informatik.uni-erlangen.de>
Subject: Re: segfault and gcc-2.96
Date: 5 Nov 2002 00:35:02 GMT [thread overview]
Message-ID: <aq73nm$fbu$1@rznews2.rrze.uni-erlangen.de> (raw)
In-Reply-To: 3DC70390.3C7CDB89@lmco.nospam.com
JMK <jeffrey.m.klopotic@lmco.nospam.com> writes:
>// Global
>char *f1 = "default.str";
> strcpy (f1, pfix); <-------- Program received signal SIGSEGV,
You are trying to overwrite a string constant, which may
reside in read-only memory. Thus the crash.
You should fix your application to avoid doing that.
As a workaround, you could also use the -fwritable-strings
flag that tell gcc to allow writing to string "constants".
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de
next prev parent reply other threads:[~2002-11-05 0:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <apqobk$ocj$1@news.tudelft.nl>
[not found] ` <3DC324DA.4C495AEC@lmco.nospam.com>
[not found] ` <EzMw9.1438$hf.102567@castor.casema.net>
2002-11-04 23:32 ` segfault and gcc-2.96 JMK
2002-11-05 0:35 ` Ulrich Weigand [this message]
2002-11-05 0:35 ` Falk Hueffner
2002-11-05 7:31 ` Mark Swaanenburg
2002-11-06 4:40 ` Kevin Easton
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox