{"action":"closed","issue":{"url":"https://api.github.com/repos/couchbaselabs/fleece/issues/36","repository_url":"https://api.github.com/repos/couchbaselabs/fleece","labels_url":"https://api.github.com/repos/couchbaselabs/fleece/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/couchbaselabs/fleece/issues/36/comments","events_url":"https://api.github.com/repos/couchbaselabs/fleece/issues/36/events","html_url":"https://github.com/couchbaselabs/fleece/issues/36","id":367893166,"node_id":"MDU6SXNzdWUzNjc4OTMxNjY=","number":36,"title":"MutableDict vs. SharedKeys","user":{"login":"snej","id":43241,"node_id":"MDQ6VXNlcjQzMjQx","avatar_url":"https://avatars2.githubusercontent.com/u/43241?v=4","gravatar_id":"","url":"https://api.github.com/users/snej","html_url":"https://github.com/snej","followers_url":"https://api.github.com/users/snej/followers","following_url":"https://api.github.com/users/snej/following{/other_user}","gists_url":"https://api.github.com/users/snej/gists{/gist_id}","starred_url":"https://api.github.com/users/snej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snej/subscriptions","organizations_url":"https://api.github.com/users/snej/orgs","repos_url":"https://api.github.com/users/snej/repos","events_url":"https://api.github.com/users/snej/events{/privacy}","received_events_url":"https://api.github.com/users/snej/received_events","type":"User","site_admin":false},"labels":[{"id":288082520,"node_id":"MDU6TGFiZWwyODgwODI1MjA=","url":"https://api.github.com/repos/couchbaselabs/fleece/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-08T17:53:56Z","updated_at":"2018-12-17T19:25:29Z","closed_at":"2018-12-17T19:25:29Z","author_association":"MEMBER","body":"Mutable collections don't play well with SharedKeys:\r\n\r\n- [ ] `Dict::get(int)` and `Dict::get(key&)` don't check whether the instance is mutable, so they look through the (nonexistent) Dict data and get garbage, likely causing a crash.\r\n- [ ] `HeapDict::iterator` assumes that its key map and the source Dict's iterator are both sorted the same way. However, with SharedKeys this isn't true: in the source Dict, integer keys come before non-integers and are sorted by int value not string value. This confuses the iterator and it'll return the wrong data.\r\n\r\nThe fix is probably to make HeapDict support integer keys when its source has SharedKeys."}}
{"actor":{"display_login":"snej"}}