{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/15857","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/15857/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/15857/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/15857/events","html_url":"https://github.com/JuliaLang/julia/issues/15857","id":147966335,"number":15857,"title":"Dissallow pointer_from_objref on immutable values","user":{"login":"ivarne","id":131616,"avatar_url":"https://avatars.githubusercontent.com/u/131616?v=3","gravatar_id":"","url":"https://api.github.com/users/ivarne","html_url":"https://github.com/ivarne","followers_url":"https://api.github.com/users/ivarne/followers","following_url":"https://api.github.com/users/ivarne/following{/other_user}","gists_url":"https://api.github.com/users/ivarne/gists{/gist_id}","starred_url":"https://api.github.com/users/ivarne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivarne/subscriptions","organizations_url":"https://api.github.com/users/ivarne/orgs","repos_url":"https://api.github.com/users/ivarne/repos","events_url":"https://api.github.com/users/ivarne/events{/privacy}","received_events_url":"https://api.github.com/users/ivarne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-13T07:05:10Z","updated_at":"2016-04-13T14:51:52Z","closed_at":null,"body":"See discussion in https://groups.google.com/forum/#!topic/julia-dev/F9PggSikPW8 that requests an issue to track this.\r\n\r\n@vtjnash \r\n> this is not C – variables don't have first-class memory addresses (also, pointer_from_objref on a immutable returns a semi-random number that was correlated at some point in the past with the value).\r\n\r\n@StefanKarpinski \r\n> This should really not be allowed: calling pointer_from_objref on an immutable should be an error."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/209487073","html_url":"https://github.com/JuliaLang/julia/issues/15857#issuecomment-209487073","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/15857","id":209487073,"user":{"login":"yuyichao","id":712232,"avatar_url":"https://avatars.githubusercontent.com/u/712232?v=3","gravatar_id":"","url":"https://api.github.com/users/yuyichao","html_url":"https://github.com/yuyichao","followers_url":"https://api.github.com/users/yuyichao/followers","following_url":"https://api.github.com/users/yuyichao/following{/other_user}","gists_url":"https://api.github.com/users/yuyichao/gists{/gist_id}","starred_url":"https://api.github.com/users/yuyichao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuyichao/subscriptions","organizations_url":"https://api.github.com/users/yuyichao/orgs","repos_url":"https://api.github.com/users/yuyichao/repos","events_url":"https://api.github.com/users/yuyichao/events{/privacy}","received_events_url":"https://api.github.com/users/yuyichao/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T14:51:51Z","updated_at":"2016-04-13T14:51:51Z","body":"More on topic for this issue, I very occasionally find it useful to check what addresses julia may allocate for an `isbits` type so it would be nice if this is still possible (I can of course use a debugger but that's more complicated).\r\n\r\nSince we now have `@pure` I think the easiest way to implement this is to add a check in the julia implementation while leaving `jl_value_ptr` do whatever it used to do.\r\n"}}