{"action":"created","comment":{"url":"https://api.github.com/repos/seqan/seqan/pulls/comments/52440871","id":52440871,"diff_hunk":"@@ -585,6 +589,76 @@ resize(\n     return front(host(me)).i = new_length;\n }\n \n+template <typename TValue, typename THostspec, typename TSize, typename TExpand, typename TValue2>\n+inline typename Size< String<TValue, Packed<THostspec> > >::Type\n+resize(String<TValue, Packed<THostspec> > & me,\n+       TSize new_length,\n+       TValue2 const & newValue,\n+       Tag<TExpand> tag)\n+{\n+    typedef String<TValue, Packed<THostspec> > TString;\n+    typedef PackedTraits_<TString> TTraits;\n+    typedef typename Size<TString>::Type TStringSize;\n+    typedef typename TTraits::THostValue THostValue;\n+\n+    TStringSize old_length = length(me);\n+    TStringSize old_host_length = length(host(me));\n+\n+    if (static_cast<TStringSize>(new_length) < length(me))\n+        return resize(me, new_length, tag);\n+\n+    // create WORD\n+    THostValue tmp;\n+    tmp.i = 0ul;\n+    __uint64 ord = ordValue(TValue(newValue));\n+    for (unsigned j = 0; j < TTraits::VALUES_PER_HOST_VALUE; ++j)\n+        tmp.i |= ord << (j * TTraits::BITS_PER_VALUE);","path":"include/seqan/sequence/string_packed.h","position":38,"original_position":38,"commit_id":"fefd568727abfb7ec4fcc279aa78a7026126a388","original_commit_id":"fefd568727abfb7ec4fcc279aa78a7026126a388","user":{"login":"h-2","id":2996863,"avatar_url":"https://avatars.githubusercontent.com/u/2996863?v=3","gravatar_id":"","url":"https://api.github.com/users/h-2","html_url":"https://github.com/h-2","followers_url":"https://api.github.com/users/h-2/followers","following_url":"https://api.github.com/users/h-2/following{/other_user}","gists_url":"https://api.github.com/users/h-2/gists{/gist_id}","starred_url":"https://api.github.com/users/h-2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h-2/subscriptions","organizations_url":"https://api.github.com/users/h-2/orgs","repos_url":"https://api.github.com/users/h-2/repos","events_url":"https://api.github.com/users/h-2/events{/privacy}","received_events_url":"https://api.github.com/users/h-2/received_events","type":"User","site_admin":false},"body":"believe me, I have sat a long time on this until it worked, if only a little thing is wrong all oft the tests fail and I have manually compared the entire bit-registers with the version from before that goes through the iterator. This is the right way to do it :sunglasses:","created_at":"2016-02-10T10:40:52Z","updated_at":"2016-02-10T10:40:52Z","html_url":"https://github.com/seqan/seqan/pull/1429#discussion_r52440871","pull_request_url":"https://api.github.com/repos/seqan/seqan/pulls/1429","_links":{"self":{"href":"https://api.github.com/repos/seqan/seqan/pulls/comments/52440871"},"html":{"href":"https://github.com/seqan/seqan/pull/1429#discussion_r52440871"},"pull_request":{"href":"https://api.github.com/repos/seqan/seqan/pulls/1429"}}},"pull_request":{"url":"https://api.github.com/repos/seqan/seqan/pulls/1429","id":58451526,"html_url":"https://github.com/seqan/seqan/pull/1429","diff_url":"https://github.com/seqan/seqan/pull/1429.diff","patch_url":"https://github.com/seqan/seqan/pull/1429.patch","issue_url":"https://api.github.com/repos/seqan/seqan/issues/1429","number":1429,"state":"open","locked":false,"title":"[WORKAROUND] fix insert() in packed_string","user":{"login":"h-2","id":2996863,"avatar_url":"https://avatars.githubusercontent.com/u/2996863?v=3","gravatar_id":"","url":"https://api.github.com/users/h-2","html_url":"https://github.com/h-2","followers_url":"https://api.github.com/users/h-2/followers","following_url":"https://api.github.com/users/h-2/following{/other_user}","gists_url":"https://api.github.com/users/h-2/gists{/gist_id}","starred_url":"https://api.github.com/users/h-2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h-2/subscriptions","organizations_url":"https://api.github.com/users/h-2/orgs","repos_url":"https://api.github.com/users/h-2/repos","events_url":"https://api.github.com/users/h-2/events{/privacy}","received_events_url":"https://api.github.com/users/h-2/received_events","type":"User","site_admin":false},"body":"  * resize() without value is unchanged\r\n  * more efficient host-based resize() with value added\r\n  * insert() changed to where clearUnusedBits() is called before the real insert to fix the bugs we where seeing with #1074 \r\n\r\nThere is probably a larger problem hidden within ClearSpaceStringPacked_ or even the memcpy functions, but the problem only appeared with inserts and they have a workaround now, so everything is usable and regular resizes are not affected (initializing resizes should even be faster now).\r\n\r\nPLEASE NOTE that some valgrind warnings for unintialized reads are unrelated to this and simply part of the implementation, i.e. seqan resizes() dont initialize and if only the first n bits are read and written, this implicitly read/writes the other bits although there value is irrelevant to the implementation.  This could be worked around (to silence the warnings) but this can be done for one of the next releases.","created_at":"2016-02-05T16:32:46Z","updated_at":"2016-02-10T10:40:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dfcf8354146d3daf66165d1f0432b87a839fc5f1","assignee":{"login":"rrahn","id":1529364,"avatar_url":"https://avatars.githubusercontent.com/u/1529364?v=3","gravatar_id":"","url":"https://api.github.com/users/rrahn","html_url":"https://github.com/rrahn","followers_url":"https://api.github.com/users/rrahn/followers","following_url":"https://api.github.com/users/rrahn/following{/other_user}","gists_url":"https://api.github.com/users/rrahn/gists{/gist_id}","starred_url":"https://api.github.com/users/rrahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rrahn/subscriptions","organizations_url":"https://api.github.com/users/rrahn/orgs","repos_url":"https://api.github.com/users/rrahn/repos","events_url":"https://api.github.com/users/rrahn/events{/privacy}","received_events_url":"https://api.github.com/users/rrahn/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/seqan/seqan/milestones/7","html_url":"https://github.com/seqan/seqan/milestones/Release%202.0.2","labels_url":"https://api.github.com/repos/seqan/seqan/milestones/7/labels","id":1330833,"number":7,"title":"Release 2.0.2","description":"Hotfixes and minor changes.","creator":{"login":"esiragusa","id":172085,"avatar_url":"https://avatars.githubusercontent.com/u/172085?v=3","gravatar_id":"","url":"https://api.github.com/users/esiragusa","html_url":"https://github.com/esiragusa","followers_url":"https://api.github.com/users/esiragusa/followers","following_url":"https://api.github.com/users/esiragusa/following{/other_user}","gists_url":"https://api.github.com/users/esiragusa/gists{/gist_id}","starred_url":"https://api.github.com/users/esiragusa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esiragusa/subscriptions","organizations_url":"https://api.github.com/users/esiragusa/orgs","repos_url":"https://api.github.com/users/esiragusa/repos","events_url":"https://api.github.com/users/esiragusa/events{/privacy}","received_events_url":"https://api.github.com/users/esiragusa/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":65,"state":"open","created_at":"2015-09-30T10:21:02Z","updated_at":"2016-02-10T10:13:15Z","due_on":"2016-02-04T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/seqan/seqan/pulls/1429/commits","review_comments_url":"https://api.github.com/repos/seqan/seqan/pulls/1429/comments","review_comment_url":"https://api.github.com/repos/seqan/seqan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/seqan/seqan/issues/1429/comments","statuses_url":"https://api.github.com/repos/seqan/seqan/statuses/fefd568727abfb7ec4fcc279aa78a7026126a388","head":{"label":"h-2:fix/packed_strings","ref":"fix/packed_strings","sha":"fefd568727abfb7ec4fcc279aa78a7026126a388","user":{"login":"h-2","id":2996863,"avatar_url":"https://avatars.githubusercontent.com/u/2996863?v=3","gravatar_id":"","url":"https://api.github.com/users/h-2","html_url":"https://github.com/h-2","followers_url":"https://api.github.com/users/h-2/followers","following_url":"https://api.github.com/users/h-2/following{/other_user}","gists_url":"https://api.github.com/users/h-2/gists{/gist_id}","starred_url":"https://api.github.com/users/h-2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h-2/subscriptions","organizations_url":"https://api.github.com/users/h-2/orgs","repos_url":"https://api.github.com/users/h-2/repos","events_url":"https://api.github.com/users/h-2/events{/privacy}","received_events_url":"https://api.github.com/users/h-2/received_events","type":"User","site_admin":false},"repo":{"id":17593904,"name":"seqan","full_name":"h-2/seqan","owner":{"login":"h-2","id":2996863,"avatar_url":"https://avatars.githubusercontent.com/u/2996863?v=3","gravatar_id":"","url":"https://api.github.com/users/h-2","html_url":"https://github.com/h-2","followers_url":"https://api.github.com/users/h-2/followers","following_url":"https://api.github.com/users/h-2/following{/other_user}","gists_url":"https://api.github.com/users/h-2/gists{/gist_id}","starred_url":"https://api.github.com/users/h-2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h-2/subscriptions","organizations_url":"https://api.github.com/users/h-2/orgs","repos_url":"https://api.github.com/users/h-2/repos","events_url":"https://api.github.com/users/h-2/events{/privacy}","received_events_url":"https://api.github.com/users/h-2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/h-2/seqan","description":"SeqAn's official repository.","fork":true,"url":"https://api.github.com/repos/h-2/seqan","forks_url":"https://api.github.com/repos/h-2/seqan/forks","keys_url":"https://api.github.com/repos/h-2/seqan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/h-2/seqan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/h-2/seqan/teams","hooks_url":"https://api.github.com/repos/h-2/seqan/hooks","issue_events_url":"https://api.github.com/repos/h-2/seqan/issues/events{/number}","events_url":"https://api.github.com/repos/h-2/seqan/events","assignees_url":"https://api.github.com/repos/h-2/seqan/assignees{/user}","branches_url":"https://api.github.com/repos/h-2/seqan/branches{/branch}","tags_url":"https://api.github.com/repos/h-2/seqan/tags","blobs_url":"https://api.github.com/repos/h-2/seqan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/h-2/seqan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/h-2/seqan/git/refs{/sha}","trees_url":"https://api.github.com/repos/h-2/seqan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/h-2/seqan/statuses/{sha}","languages_url":"https://api.github.com/repos/h-2/seqan/languages","stargazers_url":"https://api.github.com/repos/h-2/seqan/stargazers","contributors_url":"https://api.github.com/repos/h-2/seqan/contributors","subscribers_url":"https://api.github.com/repos/h-2/seqan/subscribers","subscription_url":"https://api.github.com/repos/h-2/seqan/subscription","commits_url":"https://api.github.com/repos/h-2/seqan/commits{/sha}","git_commits_url":"https://api.github.com/repos/h-2/seqan/git/commits{/sha}","comments_url":"https://api.github.com/repos/h-2/seqan/comments{/number}","issue_comment_url":"https://api.github.com/repos/h-2/seqan/issues/comments{/number}","contents_url":"https://api.github.com/repos/h-2/seqan/contents/{+path}","compare_url":"https://api.github.com/repos/h-2/seqan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/h-2/seqan/merges","archive_url":"https://api.github.com/repos/h-2/seqan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/h-2/seqan/downloads","issues_url":"https://api.github.com/repos/h-2/seqan/issues{/number}","pulls_url":"https://api.github.com/repos/h-2/seqan/pulls{/number}","milestones_url":"https://api.github.com/repos/h-2/seqan/milestones{/number}","notifications_url":"https://api.github.com/repos/h-2/seqan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/h-2/seqan/labels{/name}","releases_url":"https://api.github.com/repos/h-2/seqan/releases{/id}","deployments_url":"https://api.github.com/repos/h-2/seqan/deployments","created_at":"2014-03-10T13:42:41Z","updated_at":"2015-09-03T13:21:01Z","pushed_at":"2016-02-10T10:18:41Z","git_url":"git://github.com/h-2/seqan.git","ssh_url":"git@github.com:h-2/seqan.git","clone_url":"https://github.com/h-2/seqan.git","svn_url":"https://github.com/h-2/seqan","homepage":"www.seqan.de","size":142704,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":0,"default_branch":"feature/lambda"}},"base":{"label":"seqan:master","ref":"master","sha":"fcad60a03ff3a05e5c5b777100270eca17ee63ed","user":{"login":"seqan","id":1752144,"avatar_url":"https://avatars.githubusercontent.com/u/1752144?v=3","gravatar_id":"","url":"https://api.github.com/users/seqan","html_url":"https://github.com/seqan","followers_url":"https://api.github.com/users/seqan/followers","following_url":"https://api.github.com/users/seqan/following{/other_user}","gists_url":"https://api.github.com/users/seqan/gists{/gist_id}","starred_url":"https://api.github.com/users/seqan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seqan/subscriptions","organizations_url":"https://api.github.com/users/seqan/orgs","repos_url":"https://api.github.com/users/seqan/repos","events_url":"https://api.github.com/users/seqan/events{/privacy}","received_events_url":"https://api.github.com/users/seqan/received_events","type":"Organization","site_admin":false},"repo":{"id":6383869,"name":"seqan","full_name":"seqan/seqan","owner":{"login":"seqan","id":1752144,"avatar_url":"https://avatars.githubusercontent.com/u/1752144?v=3","gravatar_id":"","url":"https://api.github.com/users/seqan","html_url":"https://github.com/seqan","followers_url":"https://api.github.com/users/seqan/followers","following_url":"https://api.github.com/users/seqan/following{/other_user}","gists_url":"https://api.github.com/users/seqan/gists{/gist_id}","starred_url":"https://api.github.com/users/seqan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seqan/subscriptions","organizations_url":"https://api.github.com/users/seqan/orgs","repos_url":"https://api.github.com/users/seqan/repos","events_url":"https://api.github.com/users/seqan/events{/privacy}","received_events_url":"https://api.github.com/users/seqan/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/seqan/seqan","description":"SeqAn's official repository.","fork":false,"url":"https://api.github.com/repos/seqan/seqan","forks_url":"https://api.github.com/repos/seqan/seqan/forks","keys_url":"https://api.github.com/repos/seqan/seqan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seqan/seqan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seqan/seqan/teams","hooks_url":"https://api.github.com/repos/seqan/seqan/hooks","issue_events_url":"https://api.github.com/repos/seqan/seqan/issues/events{/number}","events_url":"https://api.github.com/repos/seqan/seqan/events","assignees_url":"https://api.github.com/repos/seqan/seqan/assignees{/user}","branches_url":"https://api.github.com/repos/seqan/seqan/branches{/branch}","tags_url":"https://api.github.com/repos/seqan/seqan/tags","blobs_url":"https://api.github.com/repos/seqan/seqan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seqan/seqan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seqan/seqan/git/refs{/sha}","trees_url":"https://api.github.com/repos/seqan/seqan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seqan/seqan/statuses/{sha}","languages_url":"https://api.github.com/repos/seqan/seqan/languages","stargazers_url":"https://api.github.com/repos/seqan/seqan/stargazers","contributors_url":"https://api.github.com/repos/seqan/seqan/contributors","subscribers_url":"https://api.github.com/repos/seqan/seqan/subscribers","subscription_url":"https://api.github.com/repos/seqan/seqan/subscription","commits_url":"https://api.github.com/repos/seqan/seqan/commits{/sha}","git_commits_url":"https://api.github.com/repos/seqan/seqan/git/commits{/sha}","comments_url":"https://api.github.com/repos/seqan/seqan/comments{/number}","issue_comment_url":"https://api.github.com/repos/seqan/seqan/issues/comments{/number}","contents_url":"https://api.github.com/repos/seqan/seqan/contents/{+path}","compare_url":"https://api.github.com/repos/seqan/seqan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seqan/seqan/merges","archive_url":"https://api.github.com/repos/seqan/seqan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seqan/seqan/downloads","issues_url":"https://api.github.com/repos/seqan/seqan/issues{/number}","pulls_url":"https://api.github.com/repos/seqan/seqan/pulls{/number}","milestones_url":"https://api.github.com/repos/seqan/seqan/milestones{/number}","notifications_url":"https://api.github.com/repos/seqan/seqan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seqan/seqan/labels{/name}","releases_url":"https://api.github.com/repos/seqan/seqan/releases{/id}","deployments_url":"https://api.github.com/repos/seqan/seqan/deployments","created_at":"2012-10-25T08:02:15Z","updated_at":"2016-02-10T09:51:10Z","pushed_at":"2016-02-10T10:20:10Z","git_url":"git://github.com/seqan/seqan.git","ssh_url":"git@github.com:seqan/seqan.git","clone_url":"https://github.com/seqan/seqan.git","svn_url":"https://github.com/seqan/seqan","homepage":"www.seqan.de","size":144897,"stargazers_count":110,"watchers_count":110,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":64,"mirror_url":null,"open_issues_count":124,"forks":64,"open_issues":124,"watchers":110,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/seqan/seqan/pulls/1429"},"html":{"href":"https://github.com/seqan/seqan/pull/1429"},"issue":{"href":"https://api.github.com/repos/seqan/seqan/issues/1429"},"comments":{"href":"https://api.github.com/repos/seqan/seqan/issues/1429/comments"},"review_comments":{"href":"https://api.github.com/repos/seqan/seqan/pulls/1429/comments"},"review_comment":{"href":"https://api.github.com/repos/seqan/seqan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/seqan/seqan/pulls/1429/commits"},"statuses":{"href":"https://api.github.com/repos/seqan/seqan/statuses/fefd568727abfb7ec4fcc279aa78a7026126a388"}}}}