{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/28805","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/28805/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/28805/comments","events_url":"https://api.github.com/repos/golang/go/issues/28805/events","html_url":"https://github.com/golang/go/issues/28805","id":380949201,"node_id":"MDU6SXNzdWUzODA5NDkyMDE=","number":28805,"title":"runtime: node ordering in mTreap","user":{"login":"jerrinsg","id":883541,"node_id":"MDQ6VXNlcjg4MzU0MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/883541?v=4","gravatar_id":"","url":"https://api.github.com/users/jerrinsg","html_url":"https://github.com/jerrinsg","followers_url":"https://api.github.com/users/jerrinsg/followers","following_url":"https://api.github.com/users/jerrinsg/following{/other_user}","gists_url":"https://api.github.com/users/jerrinsg/gists{/gist_id}","starred_url":"https://api.github.com/users/jerrinsg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerrinsg/subscriptions","organizations_url":"https://api.github.com/users/jerrinsg/orgs","repos_url":"https://api.github.com/users/jerrinsg/repos","events_url":"https://api.github.com/users/jerrinsg/events{/privacy}","received_events_url":"https://api.github.com/users/jerrinsg/received_events","type":"User","site_admin":false},"labels":[{"id":373399998,"node_id":"MDU6TGFiZWwzNzMzOTk5OTg=","url":"https://api.github.com/repos/golang/go/labels/NeedsFix","name":"NeedsFix","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/6","html_url":"https://github.com/golang/go/milestone/6","labels_url":"https://api.github.com/repos/golang/go/milestones/6/labels","id":1055141,"node_id":"MDk6TWlsZXN0b25lMTA1NTE0MQ==","number":6,"title":"Unplanned","description":"No plan to fix in any specific release.\r\n","creator":{"login":"rsc","id":104030,"node_id":"MDQ6VXNlcjEwNDAzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/104030?v=4","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":1810,"closed_issues":1304,"state":"open","created_at":"2015-04-06T20:47:19Z","updated_at":"2018-11-27T17:33:05Z","due_on":"2099-12-31T08:00:00Z","closed_at":null},"comments":14,"created_at":"2018-11-15T00:38:07Z","updated_at":"2018-11-27T21:41:24Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I had a question about how spans are stored in the mTreap datastructure. \r\n\r\n`mgclarge.go` mentions that the treap is sorted by page size, and for spans of the same size, the secondary sort is done based on span start address. But I see that the insert() function in mgclarge.go compares the address of the span datastructure, rather than using the span base address. \r\n```\r\n \telse if uintptr(unsafe.Pointer(t.spanKey)) < uintptr(unsafe.Pointer(span)) {\r\n\t\t// t.npagesKey == npages, so sort on span addresses.\r\n\t\tpt = &t.right\r\n\t} else if uintptr(unsafe.Pointer(t.spanKey)) > uintptr(unsafe.Pointer(span)) {\r\n\t\tpt = &t.left\r\n\t} \r\n```\r\nShouldn't this check be rather \r\n```\r\n\telse if t.spanKey.base() < span.base() {\r\n\t\t// t.npagesKey == npages, so sort on span addresses.\r\n\t\tpt = &t.right\r\n\t} else if t.spanKey.base() > span.base() {\r\n\t\tpt = &t.left\r\n\t} \r\n```"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/442227703","html_url":"https://github.com/golang/go/issues/28805#issuecomment-442227703","issue_url":"https://api.github.com/repos/golang/go/issues/28805","id":442227703,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjIyNzcwMw==","user":{"login":"gopherbot","id":8566911,"node_id":"MDQ6VXNlcjg1NjY5MTE=","avatar_url":"https://avatars1.githubusercontent.com/u/8566911?v=4","gravatar_id":"","url":"https://api.github.com/users/gopherbot","html_url":"https://github.com/gopherbot","followers_url":"https://api.github.com/users/gopherbot/followers","following_url":"https://api.github.com/users/gopherbot/following{/other_user}","gists_url":"https://api.github.com/users/gopherbot/gists{/gist_id}","starred_url":"https://api.github.com/users/gopherbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gopherbot/subscriptions","organizations_url":"https://api.github.com/users/gopherbot/orgs","repos_url":"https://api.github.com/users/gopherbot/repos","events_url":"https://api.github.com/users/gopherbot/events{/privacy}","received_events_url":"https://api.github.com/users/gopherbot/received_events","type":"User","site_admin":false},"created_at":"2018-11-27T21:41:24Z","updated_at":"2018-11-27T21:41:24Z","author_association":"NONE","body":"Change https://golang.org/cl/151499 mentions this issue: `runtime: node ordering in mTreap; adjust code to reflect description.`"}}
{"actor":{"display_login":"gopherbot"}}