{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/282","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/282/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/282/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/282/events","html_url":"https://github.com/dotnet/coreclr/pull/282","id":57862966,"number":282,"title":"Implement native stack unwinding for Linux","user":{"login":"janvorli","id":10758568,"avatar_url":"https://avatars.githubusercontent.com/u/10758568?v=3","gravatar_id":"","url":"https://api.github.com/users/janvorli","html_url":"https://github.com/janvorli","followers_url":"https://api.github.com/users/janvorli/followers","following_url":"https://api.github.com/users/janvorli/following{/other_user}","gists_url":"https://api.github.com/users/janvorli/gists{/gist_id}","starred_url":"https://api.github.com/users/janvorli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janvorli/subscriptions","organizations_url":"https://api.github.com/users/janvorli/orgs","repos_url":"https://api.github.com/users/janvorli/repos","events_url":"https://api.github.com/users/janvorli/events{/privacy}","received_events_url":"https://api.github.com/users/janvorli/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/coreclr/labels/cla-not-required","name":"cla-not-required","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-02-16T23:18:38Z","updated_at":"2015-02-17T12:30:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/282","html_url":"https://github.com/dotnet/coreclr/pull/282","diff_url":"https://github.com/dotnet/coreclr/pull/282.diff","patch_url":"https://github.com/dotnet/coreclr/pull/282.patch"},"body":"This change implements native stack unwinding using the libunwind on\r\nLinux. I have also fixed bunch of issues / details in the related code:\r\n1) 0x in front of %p inside format string\r\n2) Subtraction of -1 from dl_info.dli_sname\r\n3) Added .cfi_xxxx annotation to the CallDescrWorkerInternal and the\r\nLEAF_ENTRY / LEAF_END macros.\r\n4) Changed local labels in the CallDescrWorkerInternal to be prefixed by\r\n.L to see the CallDescrWorkerInternal in the stack trace\r\n5) Changed moveOWord to use movdqu - it was being called with one of the\r\nparameters unaligned"},"comment":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/comments/74660580","html_url":"https://github.com/dotnet/coreclr/pull/282#issuecomment-74660580","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/282","id":74660580,"user":{"login":"janvorli","id":10758568,"avatar_url":"https://avatars.githubusercontent.com/u/10758568?v=3","gravatar_id":"","url":"https://api.github.com/users/janvorli","html_url":"https://github.com/janvorli","followers_url":"https://api.github.com/users/janvorli/followers","following_url":"https://api.github.com/users/janvorli/following{/other_user}","gists_url":"https://api.github.com/users/janvorli/gists{/gist_id}","starred_url":"https://api.github.com/users/janvorli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janvorli/subscriptions","organizations_url":"https://api.github.com/users/janvorli/orgs","repos_url":"https://api.github.com/users/janvorli/repos","events_url":"https://api.github.com/users/janvorli/events{/privacy}","received_events_url":"https://api.github.com/users/janvorli/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T12:30:11Z","updated_at":"2015-02-17T12:30:11Z","body":"@kangaroo \r\n>This API also isn't available on mac. From the lower context it looks like we're trying to see a register spill to a stack slot, and ensure we load from there instead.\r\n\r\n>Shouldn't unw_get_reg take care of this internally?\r\n\r\nGC currently relies on having these context pointers so that when it moves an object to which a register stored somewhere on the stack points, it can update the value of the register on the stack. So what we are trying to do there is to get a pointer to the stack location that we can keep and GC can update it later.\r\nThe fact that we cannot get the pointers using the API provided by the libunwind on OSX will require some likely nontrivial changes in the coreclr. We have already discussed it a bit with @jkotas some time ago when I was looking for the libunwind to use on Linux. \r\nOne option we have here is to ensure that object pointed to by registers are always pinned. Then the context pointer are unnecessary. It is not clear to me though what exactly needs to be done to do that.\r\nNow that I am thinking about it, I actually wonder if we really need the context pointers for the native frames. @jkotas, do you know if there is a case where a pointer to an object managed by GC would be stored in a register stored in one of the native frames? \r\n"}}