This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: strcpy core dumps
- To: Eric Lemings <elemings at uswest dot net>
- Subject: Re: strcpy core dumps
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 25 Aug 2000 02:15:01 -0300
- Cc: bug-glibc at gnu dot org, bug-gcc at gnu dot org
- Organization: GCC Team, Red Hat
- References: <39A5FF25.8A9E031A@uswest.net>
On Aug 25, 2000, Eric Lemings <elemings@uswest.net> wrote:
> I'm befuddled. The strcpy function is core dumping
String literals are placed in read-only memory, so you can't overwrite
them with strcpy. With -fwritable-strings, your program would work,
but you'd better not rely on that.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me