{"action":"created","issue":{"url":"https://api.github.com/repos/pavel-pimenov/flylinkdc-r5xx/issues/1283","labels_url":"https://api.github.com/repos/pavel-pimenov/flylinkdc-r5xx/issues/1283/labels{/name}","comments_url":"https://api.github.com/repos/pavel-pimenov/flylinkdc-r5xx/issues/1283/comments","events_url":"https://api.github.com/repos/pavel-pimenov/flylinkdc-r5xx/issues/1283/events","html_url":"https://github.com/pavel-pimenov/flylinkdc-r5xx/issues/1283","id":102936572,"number":1283,"title":"[crash-server] Падение в  QueueItemPtr find(const string& p_target) const","user":{"login":"pavel-pimenov","id":920705,"avatar_url":"https://avatars.githubusercontent.com/u/920705?v=3","gravatar_id":"","url":"https://api.github.com/users/pavel-pimenov","html_url":"https://github.com/pavel-pimenov","followers_url":"https://api.github.com/users/pavel-pimenov/followers","following_url":"https://api.github.com/users/pavel-pimenov/following{/other_user}","gists_url":"https://api.github.com/users/pavel-pimenov/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-pimenov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-pimenov/subscriptions","organizations_url":"https://api.github.com/users/pavel-pimenov/orgs","repos_url":"https://api.github.com/users/pavel-pimenov/repos","events_url":"https://api.github.com/users/pavel-pimenov/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-pimenov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pavel-pimenov/flylinkdc-r5xx/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/pavel-pimenov/flylinkdc-r5xx/labels/imported","name":"imported","color":"FFFFFF"},{"url":"https://api.github.com/repos/pavel-pimenov/flylinkdc-r5xx/labels/Priority-High","name":"Priority-High","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-25T02:39:35Z","updated_at":"2015-08-25T02:40:04Z","closed_at":null,"body":"_From [Pavel.Pimenov@gmail.com](https://code.google.com/u/Pavel.Pimenov@gmail.com/) on August 28, 2013 20:02:08_\n\nhttps://crash-server.com/Problem.aspx?ClientID=ppa&ProblemID=36088 QueueItemPtr find(const string& p_target) const // [!] IRainman fix.\r\n{\r\n SharedLock l(csFQ); // [+] IRainman fix.\r\n auto i = m_queue.find(const_cast<string*>(&p_target));\r\n if (i != m_queue.cend())\r\n\treturn i->second;\r\n return nullptr;\r\n}\r\n\r\nХранить указатель const_cast<string*> в мапе опасно\r\nTODO - переписать на значение.\n\n_Original issue: http://code.google.com/p/flylinkdc/issues/detail?id=1246_"},"comment":{"url":"https://api.github.com/repos/pavel-pimenov/flylinkdc-r5xx/issues/comments/134456465","html_url":"https://github.com/pavel-pimenov/flylinkdc-r5xx/issues/1283#issuecomment-134456465","issue_url":"https://api.github.com/repos/pavel-pimenov/flylinkdc-r5xx/issues/1283","id":134456465,"user":{"login":"pavel-pimenov","id":920705,"avatar_url":"https://avatars.githubusercontent.com/u/920705?v=3","gravatar_id":"","url":"https://api.github.com/users/pavel-pimenov","html_url":"https://github.com/pavel-pimenov","followers_url":"https://api.github.com/users/pavel-pimenov/followers","following_url":"https://api.github.com/users/pavel-pimenov/following{/other_user}","gists_url":"https://api.github.com/users/pavel-pimenov/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-pimenov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-pimenov/subscriptions","organizations_url":"https://api.github.com/users/pavel-pimenov/orgs","repos_url":"https://api.github.com/users/pavel-pimenov/repos","events_url":"https://api.github.com/users/pavel-pimenov/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-pimenov/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T02:40:04Z","updated_at":"2015-08-25T02:40:04Z","body":"_From [Pavel.Pimenov@gmail.com](https://code.google.com/u/Pavel.Pimenov@gmail.com/) on August 28, 2013 11:35:17_\n\nВ этом случае нет полной гарантии что упадет при любой смене указателя\r\nесли хочется защитится от изменения, то нужно ставить dcassert-ы или в релизе сравнивать и кидаться в лог.\r\n\r\nтакже я не понял что может поменяться - это ведь путь к целевому файлу\r\nон вполне себе ключ для контейнера для данной задачи - он в базе лежит\r\nв виде значения.\r\n\r\nв общем не понимаю чего тут хорошего с этим указателем\r\nсэкономить 10 кбайт хочется?\r\nзато потенциальное неопределенное поведение гарантировано."}}