{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/11363","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/11363/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/11363/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/11363/events","html_url":"https://github.com/JuliaLang/julia/pull/11363","id":78307232,"number":11363,"title":"Change dump of reinit_list to 8 bytes when size_t is 8 bytes","user":{"login":"waTeim","id":5779395,"avatar_url":"https://avatars.githubusercontent.com/u/5779395?v=3","gravatar_id":"","url":"https://api.github.com/users/waTeim","html_url":"https://github.com/waTeim","followers_url":"https://api.github.com/users/waTeim/followers","following_url":"https://api.github.com/users/waTeim/following{/other_user}","gists_url":"https://api.github.com/users/waTeim/gists{/gist_id}","starred_url":"https://api.github.com/users/waTeim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waTeim/subscriptions","organizations_url":"https://api.github.com/users/waTeim/orgs","repos_url":"https://api.github.com/users/waTeim/repos","events_url":"https://api.github.com/users/waTeim/events{/privacy}","received_events_url":"https://api.github.com/users/waTeim/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":34,"created_at":"2015-05-20T00:31:14Z","updated_at":"2015-06-16T20:42:36Z","closed_at":"2015-06-16T17:43:02Z","pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/11363","html_url":"https://github.com/JuliaLang/julia/pull/11363","diff_url":"https://github.com/JuliaLang/julia/pull/11363.diff","patch_url":"https://github.com/JuliaLang/julia/pull/11363.patch"},"body":"Not quite sure on this one.  reinit_list.items is a **void****, and in fact is a size_t. This is [8 bytes not 4 bytes on a 64 bit system](http://stackoverflow.com/questions/153065/converting-a-pointer-into-an-integer).  Just avoiding the compiler warning here and storing the full value.  It does not appear to destabilize things; that's good\r\n\r\nBut is weird since I did not change ast.c **fl_load_system_image**. I note also this which makes me think the intention really is to save pos and a 1.  Starting point maybe.\r\n\r\n       if (jl_typeof(v) == jl_idtable_type) {\r\n            arraylist_push(&reinit_list, (void*)pos);\r\n            arraylist_push(&reinit_list, (void*)1);\r\n       }\r\n \r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/112563643","html_url":"https://github.com/JuliaLang/julia/pull/11363#issuecomment-112563643","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/11363","id":112563643,"user":{"login":"ScottPJones","id":11798751,"avatar_url":"https://avatars.githubusercontent.com/u/11798751?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottPJones","html_url":"https://github.com/ScottPJones","followers_url":"https://api.github.com/users/ScottPJones/followers","following_url":"https://api.github.com/users/ScottPJones/following{/other_user}","gists_url":"https://api.github.com/users/ScottPJones/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottPJones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottPJones/subscriptions","organizations_url":"https://api.github.com/users/ScottPJones/orgs","repos_url":"https://api.github.com/users/ScottPJones/repos","events_url":"https://api.github.com/users/ScottPJones/events{/privacy}","received_events_url":"https://api.github.com/users/ScottPJones/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T20:42:36Z","updated_at":"2015-06-16T20:42:36Z","body":"OK, each different array type would have it's own structure. For example:\r\n```c\r\nstruct reinit_str {\r\n    int32_t     pos; // Position shifted up by 1 bit from backref_table_numel, bottom bit is module flag\r\n    int32_t     ind; // Currently always set to 1???\r\n};\r\n```\r\nThis makes it clear just what is being stored in the array (and by doing so, I've determined that instead of 16 bytes, only 4 bytes are needed for each entry (the second part is always set to 1, for some undocumented reason).\r\narraylist_t is only changed minimally (the addition of an elesz field, and I could even have functions that work exactly the same, saving void *, until everything has been changed to use the new `arraylist_new` (that takes an element size), `arraylist_pop` (that takes a void* to where to copy the return value), `arraylist_push` (passed a pointer to what gets saved, instead of the value to be saved).\r\nThe current implementation also seems like it might be liable to have leaks... when `arraylist_new` is called, it doesn't make sure that the previous, possibly 'malloc'ed array was freed...\r\n\r\nFor the finalizer list, it's just making 1 call instead of two, not a big difference probably, but it does make things clearer, and the structure is longer defined by the order of the push operations.\r\n"}}