public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: ben.hutchings@roundpoint.com
To: gcc-gnats@gcc.gnu.org
Subject: libstdc++/4503: __enc_traits destructor crashes if initialisation failed
Date: Mon, 08 Oct 2001 08:56:00 -0000	[thread overview]
Message-ID: <20011008154712.27316.qmail@sourceware.cygnus.com> (raw)

>Number:         4503
>Category:       libstdc++
>Synopsis:       __enc_traits destructor crashes if initialisation failed
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 08 08:56:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     ben.hutchings@roundpoint.com
>Release:        gcc-3.0.1
>Organization:
>Environment:
Solaris 8 on SPARC
>Description:
__enc_traits::~__enc_traits() calls iconv_close() on each of its iconv_t members.  On Solaris, iconv_close crashes if given the error value (iconv_t)(-1), rather than doing nothing (as one might expect). I'm unclear on what public functions utilise__enc_traits. The test programs 22_locale/codecvt_unicode_*.cc use it directly and crash on Solaris (after I apply kluges so that _GLIBCPP_USE_WCHAR_T is defined), so I've written a trivial test case based on that.
>How-To-Repeat:
Compile and run the attached file test.cc
>Fix:
Make each iconv_close call conditional on the descriptor not being equal to (iconv_t)(-1).
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.cc"

I2luY2x1ZGUgPGxvY2FsZT4KaW50IG1haW4oKQp7CiAgICBzdGQ6Ol9fZW5jX3RyYWl0cyB0cmFp
dHMoImZvbyIsImJhciIpOyAvLyBub24tZXhpc3RlbnQgZW5jb2RpbmdzCiAgICB0cmFpdHMuX01f
aW5pdCgpOwp9Cg==


             reply	other threads:[~2001-10-08  8:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-08  8:56 ben.hutchings [this message]
2001-10-25 23:46 bkoz
2001-11-04  3:02 bkoz
2001-11-04  6:56 bkoz

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=20011008154712.27316.qmail@sourceware.cygnus.com \
    --to=ben.hutchings@roundpoint.com \
    --cc=gcc-gnats@gcc.gnu.org \
    /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).