This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: tmpnam() core dumping
- To: "'egcs at cygnus dot com'" <egcs at cygnus dot com>
- Subject: RE: tmpnam() core dumping
- From: Bill Ahlbrandt <bahlbr at icdata dot com>
- Date: Sat, 13 Dec 1997 11:53:16 -0600
- Reply-To: egcs at cygnus dot com
Great! I get it now. Thanks for all of the input/help!
-----Original Message-----
From: Marc Lehmann [SMTP:pcg@goof.com]
Sent: Friday, December 12, 1997 11:01 AM
To: egcs@cygnus.com
Subject: Re: tmpnam() core dumping
On Fri, Dec 12, 1997 at 08:13:46AM -0600, Bill Ahlbrandt wrote:
> I am getting a core dump when I use the tmpnam() function.
RTM, you are calling
tmpnam("xxx"),
and tmpnam tries to overwrite the memory you gave to it (which
is a constant string which is in a readonly section), thus
you get a segmentation fault.
-----==- |
----==-- _ |
---==---(_)__ __ ____ __ Marc Lehmann +--
--==---/ / _ \/ // /\ \/ / pcg@goof.com |e|
-=====/_/_//_/\_,_/ /_/\_\ --+
The choice of a GNU generation |
|
application/ms-tnef