public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bill Ahlbrandt <bahlbr@icdata.com>
To: "'egcs@cygnus.com'" <egcs@cygnus.com>
Subject: RE: tmpnam() core dumping
Date: Sat, 13 Dec 1997 09:55:00 -0000	[thread overview]
Message-ID: <01BD07BD.B6016500@bill.icdata.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 968 bytes --]

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                        |
                                                          |

[-- Attachment #2: bin00000.bin --]
[-- Type: application/vnd.ms-tnef, Size: 2273 bytes --]

             reply	other threads:[~1997-12-13  9:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-13  9:55 Bill Ahlbrandt [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-12-15  8:20 Bill Ahlbrandt
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-12  6:18 Bill Ahlbrandt
1997-12-12  8:02 ` Jeffrey A Law
1997-12-12 14:32 ` Marc Lehmann

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=01BD07BD.B6016500@bill.icdata.com \
    --to=bahlbr@icdata.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).