public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/60728] New: recover() should not work in recursive deferred fucntions
@ 2014-04-01 12:19 vogt at linux dot vnet.ibm.com
  2014-04-01 12:20 ` [Bug go/60728] " vogt at linux dot vnet.ibm.com
  2015-02-03 20:01 ` ian at airs dot com
  0 siblings, 2 replies; 3+ messages in thread
From: vogt at linux dot vnet.ibm.com @ 2014-04-01 12:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60728

            Bug ID: 60728
           Summary: recover() should not work in recursive deferred
                    fucntions
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: vogt at linux dot vnet.ibm.com

>From an email discussion between me and with Ian Lance Taylor about the
function statements.cc:build_thunk():

Ian Lance Taylor wrote:
> On Fri, Mar 28, 2014 at 3:37 AM, Dominik Vogt <vogt@linux.vnet.ibm.com> wrote:
> > (First note that I think there's a bug in the current code with
> > recursive calls of functions with recover.  Consider this:
> >
> >   func f() {
> >     defer g(0);
> >     ...
> >   }
> >
> >   func g(n int) {
> >     if n == 0 {
> >       g(1)
> >     } else {
> >       recover()
> >     }
> >   }
> >
> > With the current logic the recursive call of g() would recover
> > (__go_gan_recover returns true), but it shouldn't because it's not
> > called directly.  The following sketch takes care of that
> > situation.)
>
> Good point.


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

* [Bug go/60728] recover() should not work in recursive deferred fucntions
  2014-04-01 12:19 [Bug go/60728] New: recover() should not work in recursive deferred fucntions vogt at linux dot vnet.ibm.com
@ 2014-04-01 12:20 ` vogt at linux dot vnet.ibm.com
  2015-02-03 20:01 ` ian at airs dot com
  1 sibling, 0 replies; 3+ messages in thread
From: vogt at linux dot vnet.ibm.com @ 2014-04-01 12:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60728

Dominik Vogt <vogt at linux dot vnet.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |http://gcc.gnu.org/bugzilla
                   |                            |/show_bug.cgi?id=60406

--- Comment #1 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
A fix for bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60406 should also
take care of this one.


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

* [Bug go/60728] recover() should not work in recursive deferred fucntions
  2014-04-01 12:19 [Bug go/60728] New: recover() should not work in recursive deferred fucntions vogt at linux dot vnet.ibm.com
  2014-04-01 12:20 ` [Bug go/60728] " vogt at linux dot vnet.ibm.com
@ 2015-02-03 20:01 ` ian at airs dot com
  1 sibling, 0 replies; 3+ messages in thread
From: ian at airs dot com @ 2015-02-03 20:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60728

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Ian Lance Taylor <ian at airs dot com> ---
Fixed by https://codereview.appspot.com/153950043 .


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

end of thread, other threads:[~2015-02-03 20:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-01 12:19 [Bug go/60728] New: recover() should not work in recursive deferred fucntions vogt at linux dot vnet.ibm.com
2014-04-01 12:20 ` [Bug go/60728] " vogt at linux dot vnet.ibm.com
2015-02-03 20:01 ` ian at airs dot com

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