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
- Subject: Re: tmpnam() core dumping
- From: Marc Lehmann <pcg at goof dot com>
- Date: Fri, 12 Dec 1997 18:01:02 +0100
- References: <01BD06D5.E1EF50C0@bill.icdata.com>
- Reply-To: egcs at cygnus dot com
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 |
|