{"action":"created","issue":{"url":"https://api.github.com/repos/0x7CFE/llst/issues/28","labels_url":"https://api.github.com/repos/0x7CFE/llst/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/0x7CFE/llst/issues/28/comments","events_url":"https://api.github.com/repos/0x7CFE/llst/issues/28/events","html_url":"https://github.com/0x7CFE/llst/issues/28","id":20315847,"number":28,"title":"Sort benchmark crashes with -O3 -march=native","user":{"login":"0x7CFE","id":3784017,"avatar_url":"https://avatars.githubusercontent.com/u/3784017?v=3","gravatar_id":"","url":"https://api.github.com/users/0x7CFE","html_url":"https://github.com/0x7CFE","followers_url":"https://api.github.com/users/0x7CFE/followers","following_url":"https://api.github.com/users/0x7CFE/following{/other_user}","gists_url":"https://api.github.com/users/0x7CFE/gists{/gist_id}","starred_url":"https://api.github.com/users/0x7CFE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0x7CFE/subscriptions","organizations_url":"https://api.github.com/users/0x7CFE/orgs","repos_url":"https://api.github.com/users/0x7CFE/repos","events_url":"https://api.github.com/users/0x7CFE/events{/privacy}","received_events_url":"https://api.github.com/users/0x7CFE/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/0x7CFE/llst/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/0x7CFE/llst/labels/done","name":"done","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"kpp","id":467709,"avatar_url":"https://avatars.githubusercontent.com/u/467709?v=3","gravatar_id":"","url":"https://api.github.com/users/kpp","html_url":"https://github.com/kpp","followers_url":"https://api.github.com/users/kpp/followers","following_url":"https://api.github.com/users/kpp/following{/other_user}","gists_url":"https://api.github.com/users/kpp/gists{/gist_id}","starred_url":"https://api.github.com/users/kpp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpp/subscriptions","organizations_url":"https://api.github.com/users/kpp/orgs","repos_url":"https://api.github.com/users/kpp/repos","events_url":"https://api.github.com/users/kpp/events{/privacy}","received_events_url":"https://api.github.com/users/kpp/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/0x7CFE/llst/milestones/4","labels_url":"https://api.github.com/repos/0x7CFE/llst/milestones/4/labels","id":488240,"number":4,"title":"Version 0.3","description":"The main aim is to create our own imageBuilder","creator":{"login":"kpp","id":467709,"avatar_url":"https://avatars.githubusercontent.com/u/467709?v=3","gravatar_id":"","url":"https://api.github.com/users/kpp","html_url":"https://github.com/kpp","followers_url":"https://api.github.com/users/kpp/followers","following_url":"https://api.github.com/users/kpp/following{/other_user}","gists_url":"https://api.github.com/users/kpp/gists{/gist_id}","starred_url":"https://api.github.com/users/kpp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpp/subscriptions","organizations_url":"https://api.github.com/users/kpp/orgs","repos_url":"https://api.github.com/users/kpp/repos","events_url":"https://api.github.com/users/kpp/events{/privacy}","received_events_url":"https://api.github.com/users/kpp/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":5,"state":"open","created_at":"2013-11-18T08:47:00Z","updated_at":"2014-05-08T16:02:50Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2013-10-01T07:27:21Z","updated_at":"2015-01-25T18:18:42Z","closed_at":null,"body":"This happens when sort benchmark is run in soft VM mode compiled with -O3 -march=native -mtune=native.\r\n\r\nAffected Revision: 6bb30af\r\nBase Revision: unknown"},"comment":{"url":"https://api.github.com/repos/0x7CFE/llst/issues/comments/71384289","html_url":"https://github.com/0x7CFE/llst/issues/28#issuecomment-71384289","issue_url":"https://api.github.com/repos/0x7CFE/llst/issues/28","id":71384289,"user":{"login":"0x7CFE","id":3784017,"avatar_url":"https://avatars.githubusercontent.com/u/3784017?v=3","gravatar_id":"","url":"https://api.github.com/users/0x7CFE","html_url":"https://github.com/0x7CFE","followers_url":"https://api.github.com/users/0x7CFE/followers","following_url":"https://api.github.com/users/0x7CFE/following{/other_user}","gists_url":"https://api.github.com/users/0x7CFE/gists{/gist_id}","starred_url":"https://api.github.com/users/0x7CFE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0x7CFE/subscriptions","organizations_url":"https://api.github.com/users/0x7CFE/orgs","repos_url":"https://api.github.com/users/0x7CFE/repos","events_url":"https://api.github.com/users/0x7CFE/events{/privacy}","received_events_url":"https://api.github.com/users/0x7CFE/received_events","type":"User","site_admin":false},"created_at":"2015-01-25T18:18:42Z","updated_at":"2015-01-25T18:18:42Z","body":"It seem that the actual cause is related to the way JIT handles deferred values. In particular, method ```List>>insert:onCondition:``` contains the following bytecode sequence:\r\n\r\n```\r\n0075 PushTemporary 0\r\n0076 PushLiteral 9\r\n0077 PushArgument 1\r\n0078 PushConstant nil\r\n0079 MarkArguments 3\r\n0080 SendMessage value:next:\r\n0081 MarkArguments 2\r\n0082 SendMessage next:\r\n0083 DoSpecial popTop\r\n0084 PushArgument 1\r\n```\r\n\r\nNaïve implementation of value deferring may distort the effective value of the ```PushTemporary``` at offset 75. That stack value is used in the ```MarkArguments``` at offset 81, i.e. after ```SendMessage``` which may store different value to the temporary 0. Therefore, deferred load in such context is illegal and should be avoided.\r\n\r\nPrior to defer the value we must prove that actual variable value is not changed on the execution path between logic store site and actual load. This is possible only after full type inference of all affected methods."}}