{"action":"closed","issue":{"url":"https://api.github.com/repos/golang/go/issues/7421","labels_url":"https://api.github.com/repos/golang/go/issues/7421/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/7421/comments","events_url":"https://api.github.com/repos/golang/go/issues/7421/events","html_url":"https://github.com/golang/go/issues/7421","id":51286687,"number":7421,"title":"runtime: bus error on dragonfly/386 causes fault in signal trampoline","user":{"login":"4a6f656c","id":8142769,"avatar_url":"https://avatars.githubusercontent.com/u/8142769?v=3","gravatar_id":"","url":"https://api.github.com/users/4a6f656c","html_url":"https://github.com/4a6f656c","followers_url":"https://api.github.com/users/4a6f656c/followers","following_url":"https://api.github.com/users/4a6f656c/following{/other_user}","gists_url":"https://api.github.com/users/4a6f656c/gists{/gist_id}","starred_url":"https://api.github.com/users/4a6f656c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4a6f656c/subscriptions","organizations_url":"https://api.github.com/users/4a6f656c/orgs","repos_url":"https://api.github.com/users/4a6f656c/repos","events_url":"https://api.github.com/users/4a6f656c/events{/privacy}","received_events_url":"https://api.github.com/users/4a6f656c/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/golang/go/labels/accepted","name":"accepted","color":"ededed"},{"url":"https://api.github.com/repos/golang/go/labels/release-none","name":"release-none","color":"ededed"},{"url":"https://api.github.com/repos/golang/go/labels/repo-main","name":"repo-main","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-02-27T11:27:54Z","updated_at":"2015-03-14T10:48:13Z","closed_at":"2015-03-14T10:48:13Z","body":"<pre>The following code (from runtime.TestSetPanicOnFault) effectively deadlocks on\ndragonfly/386:\n\n        var p *int\n        p = (*int)(unsafe.Pointer(^uintptr(0)))\n        fmt.Println(*p)\n\nThis code intentionally triggers a bus error, the process gets sent a SIGBUS signal, at\nwhich point the signal trampoline seemingly faults when attempting to retrieve m from\nTLS (on dragonfly/386, m(CX) becomes 4(GS)):\n\n        // check that m exists\n        MOVL    m(CX), BX\n\nThe same code works fine on most platforms, including dragonfly/amd64. Additionally, the\nsignal trampoline works correctly for a segmentation violation (SIGSEGV):\n\n        var p *int\n        p = (*int)(unsafe.Pointer(uintptr(0)))\n        fmt.Println(*p)\n\nSending a SIGBUS to the process via kill also results in the expected/correct behaviour.\nAs such, I believe that this is most likely an issue in the DragonFly i386 kernel trap\ncode (rather than an issue with the Go runtime) - my current guess is that GS is being\ncorrupted, however need to investigate further.</pre>"}}