This code has the same problems as https://codereview.appspot.com/9910043/ I'll send in a new version for ...
12 years, 1 month ago
(2013-06-06 15:05:36 UTC)
#2
This code has the same problems as https://codereview.appspot.com/9910043/
I'll send in a new version for this issue today.
Proof of concept that causes gc to go into an infinite loop with this patch:
package main
type iface interface {
Foo() *struct{ b bool }
}
type Int int
func (i Int) Foo() *struct{ b bool } {
return &struct{ b bool }{false}
}
func main() {
var t Int
// interface conversion causes nodes to be put on init list
for iface(t).Foo().b {
}
}
On 2013/06/06 15:05:36, DMorsing wrote: > This code has the same problems as https://codereview.appspot.com/9910043/ > ...
12 years, 1 month ago
(2013-06-06 15:16:39 UTC)
#3
On 2013/06/06 15:05:36, DMorsing wrote:
> This code has the same problems as https://codereview.appspot.com/9910043/
>
> I'll send in a new version for this issue today.
>
> Proof of concept that causes gc to go into an infinite loop with this patch:
> package main
>
> type iface interface {
> Foo() *struct{ b bool }
> }
>
> type Int int
>
> func (i Int) Foo() *struct{ b bool } {
> return &struct{ b bool }{false}
> }
>
> func main() {
> var t Int
> // interface conversion causes nodes to be put on init list
> for iface(t).Foo().b {
> }
> }
Thanks!
Then I am waiting for your updated version, and will update this CL the same
way.
On 2013/06/13 10:54:30, dvyukov wrote:
> Hello mailto:golang-dev@googlegroups.com, mailto:daniel.morsing@gmail.com (cc:
> mailto:golang-dev@googlegroups.com),
>
> Please take another look.
Daniel,
I've refactored you code slightly, so that now it's possible to write:
racewalknode(&n->right, &n->right->ninit, wr, 0);
and it will do the right thing.
I've also added your test that should cause infinite loop before.
*** Submitted as https://code.google.com/p/go/source/detail?r=ff86470c2f3c *** cmd/gc: properly race-instrument for loops Instrumentation of ntest expression should ...
Issue 10026046: code review 10026046: cmd/gc: properly race-instrument for loops
(Closed)
Created 12 years, 1 month ago by dvyukov
Modified 12 years ago
Reviewers:
Base URL:
Comments: 0