On 10/15/07, Dominique Pelle <[EMAIL PROTECTED]> wrote: > I'll try to: > - come up with a simpler test case (diffing the 3 source files > of vim is too complicated to verify whether diff is correct)
Bt trial and error, I've come up with 3 very simple files that are enough to trigger the access to uninitialized variables bug when diffing 3 files. Each sample file has only 2 lines! $ cat file1 1 2 $ cat file2 2 3 $ cat file3 0 1 $ valgrind ./vim -d -u NONE -U NONE -d file1 file2 file3 2> vg.log When doing that, vg.log contains several errors: ==19119== Conditional jump or move depends on uninitialised value(s) ==19119== at 0x8058767: diff_check (diff.c:1461) ==19119== by 0x8058BFA: diff_check_fill (diff.c:1613) ==19119== by 0x810822E: update_topline (move.c:214) ==19119== by 0x80D7949: main (main.c:902) ==19119== ==19119== Conditional jump or move depends on uninitialised value(s) ==19119== at 0x8058788: diff_check (diff.c:1465) ==19119== by 0x8058BFA: diff_check_fill (diff.c:1613) ==19119== by 0x810822E: update_topline (move.c:214) ==19119== by 0x80D7949: main (main.c:902) etc (many more errors) The diff results are also different before and after proposed patch. With the proposed patch, there are no errors reported by valgrind. However, I don't think that the diff output before or after patch make sense to me. Without patch, nothing is highlighted in the 3rd window (file3) and yet, file3 is different than file1 and file2. With patch, things are highlighted in file3 but it does not make much sense to me either. Notice that line containing "1" in file3 is not highlighted. It does not look correct either after proposed patch. However, I realize that I don't know exactly what diff on 3 files should show here. What is the expected behavior? Reading ":help diff" did not help to clarify what is expected when diffing 3 or 4 files. > - check that the patch does not change the diff when no > errors were reported before. I still need to do that. > - check that the patch correctly changes the diff when some > errors were reported before. See above, I'm not sure what is the expected behavior on my sample test case. So I can't tell whether the patch actually fixes the problem. I was using vim-7.1.140, built on Linux with: - ./configure --with-features=huge - disabled optimisation (-O0) -- Dominique --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
