{"thread":{"id":"3284","subject":"git-apply segfault.","startedAt":"2006-02-10T18:37:45Z","lastAt":"2006-02-10T19:41:27Z","messageCount":3,"participants":["Dave Jones","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"15852","messageId":"20060210183745.GI22611@redhat.com","threadId":"3284","inReplyTo":null,"subject":"git-apply segfault.","fromName":"Dave Jones","fromEmail":"davej@redhat.com","sentAt":"2006-02-10T18:37:45Z","receivedAt":"2006-02-10T18:37:45Z","isPatch":false,"sender":{"key":"davej@redhat.com","avatar":null},"body":"I managed to get git-apply to segfault.\n\n(18:35:37:davej@hera:agpgart)$ apply-mbox ~/Mail/mbox\n\nApplying 'help text updates'\n\n/home/davej/bin/applypatch: line 64: 17990 Segmentation fault      (core dumped) git-apply --index $PATCHFILE\n(18:35:40:davej@hera:agpgart)$ file core\ncore: ELF 64-bit LSB core file AMD x86-64, version 1 (SYSV), SVR4-style, from 'git-apply'\n(18:35:45:davej@hera:agpgart)$ gdb `which git-apply` core\nGNU gdb Red Hat Linux (6.3.0.0-1.84rh)\nCopyright 2004 Free Software Foundation, Inc.\nGDB is free software, covered by the GNU General Public License, and you are\nwelcome to change it and/or distribute copies of it under certain conditions.\nType \"show copying\" to see the conditions.\nThere is absolutely no warranty for GDB.  Type \"show warranty\" for details.\nThis GDB was configured as \"x86_64-redhat-linux-gnu\"...Using host libthread_db library \"/lib64/libthread_db.so.1\".\n\nCore was generated by `git-apply --index .dotest/patch'.\nProgram terminated with signal 11, Segmentation fault.\nReading symbols from /usr/lib64/libz.so.1...done.\nLoaded symbols for /usr/lib64/libz.so.1\nReading symbols from /lib64/libcrypto.so.5...done.\nLoaded symbols for /lib64/libcrypto.so.5\nReading symbols from /lib64/libc.so.6...done.\nLoaded symbols for /lib64/libc.so.6\nReading symbols from /lib64/libdl.so.2...done.\nLoaded symbols for /lib64/libdl.so.2\nReading symbols from /lib64/ld-linux-x86-64.so.2...done.\nLoaded symbols for /lib64/ld-linux-x86-64.so.2\n#0  0x0000003287f73474 in memset () from /lib64/libc.so.6\n(gdb) bt\n#0  0x0000003287f73474 in memset () from /lib64/libc.so.6\n#1  0x0000003287f6c92a in calloc () from /lib64/libc.so.6\n#2  0x0000000000407399 in read_cache () at read-cache.c:537\n#3  0x0000000000404e1b in apply_patch (fd=-1) at apply.c:1749\n#4  0x0000000000405632 in main (argc=3, argv=0x7fffff841c38) at apply.c:1860\n#5  0x0000003287f1c3cf in __libc_start_main () from /lib64/libc.so.6\n#6  0x0000000000402459 in _start ()\n#7  0x00007fffff841c28 in ?? ()\n#8  0x0000000000000000 in ?? ()\n\n\ngit on hera is 1.1.6-1\n\n\t\tDave\n"},{"id":"15854","messageId":"Pine.LNX.4.64.0602101120440.19172@g5.osdl.org","threadId":"3284","inReplyTo":"20060210183745.GI22611@redhat.com","subject":"Re: git-apply segfault.","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-02-10T19:22:46Z","receivedAt":"2006-02-10T19:22:46Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 10 Feb 2006, Dave Jones wrote:\n>\n> (gdb) bt\n> #0  0x0000003287f73474 in memset () from /lib64/libc.so.6\n> #1  0x0000003287f6c92a in calloc () from /lib64/libc.so.6\n> #2  0x0000000000407399 in read_cache () at read-cache.c:537\n\nOuch. Looks like malloc heap corruption.\n\n> git on hera is 1.1.6-1\n\nCan you try running \"valgrind\" on it? That should show what corrupts the \nheap.\n\n\t\tLinus\n"},{"id":"15855","messageId":"20060210194127.GM22611@redhat.com","threadId":"3284","inReplyTo":"Pine.LNX.4.64.0602101120440.19172@g5.osdl.org","subject":"Re: git-apply segfault.","fromName":"Dave Jones","fromEmail":"davej@redhat.com","sentAt":"2006-02-10T19:41:27Z","receivedAt":"2006-02-10T19:41:27Z","isPatch":false,"sender":{"key":"davej@redhat.com","avatar":null},"body":"On Fri, Feb 10, 2006 at 11:22:46AM -0800, Linus Torvalds wrote:\n > \n > \n > On Fri, 10 Feb 2006, Dave Jones wrote:\n > >\n > > (gdb) bt\n > > #0  0x0000003287f73474 in memset () from /lib64/libc.so.6\n > > #1  0x0000003287f6c92a in calloc () from /lib64/libc.so.6\n > > #2  0x0000000000407399 in read_cache () at read-cache.c:537\n > \n > Ouch. Looks like malloc heap corruption.\n\nIndeed. Self-inflicted in this case.\n\n > > git on hera is 1.1.6-1\n > Can you try running \"valgrind\" on it? That should show what corrupts the \n > heap.\n\nActually it's a glibc bug (fixed last September, but not backported to older releases).\nJakub is working on an FC4 update.\n\n(It also only hits you if you're a loony and have something like\n export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))\n in your ~/.bashrc)\n\n\t\tDave\n"}]}