Re: crash on git diff-tree -Ganything tree for new files with textconv filter

2013-06-03 Thread Peter Oberndorfer
On 2012-11-07 22:13, Jeff King wrote: On Wed, Nov 07, 2012 at 10:10:59PM +0100, Peter Oberndorfer wrote: For me the key to reproduce the problem was to have 2 commits. Adding the file in the root commit it did not work. [1] You probably would need to pass --root for it to do the diff of the

Re: crash on git diff-tree -Ganything tree for new files with textconv filter

2013-06-03 Thread Jeff King
On Mon, Jun 03, 2013 at 07:25:06PM +0200, Peter Oberndorfer wrote: Thanks for the report. I'd still like to pursue using a regex library that does not require NUL-termination, but I've been distracted by other things. I'm going to hold back my copy-to-a-NUL-buffer patch for now and see if

Re: crash on git diff-tree -Ganything tree for new files with textconv filter

2012-11-07 Thread Jeff King
On Wed, Nov 07, 2012 at 10:10:59PM +0100, Peter Oberndorfer wrote: For me the key to reproduce the problem was to have 2 commits. Adding the file in the root commit it did not work. [1] You probably would need to pass --root for it to do the diff of the initial commit. The patch below

Re: crash on git diff-tree -Ganything tree for new files with textconv filter

2012-11-01 Thread Ramsay Jones
Jeff King wrote: Thinking on it more, my patch, hacky thought it seems, may not be the worst solution. Here are the options that I see: 1. Use a regex library that does not require NUL termination. If we are bound by the regular regexec interface, this is not feasible. But the

Re: crash on git diff-tree -Ganything tree for new files with textconv filter

2012-10-30 Thread Jeff King
On Mon, Oct 29, 2012 at 06:47:05PM -0400, Jeff King wrote: On Mon, Oct 29, 2012 at 06:35:21PM -0400, Jeff King wrote: The patch below fixes it, but it's terribly inefficient (it just detects the situation and reallocates). It would be much better to disable the reuse_worktree_file mmap

Re: crash on git diff-tree -Ganything tree for new files with textconv filter

2012-10-30 Thread Junio C Hamano
(1) sounds attractive for more than one reason. In addition to avoidance of this issue, it would bring bug-to-bug compatibility across platforms. (4), if we can run grep on streaming data (tweak interface we have for checking out a large blob to the working tree), would let us work on dataset

Re: crash on git diff-tree -Ganything tree for new files with textconv filter

2012-10-30 Thread Jeff King
On Tue, Oct 30, 2012 at 09:46:01PM +0900, Junio C Hamano wrote: (1) sounds attractive for more than one reason. In addition to avoidance of this issue, it would bring bug-to-bug compatibility across platforms. Yeah. I mentioned breaking the build for people who would now need to turn on

Re: crash on git diff-tree -Ganything tree for new files with textconv filter

2012-10-29 Thread Peter Oberndorfer
On 2012-10-29 07:05, Jeff King wrote: On Sun, Oct 28, 2012 at 08:56:39PM +0100, Peter Oberndorfer wrote: The patch below should fix it. I added tests, but please try your real-world test case on it to double-check. I tested your patch, but now it crashes for another reason :-) Well, that's

Re: crash on git diff-tree -Ganything tree for new files with textconv filter

2012-10-29 Thread Jeff King
On Mon, Oct 29, 2012 at 09:19:48PM +0100, Peter Oberndorfer wrote: I could reproduce with my 0x3000 bytes file on linux. The buffer is not read with a trailing null byte it is mapped by mmap in diff_populate_filespec... So i think we will not get away with expecting a trailing null :-/

Re: crash on git diff-tree -Ganything tree for new files with textconv filter

2012-10-29 Thread Jeff King
On Mon, Oct 29, 2012 at 06:35:21PM -0400, Jeff King wrote: The patch below fixes it, but it's terribly inefficient (it just detects the situation and reallocates). It would be much better to disable the reuse_worktree_file mmap when we populate the filespec, but it is too late to pass an

Re: crash on git diff-tree -Ganything tree for new files with textconv filter

2012-10-28 Thread Jeff King
On Sat, Oct 27, 2012 at 08:37:24PM +0200, Peter Oberndorfer wrote: It seems git diff-tree -Ganything tree crashes[1] with a null pointer dereference when run on a commit that adds a file (pdf) with a textconv filter. It can be reproduced with vanilla git by having a commit on top that adds

Re: crash on git diff-tree -Ganything tree for new files with textconv filter

2012-10-28 Thread Peter Oberndorfer
On 2012-10-28 13:01, Jeff King wrote: On Sat, Oct 27, 2012 at 08:37:24PM +0200, Peter Oberndorfer wrote: It seems git diff-tree -Ganything tree crashes[1] with a null pointer dereference when run on a commit that adds a file (pdf) with a textconv filter. It can be reproduced with vanilla

crash on git diff-tree -Ganything tree for new files with textconv filter

2012-10-27 Thread Peter Oberndorfer
Hi, It seems git diff-tree -Ganything tree crashes[1] with a null pointer dereference when run on a commit that adds a file (pdf) with a textconv filter. It can be reproduced with vanilla git by having a commit on top that adds a file with a textconv filter and executing git diff-tree -Ganything