{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/8210","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/8210/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/8210/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/8210/events","html_url":"https://github.com/numpy/numpy/issues/8210","id":185048177,"number":8210,"title":"Memory corruption when sorting structured array with sub-array","user":{"login":"jzwinck","id":1216791,"avatar_url":"https://avatars3.githubusercontent.com/u/1216791?v=3","gravatar_id":"","url":"https://api.github.com/users/jzwinck","html_url":"https://github.com/jzwinck","followers_url":"https://api.github.com/users/jzwinck/followers","following_url":"https://api.github.com/users/jzwinck/following{/other_user}","gists_url":"https://api.github.com/users/jzwinck/gists{/gist_id}","starred_url":"https://api.github.com/users/jzwinck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzwinck/subscriptions","organizations_url":"https://api.github.com/users/jzwinck/orgs","repos_url":"https://api.github.com/users/jzwinck/repos","events_url":"https://api.github.com/users/jzwinck/events{/privacy}","received_events_url":"https://api.github.com/users/jzwinck/received_events","type":"User","site_admin":false},"labels":[{"id":6359214,"url":"https://api.github.com/repos/numpy/numpy/labels/11%20-%20Bug","name":"11 - Bug","color":"fef2c0","default":false},{"id":16917029,"url":"https://api.github.com/repos/numpy/numpy/labels/component:%20numpy.core","name":"component: numpy.core","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-10-25T08:17:05Z","updated_at":"2017-04-22T00:24:37Z","closed_at":null,"body":"This crashes, either with a segmentation fault or a \"corrupted double-linked list\" abort:\n\n```\nimport numpy as np\ndt = [('val', 'i4', (1,))]\narr = np.empty(1000, dt)\narr[::-1].sort()\n```\n\nI got the idea to reverse the sort order from here: http://stackoverflow.com/a/26984520/4323\n\nSorting like this always seems to fail if the input array is large enough and it has a structured dtype with at least one element which is an array inside (even in the degenerate case above where the sub-array is of length 1).  It even crashes when trying to sort on a regular scalar field--the mere presence of the array-typed column is enough to make it fail.\n\nI've reproduced this with NumPy 1.11.1 on 64-bit Linux with Python 3.5 and also 2.7.\n"},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/296333152","html_url":"https://github.com/numpy/numpy/issues/8210#issuecomment-296333152","issue_url":"https://api.github.com/repos/numpy/numpy/issues/8210","id":296333152,"user":{"login":"charris","id":77272,"avatar_url":"https://avatars0.githubusercontent.com/u/77272?v=3","gravatar_id":"","url":"https://api.github.com/users/charris","html_url":"https://github.com/charris","followers_url":"https://api.github.com/users/charris/followers","following_url":"https://api.github.com/users/charris/following{/other_user}","gists_url":"https://api.github.com/users/charris/gists{/gist_id}","starred_url":"https://api.github.com/users/charris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charris/subscriptions","organizations_url":"https://api.github.com/users/charris/orgs","repos_url":"https://api.github.com/users/charris/repos","events_url":"https://api.github.com/users/charris/events{/privacy}","received_events_url":"https://api.github.com/users/charris/received_events","type":"User","site_admin":false},"created_at":"2017-04-22T00:24:37Z","updated_at":"2017-04-22T00:24:37Z","body":"Might try `a = np.empty(1000, 'V10')` to avoid zero itemsize."}}
{"actor":{"display_login":"charris"}}