Skip to content

OOM when trying to find nonexistent struct member #5587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gopherbot opened this issue May 29, 2013 · 4 comments
Closed

OOM when trying to find nonexistent struct member #5587

gopherbot opened this issue May 29, 2013 · 4 comments

Comments

@gopherbot
Copy link
Contributor

by [email protected]:

The example should be pretty self-explanatory: http://play.golang.org/p/u5_eyPkjNs

Happens on go1.1 installed via gvm on Ubuntu 12.04 as well as on play.golang.org
@remyoudompheng
Copy link
Contributor

Comment 1:

Looks like a duplicate of issue #2556 and issue #5173;

@gopherbot
Copy link
Contributor Author

Comment 2 by [email protected]:

I might be wrong, but for me it looks different:
The other issues are about recursively calling String() (via Printf) from String().
In this issue there is no recursion within the my code as far as I see it.
frobnitz from #go-nuts on freenode came up with a even simpler example:
http://play.golang.org/p/ghjEf5kfAG

@rsc
Copy link
Contributor

rsc commented May 29, 2013

Comment 3:

In the http://play.golang.org/p/**ghjEf5kfAG<http://play.golang.org/p/ghjEf5kfAG>;
example,
the struct member exists (is non-nil): it is set at line 13. The definition
of embedding is that MyDoer automatically gets a method like
func (d *MyDoer) Do() {
   d.Doer.Do()
}
and when you call d.Do, it calls d.Doer.Do, and since d.Doer == d, that
calls d.Do, etc.
Russ

@rsc
Copy link
Contributor

rsc commented May 29, 2013

Comment 4:

Status changed to Duplicate.

Merged into issue #2556.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants