{"thread":{"id":"3992","subject":"Do not use zlib 1.1.3 with git packs!","startedAt":"2006-04-29T00:52:52Z","lastAt":"2006-04-29T06:36:26Z","messageCount":4,"participants":["Johannes Schindelin","Nicolas Pitre","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"19238","messageId":"Pine.LNX.4.63.0604290245510.30565@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"3992","inReplyTo":null,"subject":"Do not use zlib 1.1.3 with git packs!","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-04-29T00:52:52Z","receivedAt":"2006-04-29T00:52:52Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nI had a strange effect when trying to repack a git repository on my iBook: \nfirst, \"git-repack -a -d\" would quit without an error message when about \n57% of the objects were written (*not* when deltifying them!).\n\nIt became even stranger when I tracked it to a segmentation fault in \nadler32(), where the debugger insisted that a buffer was NULL, but the \ncalling code insisted it was not.\n\nUpgrading to zlib 1.2.3 helped. That is, after I had a complete systen \nfsck-up, since virtually every binary, including su, login and getty, are \nlinked to zlib on Mac OS X. (Yeah, yeah, no Linux, I know.)\n\nCiao,\nDscho\n\nP.S.: This _might_ be related to the git-repack issue that came up a few \ndays ago.\n"},{"id":"19239","messageId":"Pine.LNX.4.63.0604290341380.22696@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"3992","inReplyTo":"Pine.LNX.4.63.0604290245510.30565@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: Do not use zlib 1.1.3 with git packs!","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-04-29T01:47:27Z","receivedAt":"2006-04-29T01:47:27Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 29 Apr 2006, Johannes Schindelin wrote:\n\n> Upgrading to zlib 1.2.3 helped.\n\nApparently I was too enthusiastic to have a working system again.\n\nThe problem showed again, but with a different repository.\n\nThis time, though, I have an idea what could be the culprit.\n\nIn create_delta(), there might be illegal accesses. The function adler32() \nis called for BLK_SIZE bytes (which is 16 bytes at the moment), starting \nfrom data, which is initially trg_buf, and is incremented until it is \n(trg_buf + trg_size).\n\nI gather that close to the end, adler32() tries to read 15 bytes after the \nend of the allocated target buffer.\n\nAm I wrong?\n\nCiao,\nDscho\n"},{"id":"19240","messageId":"Pine.LNX.4.64.0604282316520.18816@localhost.localdomain","threadId":"3992","inReplyTo":"Pine.LNX.4.63.0604290341380.22696@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: Do not use zlib 1.1.3 with git packs!","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2006-04-29T03:20:29Z","receivedAt":"2006-04-29T03:20:29Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Sat, 29 Apr 2006, Johannes Schindelin wrote:\n\n> Hi,\n> \n> On Sat, 29 Apr 2006, Johannes Schindelin wrote:\n> \n> > Upgrading to zlib 1.2.3 helped.\n> \n> Apparently I was too enthusiastic to have a working system again.\n> \n> The problem showed again, but with a different repository.\n> \n> This time, though, I have an idea what could be the culprit.\n> \n> In create_delta(), there might be illegal accesses. The function adler32() \n> is called for BLK_SIZE bytes (which is 16 bytes at the moment), starting \n> from data, which is initially trg_buf, and is incremented until it is \n> (trg_buf + trg_size).\n> \n> I gather that close to the end, adler32() tries to read 15 bytes after the \n> end of the allocated target buffer.\n> \n> Am I wrong?\n\nYou're not.  My bad.\n\n(I'm testing a version where adler32 has been replaced with rabin \n polynomial so that issue will be gone at the same time.\n A patch should be coming in less than an hour.)\n\n\nNicolas\n"},{"id":"19243","messageId":"7vvessanx1.fsf@assigned-by-dhcp.cox.net","threadId":"3992","inReplyTo":"Pine.LNX.4.64.0604282316520.18816@localhost.localdomain","subject":"Re: Do not use zlib 1.1.3 with git packs!","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-04-29T06:36:26Z","receivedAt":"2006-04-29T06:36:26Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nicolas Pitre <nico@cam.org> writes:\n\n> On Sat, 29 Apr 2006, Johannes Schindelin wrote:\n>\n>> I gather that close to the end, adler32() tries to read 15 bytes after the \n>> end of the allocated target buffer.\n>> \n>> Am I wrong?\n>\n> You're not.  My bad.\n\nThanks both, for catching this while still in \"next\".\n"}]}