{"thread":{"id":"10257","subject":"git-fast-import crashes","startedAt":"2007-10-12T09:42:17Z","lastAt":"2007-10-16T08:04:05Z","messageCount":13,"participants":["Shun Kei Leung","Shawn O. Pearce","Pierre Habouzit","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"55535","messageId":"e66701d40710120242p6fc05148hd40d19d295373ac4@mail.gmail.com","threadId":"10257","inReplyTo":null,"subject":"git-fast-import crashes","fromName":"Shun Kei Leung","fromEmail":"kevinlsk@gmail.com","sentAt":"2007-10-12T09:42:17Z","receivedAt":"2007-10-12T09:42:17Z","isPatch":false,"sender":{"key":"kevinlsk@gmail.com","avatar":null},"body":"Hi all,\n\nI am using git 1.5.3.4.206.g58ba4-dirty on Mac OS X 10.4. When I tried\nto run `git-p4 rebase', it failed with a broken pipe to\n`git-fast-import'. I gather the following from GDB. I am kind of\nstuck. Does anyone have any idea what's going on?\n\n\nProgram received signal EXC_BAD_ACCESS, Could not access memory.\nReason: KERN_INVALID_ADDRESS at address: 0x64617469\nin_window (win=0x5004d0, offset=3501) at sha1_file.c:701\n701             off_t win_off = win->offset;\n(gdb) bt\n#0  in_window (win=0x5004d0, offset=3501) at sha1_file.c:701\n#1  0x0000a7b0 in use_pack (p=0x500740, w_cursor=0xbfffd328,\noffset=3501, left=0xbfffd2c8) at sha1_file.c:728\n#2  0x0000aaa0 in unpack_object_header (p=0x64617461, w_curs=0x0,\ncurpos=0xbfffd330, sizep=0xbffff4ec) at sha1_file.c:1329\n#3  0x0000e17c in unpack_entry (p=0x500740, obj_offset=3501,\ntype=0xbffff4e8, sizep=0xbffff4ec) at sha1_file.c:1591\n#4  0x0000dc8c in read_packed_sha1 (sha1=0x64617461 <Address\n0x64617461 out of bounds>, type=0xbffff4e8, size=0xbffff4ec) at\nsha1_file.c:1811\n#5  0x0000dd90 in read_sha1_file (sha1=0xbffff4f0\n\")S??=?P\\r?6[?w?S[\\021\\004??\", type=0xbffff4e8, size=0xbffff4ec) at\nsha1_file.c:1877\n#6  0x0000e020 in read_object_with_reference (sha1=0x100950b\n\")S??=?P\\r?6[?w?S[\\021\\004??\", required_type_name=0x0,\nsize=0xbffff578, actual_sha1_return=0x100950b\n\")S??=?P\\r?6[?w?S[\\021\\004??\") at sha1_file.c:1906\n#7  0x0000450c in cmd_from_existing (b=0x10094c0) at fast-import.c:1922\n#8  0x00004b3c in cmd_from (b=0x10094c0) at fast-import.c:1965\n#9  0x000078a0 in cmd_new_commit () at fast-import.c:2044\n#10 0x000088f0 in main (argc=213252, argv=0xbffff838) at fast-import.c:2329\n(gdb) print win\n$1 = (struct pack_window *) 0x5004d0\n(gdb) print *win\n$2 = {\n  next = 0x64617461,\n  base = 0x20333936 <Address 0x20333936 out of bounds>,\n  offset = 22523564414626158,\n  len = 1685026675,\n  last_used = 795894075,\n  inuse_cnt = 0\n}\n\n\nRegards,\nKevin Leung\n"},{"id":"55586","messageId":"20071013032916.GL27899@spearce.org","threadId":"10257","inReplyTo":"e66701d40710120242p6fc05148hd40d19d295373ac4@mail.gmail.com","subject":"Re: git-fast-import crashes","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-10-13T03:29:16Z","receivedAt":"2007-10-13T03:29:16Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Shun Kei Leung <kevinlsk@gmail.com> wrote:\n> Program received signal EXC_BAD_ACCESS, Could not access memory.\n> Reason: KERN_INVALID_ADDRESS at address: 0x64617469\n> in_window (win=0x5004d0, offset=3501) at sha1_file.c:701\n> 701             off_t win_off = win->offset;\n...\n> (gdb) print win\n> $1 = (struct pack_window *) 0x5004d0\n> (gdb) print *win\n> $2 = {\n>   next = 0x64617461,\n>   base = 0x20333936 <Address 0x20333936 out of bounds>,\n>   offset = 22523564414626158,\n>   len = 1685026675,\n>   last_used = 795894075,\n>   inuse_cnt = 0\n> }\n\nWow.  There's no way that struct pack_window is valid anymore.\nThe base isn't a valid address.  The offset cannot possibly be\ncorrect (you don't have that big of a packfile, do you?!\n\nWhat does `git count-objects -v` give you?  I'm specifically\ninterested in how many packfiles you have.  The other thing that\nmay be interesting to see is the value of pack_open_windows and\npeak_pack_open_windows (file scope in sha1_file.c).\n\nThen again, maybe that isn't interesting.  This looks like it is\nmemory corruption (e.g. someone overwriting a free'd segment),\nbut that sort of memory corruption is very hard to track down.\n\n-- \nShawn.\n"},{"id":"55587","messageId":"20071013033407.GM27899@spearce.org","threadId":"10257","inReplyTo":"20071013032916.GL27899@spearce.org","subject":"Re: git-fast-import crashes","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-10-13T03:34:07Z","receivedAt":"2007-10-13T03:34:07Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> wrote:\n> Shun Kei Leung <kevinlsk@gmail.com> wrote:\n> > I am using git 1.5.3.4.206.g58ba4-dirty on Mac OS X 10.4.\n...\n> > Program received signal EXC_BAD_ACCESS, Could not access memory.\n> > Reason: KERN_INVALID_ADDRESS at address: 0x64617469\n...\n> This looks like it is\n> memory corruption (e.g. someone overwriting a free'd segment),\n> but that sort of memory corruption is very hard to track down.\n\nOK, so the version you have (58ba4) is the latest fast-import after\nthe strbuf.c series went in.  The one immediately before that series\nwas 4bf538 and is probably actually stable.\n\nSo I wonder, can you test 4bf538 and then if it is good bisect\nbetween those two commits?  There must be a memory corruption\nintroduced by one of the strbuf changes...\n\n-- \nShawn.\n"},{"id":"55593","messageId":"20071013073640.GC7110@artemis.corp","threadId":"10257","inReplyTo":"20071013033407.GM27899@spearce.org","subject":"Re: git-fast-import crashes","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2007-10-13T07:36:40Z","receivedAt":"2007-10-13T07:36:40Z","isPatch":false,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"On Sat, Oct 13, 2007 at 03:34:07AM +0000, Shawn O. Pearce wrote:\n> \"Shawn O. Pearce\" <spearce@spearce.org> wrote:\n> > Shun Kei Leung <kevinlsk@gmail.com> wrote:\n> > > I am using git 1.5.3.4.206.g58ba4-dirty on Mac OS X 10.4.\n> ....\n> > > Program received signal EXC_BAD_ACCESS, Could not access memory.\n> > > Reason: KERN_INVALID_ADDRESS at address: 0x64617469\n> ....\n> > This looks like it is\n> > memory corruption (e.g. someone overwriting a free'd segment),\n> > but that sort of memory corruption is very hard to track down.\n> \n> OK, so the version you have (58ba4) is the latest fast-import after\n> the strbuf.c series went in.  The one immediately before that series\n> was 4bf538 and is probably actually stable.\n> \n> So I wonder, can you test 4bf538 and then if it is good bisect\n> between those two commits?  There must be a memory corruption\n> introduced by one of the strbuf changes...\n\n  Gasp, if you get the offending sha1 commit, don't forget to Cc: me.\n\n-- \n·O·  Pierre Habouzit\n··O                                                madcoder@debian.org\nOOO                                                http://www.madism.org\n"},{"id":"55594","messageId":"20071013075027.GD7110@artemis.corp","threadId":"10257","inReplyTo":"20071013073640.GC7110@artemis.corp","subject":"Re: git-fast-import crashes","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2007-10-13T07:50:27Z","receivedAt":"2007-10-13T07:50:27Z","isPatch":false,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"On sam, oct 13, 2007 at 07:36:40 +0000, Pierre Habouzit wrote:\n> On Sat, Oct 13, 2007 at 03:34:07AM +0000, Shawn O. Pearce wrote:\n> > \"Shawn O. Pearce\" <spearce@spearce.org> wrote:\n> > > Shun Kei Leung <kevinlsk@gmail.com> wrote:\n> > > > I am using git 1.5.3.4.206.g58ba4-dirty on Mac OS X 10.4.\n> > ....\n> > > > Program received signal EXC_BAD_ACCESS, Could not access memory.\n> > > > Reason: KERN_INVALID_ADDRESS at address: 0x64617469\n> > ....\n> > > This looks like it is\n> > > memory corruption (e.g. someone overwriting a free'd segment),\n> > > but that sort of memory corruption is very hard to track down.\n> > \n> > OK, so the version you have (58ba4) is the latest fast-import after\n> > the strbuf.c series went in.  The one immediately before that series\n> > was 4bf538 and is probably actually stable.\n> > \n> > So I wonder, can you test 4bf538 and then if it is good bisect\n> > between those two commits?  There must be a memory corruption\n> > introduced by one of the strbuf changes...\n> \n>   Gasp, if you get the offending sha1 commit, don't forget to Cc: me.\n\n  Okay, given that fast-import uses quote_c_style, I believe this is the\nsame but that the one that was reported already. I've read the full\n`git diff 4bf53833dbca666f61b5177977e96d453527db20.. -- fast-import.c`\nand nothing alarming shows up.\n\n  Please try to apply:\nhttp://git.madism.org/?p=git.git;a=commit;h=7406e83342cd445ac38c1753c5fce75377737e2f\n\n  And see if that fixes the issue for you. Else a bisection would be\nmuch appreciated. Thanks.\n\n-- \n·O·  Pierre Habouzit\n··O                                                madcoder@debian.org\nOOO                                                http://www.madism.org\n"},{"id":"55599","messageId":"Pine.LNX.4.64.0710131357391.25221@racer.site","threadId":"10257","inReplyTo":"20071013032916.GL27899@spearce.org","subject":"Re: git-fast-import crashes","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-13T12:58:24Z","receivedAt":"2007-10-13T12:58:24Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 12 Oct 2007, Shawn O. Pearce wrote:\n\n> Shun Kei Leung <kevinlsk@gmail.com> wrote:\n> > Program received signal EXC_BAD_ACCESS, Could not access memory.\n> > Reason: KERN_INVALID_ADDRESS at address: 0x64617469\n> > in_window (win=0x5004d0, offset=3501) at sha1_file.c:701\n> > 701             off_t win_off = win->offset;\n> ...\n> > (gdb) print win\n> > $1 = (struct pack_window *) 0x5004d0\n> > (gdb) print *win\n> > $2 = {\n> >   next = 0x64617461,\n> >   base = 0x20333936 <Address 0x20333936 out of bounds>,\n> >   offset = 22523564414626158,\n> >   len = 1685026675,\n> >   last_used = 795894075,\n> >   inuse_cnt = 0\n> > }\n> \n> Wow.  There's no way that struct pack_window is valid anymore.\n>\n> [...] \n>\n> This looks like it is memory corruption (e.g. someone overwriting a \n> free'd segment), but that sort of memory corruption is very hard to \n> track down.\n\nI found valgrind invaluable to find such errors.\n\nCiao,\nDscho\n"},{"id":"55813","messageId":"e66701d40710142153o70a7b696r928491be437ac6d@mail.gmail.com","threadId":"10257","inReplyTo":"20071013075027.GD7110@artemis.corp","subject":"Re: git-fast-import crashes","fromName":"Shun Kei Leung","fromEmail":"kevinlsk@gmail.com","sentAt":"2007-10-15T04:53:38Z","receivedAt":"2007-10-15T04:53:38Z","isPatch":false,"sender":{"key":"kevinlsk@gmail.com","avatar":null},"body":"Hi,\n\nSorry for the late reply. I was away from my computer in the weekend.\n\n\nHi Pierre,\n\nI didn't try:\nhttp://git.madism.org/?p=git.git;a=commit;h=7406e83342cd445ac38c1753c5fce75377737e2f\n\nbecause the bad commit turns out to be b449f4c according to `git bisect'.\n\n\nHi Shawn,\n\nI include the output of `git count-objects -v' for your information:\n\ncount: 104\nsize: 552\nin-pack: 10652\npacks: 12\nprune-packable: 0\ngarbage: 0\n\n\nRegards,\nKevin Leung\n"},{"id":"55826","messageId":"20071015073307.GA1508@artemis.corp","threadId":"10257","inReplyTo":"e66701d40710142153o70a7b696r928491be437ac6d@mail.gmail.com","subject":"Re: git-fast-import crashes","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2007-10-15T07:33:07Z","receivedAt":"2007-10-15T07:33:07Z","isPatch":false,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"On Mon, Oct 15, 2007 at 04:53:38AM +0000, Shun Kei Leung wrote:\n> Hi,\n> \n> Sorry for the late reply. I was away from my computer in the weekend.\n> \n> \n> Hi Pierre,\n> \n> I didn't try:\n> http://git.madism.org/?p=git.git;a=commit;h=7406e83342cd445ac38c1753c5fce75377737e2f\n> \n> because the bad commit turns out to be b449f4c according to `git bisect'.\n\n  I don't get the reason for your \"because\" but so be it. The commit you\nshow is not obviously broken to me, especially not in fast-import.c, so\nI'll need more input.  Could you please run your test in valgrind and\nreport the output please? Or if the data to reproduce the bug are online\nor shareable, it'd be great to share, so that I can reproduce the issue\nhere.\n\n\n-- \n·O·  Pierre Habouzit\n··O                                                madcoder@debian.org\nOOO                                                http://www.madism.org\n"},{"id":"55828","messageId":"e66701d40710150119y7c9e0ff6n83c5fbd25d351fc6@mail.gmail.com","threadId":"10257","inReplyTo":"20071015073307.GA1508@artemis.corp","subject":"Re: git-fast-import crashes","fromName":"Shun Kei Leung","fromEmail":"kevinlsk@gmail.com","sentAt":"2007-10-15T08:19:35Z","receivedAt":"2007-10-15T08:19:35Z","isPatch":false,"sender":{"key":"kevinlsk@gmail.com","avatar":null},"body":">   I don't get the reason for your \"because\" but so be it.\n\nWell, my reasoning was that the commit didn't touch the convert.c. But\nafter re-reading the patch, I think I should apply and test with the\npatch again.\n\n...\n> Or if the data to reproduce the bug are online\n> or shareable, it'd be great to share, so that I can reproduce the issue\n> here.\n\nThe repository is private, and it is in maintenance mode for the rest\nof today. I will get back to you tomorrow with updates.\n\n\nThanks & regards,\nKevin Leung\n"},{"id":"55969","messageId":"e66701d40710160013h270f685sef57f80382089f3c@mail.gmail.com","threadId":"10257","inReplyTo":"e66701d40710150119y7c9e0ff6n83c5fbd25d351fc6@mail.gmail.com","subject":"Re: git-fast-import crashes","fromName":"Shun Kei Leung","fromEmail":"kevinlsk@gmail.com","sentAt":"2007-10-16T07:13:31Z","receivedAt":"2007-10-16T07:13:31Z","isPatch":false,"sender":{"key":"kevinlsk@gmail.com","avatar":null},"body":"Hi Pierre,\n\nI have tested with your patch applied, and it still crashed badly.\n\nI compiled the b449f4c version and I got a different backtrace from\nGDB. I am still not sure about how the error occurs. I attached the\nmemory usage from various command line tools.\n\nRegards,\nKevin Leung\n\n\n\nGDB output\n===========\n\nProgram received signal EXC_BAD_ACCESS, Could not access memory.\nReason: KERN_INVALID_ADDRESS at address: 0x756c7463\n0x90018d0c in szone_realloc ()\n(gdb) bt\n#0  0x90018d0c in szone_realloc ()\n#1  0x90018898 in realloc ()\n#2  0x0001f8c8 in strbuf_grow (sb=0x75ef8, extra=0) at git-compat-util.h:223\n#3  0x0001fc14 in read_line (sb=0x75ef8, fp=0xa0001b9c, term=10) at strbuf.c:107\n#4  0x00002da8 in read_next_command () at fast-import.c:1599\n#5  0x0000742c in cmd_new_commit () at fast-import.c:2118\n#6  0x00007e80 in main (argc=1, argv=0xbffff828) at fast-import.c:2390\n(gdb) frame 3\n#3  0x0001fc14 in read_line (sb=0x75ef8, fp=0xa0001b9c, term=10) at strbuf.c:107\n107                     strbuf_grow(sb, 1);\n(gdb) print *sb\n$1 = {\n  alloc = 60,\n  len = 23,\n  eof = 0,\n  buf = 0x5020b0 \"D windows/packages/cdc/ces/adm\"\n}\n(gdb) frame 2\n#2  0x0001f8c8 in strbuf_grow (sb=0x75ef8, extra=0) at git-compat-util.h:223\n223             void *ret = realloc(ptr, size);\n(gdb) print (char *) ptr\n$2 = 0x5020b0 \"D windows/packages/cdc/ces/adm\"\n(gdb) print (char *)ret\n$3 = 0xd <Address 0xd out of bounds>\n(gdb)\n\n\nThe output of `leaks'\n=================\n\nProcess 27075: 88 nodes malloced for 2335 KB\nProcess 27075: 6 leaks for 624 total leaked bytes.\nLeak: 0x005012b0  size=208      string 'EOT'\nLeak: 0x00501e60  size=128      string 'EOT'\nLeak: 0x00501c80  size=128      string 'EOT'\nLeak: 0x00500f10  size=64       string 'EOT'\nLeak: 0x00501fa0  size=64       string 'EOT'\nLeak: 0x00501f60  size=32\n        0x00000000 0x02008000 0x00000000 0x01000000     ................\n        0x02000000 0x0000001a 0x00000000 0x00000000     ................\n\n\n\nBelow is the output of `malloc_history'\n==============================\n\nDeallocation of 5020b0 - no corresponding allocation\n67 calls for 2874 bytes: thread_a000ed88 |0x0 | start | _start | main\n| cmd_new_commit | read_next_command | read_line | strbuf_grow\n\n12 calls for 2016 bytes: thread_a000ed88 |0x0 | start | _start | main\n| prepare_packed_git | prepare_packed_git_one | add_packed_git\n\n8 calls for 831 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | cmd_data | read_line | strbuf_grow\n\n4 calls for 160 bytes: thread_a000ed88 |0x0 | start | _start |\n__keymgr_dwarf2_register_sections | _dyld_register_func_for_add_image\n| dyld::registerAddCallback(void (*)(mach_header const*, long)) |\nImageLoader::runNotification(ImageLoader::LinkContext const&,\nunsigned) | ImageLoader::recursiveImageNotification(ImageLoader::LinkContext\nconst&, unsigned) | dyld::imageNotification(ImageLoader*, unsigned) |\ndwarf2_unwind_dyld_add_image_hook\n\n3 calls for 1976 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | tree_content_set | load_tree |\nread_sha1_file | read_packed_sha1 | unpack_entry | unpack_entry |\npatch_delta\n\n3 calls for 84 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | tree_content_set | load_tree |\nread_sha1_file | read_packed_sha1 | unpack_entry |\nunpack_object_header | use_pack\n\n2 calls for 1200 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | load_tree | read_sha1_file |\nread_packed_sha1 | unpack_entry | unpack_entry | unpack_entry |\nunpack_entry | patch_delta\n\n2 calls for 1200 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | load_tree | read_sha1_file |\nread_packed_sha1 | unpack_entry | unpack_entry | unpack_entry |\npatch_delta\n\n2 calls for 1200 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | load_tree | read_sha1_file |\nread_packed_sha1 | unpack_entry | unpack_entry | patch_delta\n\n2 calls for 80 bytes: thread_a000ed88 |0x0 | start | _start |\n__keymgr_dwarf2_register_sections | _dyld_register_func_for_add_image\n| dyld::registerAddCallback(void (*)(mach_header const*, long)) |\nImageLoader::runNotification(ImageLoader::LinkContext const&,\nunsigned) | ImageLoader::recursiveImageNotification(ImageLoader::LinkContext\nconst&, unsigned) | dyld::imageNotification(ImageLoader*, unsigned) |\ndwarf2_unwind_dyld_add_image_hook\n\n2 calls for 56 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | load_tree | read_sha1_file |\nread_packed_sha1 | unpack_entry | unpack_object_header | use_pack\n\n1 calls for 2097152 bytes: thread_a000ed88 |0x0 | start | _start |\nmain | pool_calloc | pool_alloc\n\n1 calls for 160012 bytes: thread_a000ed88 |0x0 | start | _start | main\n| alloc_objects\n\n1 calls for 52000 bytes: thread_a000ed88 |0x0 | start | _start | main\n| cmd_new_commit | load_tree | new_tree_entry\n\n1 calls for 17804 bytes: thread_a000ed88 |0x0 | start | _start | main\n\n1 calls for 8192 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | cmd_data\n\n1 calls for 4156 bytes: thread_a000ed88 |0x0 | start | _start | main\n\n1 calls for 4096 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | store_tree | store_tree | store_tree | mktree |\nsize_dbuf\n\n1 calls for 4096 bytes: thread_a000ed88 |0x0 | start | _start | main |\nread_next_command | read_line | fgetc | __srget | __srefill |\n__smakebuf\n\n1 calls for 3072 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | store_tree | store_tree | store_tree | mktree |\nsize_dbuf\n\n1 calls for 2048 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | size_dbuf\n\n1 calls for 1149 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | tree_content_set | load_tree |\nread_sha1_file | read_packed_sha1 | unpack_entry | unpack_entry |\nunpack_entry | patch_delta\n\n1 calls for 1149 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | tree_content_set | load_tree |\nread_sha1_file | read_packed_sha1 | unpack_entry | unpack_entry |\nunpack_entry | unpack_entry | unpack_compressed_entry\n\n1 calls for 1032 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | load_tree | read_sha1_file |\nread_packed_sha1 | unpack_entry | unpack_entry | unpack_entry |\nunpack_entry | unpack_entry | unpack_entry | unpack_compressed_entry\n\n1 calls for 822 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | tree_content_set |\ntree_content_set | load_tree | read_sha1_file | read_packed_sha1 |\nunpack_entry | unpack_entry | unpack_compressed_entry\n\n1 calls for 522 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | load_tree | read_sha1_file |\nread_packed_sha1 | unpack_entry | unpack_entry |\nunpack_compressed_entry\n\n1 calls for 436 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | tree_content_set |\ntree_content_set | tree_content_set | tree_content_set |\ntree_content_set | load_tree | read_sha1_file | read_packed_sha1 |\nunpack_entry | unpack_entry | unpack_compressed_entry\n\n1 calls for 400 bytes: thread_a000ed88 |0x0 | start | _start | main\n\n1 calls for 285 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | tree_content_set |\ntree_content_set | tree_content_set | load_tree | read_sha1_file |\nread_packed_sha1 | unpack_entry | unpack_entry |\nunpack_compressed_entry\n\n1 calls for 258 bytes: thread_a000ed88 |0x0 | start | _start | main |\nstart_packfile | mkstemp | arc4random\n\n1 calls for 212 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | tree_content_set |\ntree_content_set | tree_content_set | tree_content_set | load_tree |\nread_sha1_file | read_packed_sha1 | unpack_entry | unpack_entry |\nunpack_compressed_entry\n\n1 calls for 168 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | load_tree | read_sha1_file |\nread_packed_sha1 | unpack_entry | unpack_entry | unpack_entry |\nunpack_entry | unpack_entry | unpack_entry | patch_delta\n\n1 calls for 168 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | load_tree | read_sha1_file |\nread_packed_sha1 | unpack_entry | unpack_entry | unpack_entry |\nunpack_entry | unpack_entry | unpack_entry | unpack_entry |\nunpack_entry | patch_delta\n\n1 calls for 168 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | load_tree | read_sha1_file |\nread_packed_sha1 | unpack_entry | unpack_entry | unpack_entry |\nunpack_entry | unpack_entry | unpack_entry | unpack_entry |\nunpack_entry | unpack_entry | patch_delta\n\n1 calls for 168 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | load_tree | read_sha1_file |\nread_packed_sha1 | unpack_entry | unpack_entry | unpack_entry |\nunpack_entry | unpack_entry | unpack_entry | unpack_entry |\nunpack_entry | unpack_entry | unpack_entry | unpack_compressed_entry\n\n1 calls for 168 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | load_tree | read_sha1_file |\nread_packed_sha1 | unpack_entry | unpack_entry | unpack_entry |\nunpack_entry | unpack_entry | unpack_entry | unpack_entry |\npatch_delta\n\n1 calls for 129 bytes: thread_a000ed88 |0x0 | start | _start | main |\nstart_packfile\n\n1 calls for 122 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | tree_content_set | load_tree |\nread_sha1_file | read_packed_sha1 | unpack_entry | unpack_entry |\nunpack_compressed_entry\n\n1 calls for 64 bytes: thread_a000ed88 |0x0 | start | _start | main |\ngit_config | git_path | get_git_dir | setup_git_env | sprintf$LDBL128\n| __vfprintf$LDBL128 | localeconv_l\n\n1 calls for 61 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | parse_ident\n\n1 calls for 60 bytes: thread_a000ed88 |0x0 | start | _start |\n__keymgr_dwarf2_register_sections | _dyld_register_func_for_add_image\n| dyld::registerAddCallback(void (*)(mach_header const*, long)) |\nImageLoader::runNotification(ImageLoader::LinkContext const&,\nunsigned) | dyld::imageNotification(ImageLoader*, unsigned) |\ndwarf2_unwind_dyld_add_image_hook |\n_keymgr_get_and_lock_processwide_ptr_2 | get_or_create_key_element\n\n1 calls for 52 bytes: thread_a000ed88 |0x0 | start | _start | main |\ngit_config | git_path | get_git_dir | setup_git_env | strdup\n\n1 calls for 48 bytes: thread_a000ed88 |0x0 | start | _start | main |\ngit_config | git_path | get_git_dir | setup_git_env\n\n1 calls for 46 bytes: thread_a000ed88 |0x0 | start | _start | main |\ngit_config | git_path | get_git_dir | setup_git_env\n\n1 calls for 45 bytes: thread_a000ed88 |0x0 | start | _start | main |\ngit_config | git_path | get_git_dir | setup_git_env\n\n1 calls for 40 bytes: thread_a000ed88 |0x0 | start | _start |\n__keymgr_dwarf2_register_sections | _dyld_register_func_for_add_image\n| dyld::registerAddCallback(void (*)(mach_header const*, long)) |\nImageLoader::runNotification(ImageLoader::LinkContext const&,\nunsigned) | dyld::imageNotification(ImageLoader*, unsigned) |\ndwarf2_unwind_dyld_add_image_hook\n\n1 calls for 40 bytes: thread_a000ed88 |0x0 | start | _start |\n__keymgr_dwarf2_register_sections | _dyld_register_func_for_add_image\n| dyld::registerAddCallback(void (*)(mach_header const*, long)) |\nImageLoader::runNotification(ImageLoader::LinkContext const&,\nunsigned) | ImageLoader::recursiveImageNotification(ImageLoader::LinkContext\nconst&, unsigned) | dyld::imageNotification(ImageLoader*, unsigned) |\ndwarf2_unwind_dyld_add_image_hook\n\n1 calls for 28 bytes: thread_a000ed88 |0x0 | start | _start | main |\ncmd_new_commit | tree_content_set | tree_content_set |\ntree_content_set | tree_content_set | tree_content_set |\ntree_content_set | load_tree | read_sha1_file | read_packed_sha1 |\nunpack_entry | unpack_object_header | use_pack\n\n1 calls for 18 bytes: thread_a000ed88 |0x0 | start | _start |\n__keymgr_dwarf2_register_sections | _dyld_register_func_for_add_image\n| dyld::registerAddCallback(void (*)(mach_header const*, long)) |\nImageLoader::runNotification(ImageLoader::LinkContext const&,\nunsigned) | dyld::imageNotification(ImageLoader*, unsigned) |\ndwarf2_unwind_dyld_add_image_hook | calloc\n\n1 calls for 4 bytes: thread_a000ed88 |0x0 | start | _start | main |\nstart_packfile\n\n\nOutput of `vmmap'\n===============\n\nVirtual Memory Map of process 27270 (git-fast-import)\nOutput report format:  2.0\n\n==== Non-writable regions for process 27270\n__PAGEZERO             00000000-00001000 [    4K] ---/--- SM=NUL\n/Users/developer/bin/git-fast-import\n__TEXT                 00001000-00034000 [  204K] r-x/rwx SM=COW\n/Users/developer/bin/git-fast-import\n__LINKEDIT             00080000-000f3000 [  460K] r--/rwx SM=COW\n/Users/developer/bin/git-fast-import\nmapped file            000f7000-000f8000 [    4K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-b7cda23e237f38b466d2f7b54f665a7d0c8a32ed.idx\nmapped file            000f8000-000f9000 [    4K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-5f301a4b08a7f7d44b288f2a96d33f3c3efbf7fb.idx\nmapped file            000f9000-000fa000 [    4K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-ee6298d97a1154422169e66d6655071a49cb8686.idx\n__TEXT                 00205000-00216000 [   68K] r-x/rwx SM=COW\n/opt/local/lib/libz.1.dylib\n__LINKEDIT             00217000-00219000 [    8K] r--/rwx SM=COW\n/opt/local/lib/libz.1.dylib\n__TEXT                 00219000-00313000 [ 1000K] r-x/rwx SM=COW\n/opt/local/lib/libiconv.2.dylib\n__LINKEDIT             00314000-0031e000 [   40K] r--/rwx SM=COW\n/opt/local/lib/libiconv.2.dylib\n__TEXT                 0031e000-00421000 [ 1036K] r-x/rwx SM=COW\n/opt/local/lib/libcrypto.0.9.8.dylib\n__LINKEDIT             00438000-0048d000 [  340K] r--/rwx SM=COW\n/opt/local/lib/libcrypto.0.9.8.dylib\n__TEXT                 0048d000-004c8000 [  236K] r-x/rwx SM=COW\n/opt/local/lib/libssl.0.9.8.dylib\n__LINKEDIT             004cc000-004dd000 [   68K] r--/rwx SM=COW\n/opt/local/lib/libssl.0.9.8.dylib\nmapped file            004dd000-004df000 [    8K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-5f301a4b08a7f7d44b288f2a96d33f3c3efbf7fb.pack\nmapped file            004ec000-004ed000 [    4K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-ea2fe30b68a19c9cd6a4bf1dd345377b4dd77df0.idx\nmapped file            004ed000-004ee000 [    4K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-97e365a44e20cb37576362c81afdaa879a871a10.idx\nmapped file            004ee000-004ef000 [    4K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-f1bcc0635a35caff73d8ccac60ec6656f0527a10.idx\nmapped file            004ef000-004f0000 [    4K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-f1bcc0635a35caff73d8ccac60ec6656f0527a10.pack\nmapped file            004f0000-004f1000 [    4K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-60dd3fcceddf3eacbe2279ef191f87668b97fb57.idx\nmapped file            004f1000-004f2000 [    4K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-8a733b7ccad3eb85b4286a011eccdff20441d9e4.idx\nmapped file            004f2000-004f7000 [   20K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-8acbc2151777eb8a2093e5229897d5711dab175b.idx\nmapped file            004f7000-004fa000 [   12K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-3d264397b577400c2277f1b89f2065e0cc9846e3.idx\nmapped file            004fa000-004fc000 [    8K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-010e1c06a07ef38c31f8e01782eeda433b007709.idx\nmapped file            004fc000-00500000 [   16K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-ea2fe30b68a19c9cd6a4bf1dd345377b4dd77df0.pack\nmapped file            006ad000-006e4000 [  220K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-3294c669f264ef7a21e2280bfd934e7459140022.idx\nmapped file            01208000-01363000 [ 1388K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-8acbc2151777eb8a2093e5229897d5711dab175b.pack\nmapped file            01363000-0146c000 [ 1060K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-010e1c06a07ef38c31f8e01782eeda433b007709.pack\nmapped file            02008000-052fe000 [52184K] r--/rwx SM=COW\n/Volumes/data/kevin/test_gitp4/cdc/.git/objects/pack/pack-3294c669f264ef7a21e2280bfd934e7459140022.pack\n__TEXT                 8fe00000-8fe01000 [    4K] r-x/rwx SM=COW  /usr/lib/dyld\n__TEXT                 8fe01000-8fe02000 [    4K] r-x/rwx SM=COW  /usr/lib/dyld\n__TEXT                 8fe02000-8fe53000 [  324K] r-x/rwx SM=COW  /usr/lib/dyld\n__LINKEDIT             8fe5d000-8fe71000 [   80K] r--/rwx SM=COW  /usr/lib/dyld\n__TEXT                 90000000-901bd000 [ 1780K] r-x/r-x SM=COW\n/usr/lib/libSystem.B.dylib\n__LINKEDIT             901bd000-90214000 [  348K] r--/r-- SM=COW\n/usr/lib/libSystem.B.dylib\n__TEXT                 90214000-9021a000 [   24K] r-x/r-x SM=COW\n/usr/lib/system/libmathCommon.A.dylib\n__LINKEDIT             9021a000-9021b000 [    4K] r--/r-- SM=COW\n/usr/lib/system/libmathCommon.A.dylib\n__TEXT                 91433000-9143f000 [   48K] r-x/r-x SM=COW\n/usr/lib/libgcc_s.1.dylib\n__LINKEDIT             9143f000-91443000 [   16K] r--/r-- SM=COW\n/usr/lib/libgcc_s.1.dylib\n__DATA                 a0214000-a0215000 [    4K] r--/r-- SM=COW\n/usr/lib/system/libmathCommon.A.dylib\nSTACK GUARD            fffec000-ffff0000 [   16K] ---/rwx SM=NUL\nsystem                 ffff8000-ffffa000 [    8K] r--/r-- SM=SHM\ncommpage [libSystem.B.dylib]\n\n==== Writable regions for process 27270\n__DATA                 00034000-00035000 [    4K] rw-/rwx SM=COW\n/Users/developer/bin/git-fast-import\n__DATA                 00035000-00080000 [  300K] rw-/rwx SM=PRV\n/Users/developer/bin/git-fast-import\nVM_ALLOCATE ?          000fa000-000fb000 [    4K] rw-/rwx SM=NUL\nMALLOC_LARGE           000fb000-00100000 [   20K] rw-/rwx SM=PRV\nDefaultMallocZone_0x500000\nMALLOC_TINY (freed?)   00100000-00102000 [    8K] rw-/rwx SM=COW\nMALLOC_TINY (freed?)   00102000-00205000 [ 1036K] rw-/rwx SM=ZER\n__DATA                 00216000-00217000 [    4K] rw-/rwx SM=COW\n/opt/local/lib/libz.1.dylib\n__DATA                 00313000-00314000 [    4K] rw-/rwx SM=COW\n/opt/local/lib/libiconv.2.dylib\n__DATA                 00421000-00435000 [   80K] rw-/rwx SM=COW\n/opt/local/lib/libcrypto.0.9.8.dylib\n__DATA                 00435000-00438000 [   12K] rw-/rwx SM=NUL\n/opt/local/lib/libcrypto.0.9.8.dylib\n__DATA                 004c8000-004cc000 [   16K] rw-/rwx SM=COW\n/opt/local/lib/libssl.0.9.8.dylib\nMALLOC_LARGE           004df000-004ec000 [   52K] rw-/rwx SM=PRV\nDefaultMallocZone_0x500000\nMALLOC_TINY            00500000-00605000 [ 1044K] rw-/rwx SM=COW\nDefaultMallocZone_0x500000\nPerformance tool data  00605000-00685000 [  512K] rw-/rwx SM=COW\nMALLOC_LARGE           00685000-006ad000 [  160K] rw-/rwx SM=PRV\nDefaultMallocZone_0x500000\nPerformance tool data  006e4000-006ed000 [   36K] rw-/rwx SM=COW\nMALLOC (freed?)        00800000-01008000 [ 8224K] rw-/rwx SM=PRV\nMALLOC_LARGE           01008000-01208000 [ 2048K] rw-/rwx SM=PRV\nDefaultMallocZone_0x500000\nMALLOC                 01800000-02008000 [ 8224K] rw-/rwx SM=COW\nDefaultMallocZone_0x500000\n__DATA                 8fe53000-8fe54000 [    4K] rw-/rwx SM=COW  /usr/lib/dyld\n__DATA                 8fe54000-8fe5a000 [   24K] rw-/rwx SM=COW  /usr/lib/dyld\n__DATA                 8fe5a000-8fe5d000 [   12K] rw-/rwx SM=PRV  /usr/lib/dyld\n__DATA                 a0000000-a0002000 [    8K] rw-/rw- SM=COW\n/usr/lib/libSystem.B.dylib\n__DATA                 a0002000-a0003000 [    4K] rw-/rw- SM=COW\n/usr/lib/libSystem.B.dylib\n__DATA                 a0003000-a0004000 [    4K] rw-/rw- SM=COW\n/usr/lib/libSystem.B.dylib\n__DATA                 a0004000-a0005000 [    4K] rw-/rw- SM=COW\n/usr/lib/libSystem.B.dylib\n__DATA                 a0005000-a000b000 [   24K] rw-/rw- SM=COW\n/usr/lib/libSystem.B.dylib\n__DATA                 a000b000-a0010000 [   20K] rw-/rw- SM=ZER\n/usr/lib/libSystem.B.dylib\n__DATA                 a0010000-a0011000 [    4K] rw-/rw- SM=COW\n/usr/lib/libSystem.B.dylib\n__DATA                 a0011000-a0012000 [    4K] rw-/rw- SM=ZER\n/usr/lib/libSystem.B.dylib\n__DATA                 a1433000-a1434000 [    4K] rw-/rw- SM=COW\n/usr/lib/libgcc_s.1.dylib\nStack                  bf800000-bffff000 [ 8188K] rw-/rwx SM=PRV\nStack                  bffff000-c0000000 [    4K] rw-/rwx SM=COW  thread 0\n\n==== Legend\nSM=sharing mode:\n        COW=copy_on_write PRV=private NUL=empty ALI=aliased\n        SHM=shared ZER=zero_filled S/A=shared_alias\n\n==== Summary for process 27270\nReadOnly portion of Libraries: Total=6092KB resident=2944KB(48%)\nswapped_out_or_unallocated=3148KB(52%)\nWritable regions: Total=30036KB written=504KB(2%) resident=968KB(3%)\nswapped_out=0KB(0%) unallocated=29068KB(97%)\n\nREGION TYPE             [ VIRTUAL]\n===========             [ =======]\nMALLOC                  [  20816K]\nPerformance tool data   [    548K]\nSTACK GUARD             [     16K]\nStack                   [   8192K]\nVM_ALLOCATE ?           [      4K]\n__DATA                  [    540K]\n__LINKEDIT              [   1364K]\n__PAGEZERO              [      4K]\n__TEXT                  [   4728K]\nmapped file             [  54952K]\nsystem                  [      8K]\n"},{"id":"55975","messageId":"20071016074645.GA6919@artemis.corp","threadId":"10257","inReplyTo":"e66701d40710160013h270f685sef57f80382089f3c@mail.gmail.com","subject":"Re: git-fast-import crashes","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2007-10-16T07:46:45Z","receivedAt":"2007-10-16T07:46:45Z","isPatch":false,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"On Tue, Oct 16, 2007 at 07:13:31AM +0000, Shun Kei Leung wrote:\n> Hi Pierre,\n> \n> I have tested with your patch applied, and it still crashed badly.\n\n  okay\n\n> I compiled the b449f4c version and I got a different backtrace from\n> GDB. I am still not sure about how the error occurs. I attached the\n> memory usage from various command line tools.\n\n  I believe you should rather test master as any of the strbuf stages is\nbroken for you, and that there has been some issues with strbuf fixed\nlately (not only the patch I asked you to try, but also an issue with\nempty strubufs, and you _need_ that patch).\n\n> GDB output\n> ===========\n> \n> Program received signal EXC_BAD_ACCESS, Could not access memory.\n> Reason: KERN_INVALID_ADDRESS at address: 0x756c7463\n> 0x90018d0c in szone_realloc ()\n> (gdb) bt\n> #0  0x90018d0c in szone_realloc ()\n> #1  0x90018898 in realloc ()\n> #2  0x0001f8c8 in strbuf_grow (sb=0x75ef8, extra=0) at git-compat-util.h:223\n> #3  0x0001fc14 in read_line (sb=0x75ef8, fp=0xa0001b9c, term=10) at strbuf.c:107\n> #4  0x00002da8 in read_next_command () at fast-import.c:1599\n> #5  0x0000742c in cmd_new_commit () at fast-import.c:2118\n> #6  0x00007e80 in main (argc=1, argv=0xbffff828) at fast-import.c:2390\n> (gdb) frame 3\n> #3  0x0001fc14 in read_line (sb=0x75ef8, fp=0xa0001b9c, term=10) at strbuf.c:107\n> 107                     strbuf_grow(sb, 1);\n> (gdb) print *sb\n> $1 = {\n>   alloc = 60,\n>   len = 23,\n>   eof = 0,\n>   buf = 0x5020b0 \"D windows/packages/cdc/ces/adm\"\n> }\n> (gdb) frame 2\n> #2  0x0001f8c8 in strbuf_grow (sb=0x75ef8, extra=0) at git-compat-util.h:223\n> 223             void *ret = realloc(ptr, size);\n> (gdb) print (char *) ptr\n> $2 = 0x5020b0 \"D windows/packages/cdc/ces/adm\"\n> (gdb) print (char *)ret\n> $3 = 0xd <Address 0xd out of bounds>\n\n  This does not make sense, ptr should be either valid or NULL.\n> The output of `leaks'\n> =================\n> \n> Process 27075: 88 nodes malloced for 2335 KB\n> Process 27075: 6 leaks for 624 total leaked bytes.\n> Leak: 0x005012b0  size=208      string 'EOT'\n> Leak: 0x00501e60  size=128      string 'EOT'\n> Leak: 0x00501c80  size=128      string 'EOT'\n> Leak: 0x00500f10  size=64       string 'EOT'\n> Leak: 0x00501fa0  size=64       string 'EOT'\n> Leak: 0x00501f60  size=32\n>         0x00000000 0x02008000 0x00000000 0x01000000     ................\n>         0x02000000 0x0000001a 0x00000000 0x00000000     ................\n\n  What I _really_ need is that you run your test into valgrind (the easy\nway is to rename git-fast-import into git-fast-import.bin, and make\ngit-fast-import be a shell-script doing:\n\n  exec valgrind --log-file /tmp/git-fast-import git-fast-import \"$@\"\n\n  and please send to me the /tmp/git-fast-import.<pid> from the one that\ncrashes.\n\n  And please do that on the most recent tip of master so that you have a\n(at least believe to be) full and sane strbuf series. Thanks.\n\n-- \n·O·  Pierre Habouzit\n··O                                                madcoder@debian.org\nOOO                                                http://www.madism.org\n"},{"id":"55980","messageId":"e66701d40710160101x5c697a6fmeecea4c81dfd9972@mail.gmail.com","threadId":"10257","inReplyTo":"20071016074645.GA6919@artemis.corp","subject":"Re: git-fast-import crashes","fromName":"Shun Kei Leung","fromEmail":"kevinlsk@gmail.com","sentAt":"2007-10-16T08:01:18Z","receivedAt":"2007-10-16T08:01:18Z","isPatch":false,"sender":{"key":"kevinlsk@gmail.com","avatar":null},"body":">   What I _really_ need is that you run your test into valgrind (the easy\n> way is to rename git-fast-import into git-fast-import.bin, and make\n> git-fast-import be a shell-script doing:\n...\n\nvalgrind is not yet ported to Mac OS X, sadly enough.\n\nRegards,\nKevin Leung\n"},{"id":"55981","messageId":"20071016080405.GC6919@artemis.corp","threadId":"10257","inReplyTo":"e66701d40710160101x5c697a6fmeecea4c81dfd9972@mail.gmail.com","subject":"Re: git-fast-import crashes","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2007-10-16T08:04:05Z","receivedAt":"2007-10-16T08:04:05Z","isPatch":false,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"On Tue, Oct 16, 2007 at 08:01:18AM +0000, Shun Kei Leung wrote:\n> >   What I _really_ need is that you run your test into valgrind (the easy\n> > way is to rename git-fast-import into git-fast-import.bin, and make\n> > git-fast-import be a shell-script doing:\n> ....\n> \n> valgrind is not yet ported to Mac OS X, sadly enough.\n\n  hmmm I see. hmmm isn't there _any_ chance that you can have access to\na linux box to see if that fails in the same conditions ? I mean I\nbelieve qemu (or virtual pc or …) on your macos would be just fine.\n\n  But this realloc() that returns 0xd looks fishy. I would be tempted to\nthink of a stack corruption, but the frame just before still looks\ncorrect so I'm confused. And valgrind is definitely the tool to use for\nstack smashing and other memory related corruptions :/\n\n  Using gcc -Wstack-protector may also help.\n\n-- \n·O·  Pierre Habouzit\n··O                                                madcoder@debian.org\nOOO                                                http://www.madism.org\n"}]}