{"action":"closed","issue":{"url":"https://api.github.com/repos/nabijaczleweli/safe-transmute-rs/issues/1","repository_url":"https://api.github.com/repos/nabijaczleweli/safe-transmute-rs","labels_url":"https://api.github.com/repos/nabijaczleweli/safe-transmute-rs/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/nabijaczleweli/safe-transmute-rs/issues/1/comments","events_url":"https://api.github.com/repos/nabijaczleweli/safe-transmute-rs/issues/1/events","html_url":"https://github.com/nabijaczleweli/safe-transmute-rs/issues/1","id":187589339,"number":1,"title":"Not necessarily safe","user":{"login":"BurntSushi","id":456674,"avatar_url":"https://avatars.githubusercontent.com/u/456674?v=3","gravatar_id":"","url":"https://api.github.com/users/BurntSushi","html_url":"https://github.com/BurntSushi","followers_url":"https://api.github.com/users/BurntSushi/followers","following_url":"https://api.github.com/users/BurntSushi/following{/other_user}","gists_url":"https://api.github.com/users/BurntSushi/gists{/gist_id}","starred_url":"https://api.github.com/users/BurntSushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BurntSushi/subscriptions","organizations_url":"https://api.github.com/users/BurntSushi/orgs","repos_url":"https://api.github.com/users/BurntSushi/repos","events_url":"https://api.github.com/users/BurntSushi/events{/privacy}","received_events_url":"https://api.github.com/users/BurntSushi/received_events","type":"User","site_admin":false},"labels":[{"id":476297087,"url":"https://api.github.com/repos/nabijaczleweli/safe-transmute-rs/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-06T21:09:11Z","updated_at":"2016-11-06T21:28:38Z","closed_at":"2016-11-06T21:28:38Z","body":"Unfortunately, the API exposed here is most definitely *not* safe. This program (on `x86_64`) produces a seg fault, yet there is no `unsafe`. Therefore, `guarded_transmute` needs to be labeled as an `unsafe` function.\r\n\r\n```rust\r\nextern crate safe_transmute;\r\n\r\nuse safe_transmute::guarded_transmute;\r\n\r\nfn main() {\r\n    let x: &Vec<i32> = guarded_transmute(&[\r\n        0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\r\n    ]);\r\n    println!(\"{:?}\", x);\r\n}\r\n```"}}
{"actor":{"display_login":"nabijaczleweli"}}