{"action":"opened","issue":{"url":"https://api.github.com/repos/mirage/irmin/issues/239","labels_url":"https://api.github.com/repos/mirage/irmin/issues/239/labels{/name}","comments_url":"https://api.github.com/repos/mirage/irmin/issues/239/comments","events_url":"https://api.github.com/repos/mirage/irmin/issues/239/events","html_url":"https://github.com/mirage/irmin/issues/239","id":95535204,"number":239,"title":"\"git status\" crashes in simple repository","user":{"login":"stevvooe","id":120601,"avatar_url":"https://avatars.githubusercontent.com/u/120601?v=3","gravatar_id":"","url":"https://api.github.com/users/stevvooe","html_url":"https://github.com/stevvooe","followers_url":"https://api.github.com/users/stevvooe/followers","following_url":"https://api.github.com/users/stevvooe/following{/other_user}","gists_url":"https://api.github.com/users/stevvooe/gists{/gist_id}","starred_url":"https://api.github.com/users/stevvooe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevvooe/subscriptions","organizations_url":"https://api.github.com/users/stevvooe/orgs","repos_url":"https://api.github.com/users/stevvooe/repos","events_url":"https://api.github.com/users/stevvooe/events{/privacy}","received_events_url":"https://api.github.com/users/stevvooe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-16T21:34:23Z","updated_at":"2015-07-16T21:34:23Z","closed_at":null,"body":"`git` crashes when running the following on the repository:\r\n\r\n```\r\n$ git status\r\ngit(7631,0x7fff7c15d300) malloc: *** error for object 0x7fc351c05ec0: pointer being freed was not allocated\r\n*** set a breakpoint in malloc_error_break to debug\r\n```\r\n\r\nThese are the commands that were used to create the irmin repo:\r\n\r\n```\r\n10248  irmin init\r\n10251  irmin ls\r\n10252  irmin ls /\r\n10253  irmin write foo\r\n10254  irmin write foo asdf\r\n10255  irmin\r\n10256  irmin ls /\r\n10258  irmin write foo <(echo hello)\r\n10259  irmin read foo\r\n10260  irmin write foo bar\r\n10261  irmin read foo\r\n10373  irmin read foo\r\n10374  irmin write bar baz\r\n10381  irmin write bar baz\r\n10382  irmin write bar bazoo\r\n```\r\n\r\nI am not sure which sequence caused the crash.\r\n\r\nHere is the git version:\r\n\r\n```console\r\n$ git version\r\ngit version 2.1.3\r\n```\r\n\r\n```console\r\n$ uname -a\r\nDarwin Stephens-MacBook-Pro-2.local 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64\r\n```\r\n\r\nHere is a full run with the lldb dump:\r\n\r\n```console\r\n$ git status\r\nProcess 7767 launched: '/usr/local/bin/git' (x86_64)\r\ngit(7767,0x7fff7c15d300) malloc: *** error for object 0x100400b60: pointer being freed was not allocated\r\n*** set a breakpoint in malloc_error_break to debug\r\nProcess 7767 stopped\r\n* thread #1: tid = 0x1ab413, 0x00007fff8e475286 libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT\r\n    frame #0: 0x00007fff8e475286 libsystem_kernel.dylib`__pthread_kill + 10\r\nlibsystem_kernel.dylib`__pthread_kill:\r\n->  0x7fff8e475286 <+10>: jae    0x7fff8e475290            ; <+20>\r\n    0x7fff8e475288 <+12>: movq   %rax, %rdi\r\n    0x7fff8e47528b <+15>: jmp    0x7fff8e470c53            ; cerror_nocancel\r\n    0x7fff8e475290 <+20>: retq\r\n(lldb) bt\r\n* thread #1: tid = 0x1ab413, 0x00007fff8e475286 libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT\r\n  * frame #0: 0x00007fff8e475286 libsystem_kernel.dylib`__pthread_kill + 10\r\n    frame #1: 0x00007fff9288142f libsystem_pthread.dylib`pthread_kill + 90\r\n    frame #2: 0x00007fff8ae01b53 libsystem_c.dylib`abort + 129\r\n    frame #3: 0x00007fff95d55937 libsystem_malloc.dylib`free + 428\r\n    frame #4: 0x000000010009579a git`diff_flush + 7074\r\n    frame #5: 0x000000010008f03a git`run_diff_index + 107\r\n    frame #6: 0x0000000100108ef6 git`wt_status_collect + 714\r\n    frame #7: 0x000000010001d078 git`cmd_status + 336\r\n    frame #8: 0x0000000100002117 git`handle_builtin + 492\r\n    frame #9: 0x0000000100001a91 git`main + 285\r\n    frame #10: 0x00007fff98f455c9 libdyld.dylib`start + 1\r\n    frame #11: 0x00007fff98f455c9 libdyld.dylib`start + 1\r\n```\r\n\r\nPlease let me know if you have more questions."}}