public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/10300: [3.2/3.3/3.4 regression] use of array-new (nothrow) in segfaults on NULL return
@ 2003-04-03 14:45 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-04-03 14:45 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jaf, nobody

Old Synopsis: array-new (nothrow) in templated inner class crashes on NULL return
New Synopsis: [3.2/3.3/3.4 regression] use of array-new (nothrow) in segfaults on NULL return

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu Apr  3 14:45:13 2003
State-Changed-Why:
    Behavior confirmed. Here's a slightly trimmed example:
    -----------------------------
    #include <new>
    
    void * operator new[](size_t, std::nothrow_t const &) throw()
    { return NULL; }
    
    struct X {
        struct Inner { ~Inner() {} };
    
        X() {
          Inner * ic = new (std::nothrow) Inner[1]; // SegFault here
        }
    };
    
    int main() {
       X table;
    }
    -----------------------------------
    It segfaults at the indicated line when compiled with
    3.2, 3.3 and mainline, but not with 2.95, so assuming
    the code is doing something legal, this is a regression.
    To be honest, I don't know what the standard assumes what
    happens for this program, so this needs someone more
    familiar with these things.
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10300


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/10300: [3.2/3.3/3.4 regression] use of array-new (nothrow) in segfaults on NULL return
@ 2003-04-12  1:31 mmitchel
  0 siblings, 0 replies; 2+ messages in thread
From: mmitchel @ 2003-04-12  1:31 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jaf, mmitchel, nobody

Synopsis: [3.2/3.3/3.4 regression] use of array-new (nothrow) in segfaults on NULL return

Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-By: mmitchel
Responsible-Changed-When: Sat Apr 12 01:31:32 2003
Responsible-Changed-Why:
    Working on a fix.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10300


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-12  1:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-03 14:45 c++/10300: [3.2/3.3/3.4 regression] use of array-new (nothrow) in segfaults on NULL return bangerth
2003-04-12  1:31 mmitchel

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