{"action":"created","issue":{"url":"https://api.github.com/repos/UpstandingHackers/hammer/issues/121","labels_url":"https://api.github.com/repos/UpstandingHackers/hammer/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/UpstandingHackers/hammer/issues/121/comments","events_url":"https://api.github.com/repos/UpstandingHackers/hammer/issues/121/events","html_url":"https://github.com/UpstandingHackers/hammer/issues/121","id":53344520,"number":121,"title":"Probable gcc bug with symptom in h_carray_append","user":{"login":"mrdomino","id":23019,"avatar_url":"https://avatars.githubusercontent.com/u/23019?v=3","gravatar_id":"","url":"https://api.github.com/users/mrdomino","html_url":"https://github.com/mrdomino","followers_url":"https://api.github.com/users/mrdomino/followers","following_url":"https://api.github.com/users/mrdomino/following{/other_user}","gists_url":"https://api.github.com/users/mrdomino/gists{/gist_id}","starred_url":"https://api.github.com/users/mrdomino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrdomino/subscriptions","organizations_url":"https://api.github.com/users/mrdomino/orgs","repos_url":"https://api.github.com/users/mrdomino/repos","events_url":"https://api.github.com/users/mrdomino/events{/privacy}","received_events_url":"https://api.github.com/users/mrdomino/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-04T18:49:50Z","updated_at":"2015-01-04T18:59:25Z","closed_at":null,"body":"Minimalish example: https://gist.github.com/mrdomino/5f7de7b4aa9f74d13747\r\n\r\nThat segfaults (dereferencing 0) on -O3 and exits normally on -O2. Trial elimination of optimization flags reveals that `-O -fvect-cost-model(=(dynamic|unlimited)|) -ftree-loop-vectorize` is sufficient to trigger the bad behavior. Adding `fprintf(stderr, \"%zu\\n\", i);` to the loop at datastructures.c:30 (the h_carray_append array->used loop) also causes the code to exit normally.\r\n\r\nThis always fails at exactly 33 elements or greater (so at the capacity jump to 64), and completes successfully on 32 or fewer elements. It has nothing to do with the size of thingy.data, but seems to depend on act_thingy getting a TT_SEQUENCE."},"comment":{"url":"https://api.github.com/repos/UpstandingHackers/hammer/issues/comments/68644159","html_url":"https://github.com/UpstandingHackers/hammer/issues/121#issuecomment-68644159","issue_url":"https://api.github.com/repos/UpstandingHackers/hammer/issues/121","id":68644159,"user":{"login":"mrdomino","id":23019,"avatar_url":"https://avatars.githubusercontent.com/u/23019?v=3","gravatar_id":"","url":"https://api.github.com/users/mrdomino","html_url":"https://github.com/mrdomino","followers_url":"https://api.github.com/users/mrdomino/followers","following_url":"https://api.github.com/users/mrdomino/following{/other_user}","gists_url":"https://api.github.com/users/mrdomino/gists{/gist_id}","starred_url":"https://api.github.com/users/mrdomino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrdomino/subscriptions","organizations_url":"https://api.github.com/users/mrdomino/orgs","repos_url":"https://api.github.com/users/mrdomino/repos","events_url":"https://api.github.com/users/mrdomino/events{/privacy}","received_events_url":"https://api.github.com/users/mrdomino/received_events","type":"User","site_admin":false},"created_at":"2015-01-04T18:59:25Z","updated_at":"2015-01-04T18:59:25Z","body":"Experimentally, the attached gist doesn't fail at -O3, but does fail at -O2 -fvect-cost-model=unlimited -ftree-loop-vectorize. The parser the example is extracted from fails at -O3."}}