{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/27924","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/27924/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/27924/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/27924/events","html_url":"https://github.com/JuliaLang/julia/pull/27924","id":338106990,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5MTIyNDcy","number":27924,"title":"[WIP] Improve performance of resizing isbits Union Arrays","user":{"login":"quinnj","id":2896623,"node_id":"MDQ6VXNlcjI4OTY2MjM=","avatar_url":"https://avatars3.githubusercontent.com/u/2896623?v=4","gravatar_id":"","url":"https://api.github.com/users/quinnj","html_url":"https://github.com/quinnj","followers_url":"https://api.github.com/users/quinnj/followers","following_url":"https://api.github.com/users/quinnj/following{/other_user}","gists_url":"https://api.github.com/users/quinnj/gists{/gist_id}","starred_url":"https://api.github.com/users/quinnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinnj/subscriptions","organizations_url":"https://api.github.com/users/quinnj/orgs","repos_url":"https://api.github.com/users/quinnj/repos","events_url":"https://api.github.com/users/quinnj/events{/privacy}","received_events_url":"https://api.github.com/users/quinnj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-04T02:07:13Z","updated_at":"2018-07-09T13:54:41Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/27924","html_url":"https://github.com/JuliaLang/julia/pull/27924","diff_url":"https://github.com/JuliaLang/julia/pull/27924.diff","patch_url":"https://github.com/JuliaLang/julia/pull/27924.patch"},"body":"cc: @vtjnash \r\n\r\nMost of the code is in pretty good shape I think. Unfortunately my llvm is super rusty, so I haven't made the necessary changes in codegen.cpp for getindex/setindex!. I might have to do a hangout call w/ @vtjnash to remember how to navigate the llvm codegen stuff. Basically, we just need to adjust where the selector bytes are pulled from: they're stored after `a->maxsize` now instead of directly after the last array element."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/403487411","html_url":"https://github.com/JuliaLang/julia/pull/27924#issuecomment-403487411","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/27924","id":403487411,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzQ4NzQxMQ==","user":{"login":"quinnj","id":2896623,"node_id":"MDQ6VXNlcjI4OTY2MjM=","avatar_url":"https://avatars3.githubusercontent.com/u/2896623?v=4","gravatar_id":"","url":"https://api.github.com/users/quinnj","html_url":"https://github.com/quinnj","followers_url":"https://api.github.com/users/quinnj/followers","following_url":"https://api.github.com/users/quinnj/following{/other_user}","gists_url":"https://api.github.com/users/quinnj/gists{/gist_id}","starred_url":"https://api.github.com/users/quinnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinnj/subscriptions","organizations_url":"https://api.github.com/users/quinnj/orgs","repos_url":"https://api.github.com/users/quinnj/repos","events_url":"https://api.github.com/users/quinnj/events{/privacy}","received_events_url":"https://api.github.com/users/quinnj/received_events","type":"User","site_admin":false},"created_at":"2018-07-09T13:54:41Z","updated_at":"2018-07-09T13:54:41Z","author_association":"MEMBER","body":"Ok, just pushed a commit that should fix `jl_array_shrink` for isbits Union arrays, and I threw in a bonus fix that affected all malloced arrays that had `a->offset != 0`. I'm a bit surprised we never ran into this bug, but it's pretty easily reproducible like\r\n```julia\r\njulia> A = collect(1:1048577);\r\n\r\njulia> pushfirst!(A, 0);\r\n\r\njulia> deleteat!(A, 10:length(A));\r\n\r\njulia> sizehint!(A, 9)\r\njulia(62929,0x7fff944993c0) malloc: *** error for object 0x128f1f000: pointer being freed was not allocated\r\n*** set a breakpoint in malloc_error_break to debug\r\n\r\nsignal (6): Abort trap: 6\r\nin expression starting at no file:0\r\n__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)\r\nAllocations: 4319571 (Pool: 4318703; Big: 868); GC: 9\r\nAbort trap: 6\r\n```\r\nI guess people generally aren't doing such drastic resizing/sizehint!ing on large, malloced arrays.\r\n\r\nAnyway, so all we need here is the codegen.cpp updates, which I'll continue to pester @Keno, @vtjnash, and @JeffBezanson about."}}
{"actor":{"display_login":"quinnj"}}