public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Marc Lehmann <pcg@goof.com>
To: egcs@cygnus.com
Subject: Re: tmpnam() core dumping
Date: Fri, 12 Dec 1997 14:32:00 -0000	[thread overview]
Message-ID: <19971212180102.21700@cerebro.laendle> (raw)
In-Reply-To: <01BD06D5.E1EF50C0@bill.icdata.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                        |
                                                          |

  parent reply	other threads:[~1997-12-12 14:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-12  6:18 Bill Ahlbrandt
1997-12-12  8:02 ` Jeffrey A Law
1997-12-12 14:32 ` Marc Lehmann [this message]
1997-12-12 10:18 Bill Ahlbrandt
1997-12-12 13:04 ` Per Bothner
1997-12-12 15:46 ` Tim Hollebeek
1997-12-15  2:51 ` Andreas Schwab
1997-12-13  9:55 Bill Ahlbrandt
1997-12-15  8:20 Bill Ahlbrandt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19971212180102.21700@cerebro.laendle \
    --to=pcg@goof.com \
    --cc=egcs@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).