Philip Martin <philip.mar...@wandisco.com> writes:

> Daniel Shahaf <d...@daniel.shahaf.name> writes:
>
>> FAIL:  lt-diff-diff3-test 2: 2-way unified diff and trivial merge
>
> $  valgrind -q .libs/lt-diff-diff3-test 2
> ==26375== Conditional jump or move depends on uninitialised value(s)
> ==26375==    at 0x503A2F9: find_identical_suffix (diff_file.c:605)
> ==26375==    by 0x503B05C: datasources_open (diff_file.c:792)
> ==26375==    by 0x503730F: svn_diff_diff_2 (diff.c:153)
> ==26375==    by 0x503C036: svn_diff_file_diff_2 (diff_file.c:1243)
> ==26375==    by 0x402552: two_way_diff (diff-diff3-test.c:287)
> ==26375==    by 0x403274: test_two_way_unified (diff-diff3-test.c:635)
> ==26375==    by 0x4E2FC05: do_test_num (svn_test_main.c:273)
> ==26375==    by 0x4E30679: main (svn_test_main.c:545)
> ==26375== 
> ==26375== Conditional jump or move depends on uninitialised value(s)
> ==26375==    at 0x503A2F9: find_identical_suffix (diff_file.c:605)
> ==26375==    by 0x503B05C: datasources_open (diff_file.c:792)
> ==26375==    by 0x5037C86: svn_diff_diff3_2 (diff3.c:276)
> ==26375==    by 0x503C15A: svn_diff_file_diff3_2 (diff_file.c:1265)
> ==26375==    by 0x401DDD: three_way_merge (diff-diff3-test.c:200)
> ==26375==    by 0x40284A: two_way_diff (diff-diff3-test.c:311)
> ==26375==    by 0x403274: test_two_way_unified (diff-diff3-test.c:635)
> ==26375==    by 0x4E2FC05: do_test_num (svn_test_main.c:273)
> ==26375==    by 0x4E30679: main (svn_test_main.c:545)
> ==26375== 

Index: subversion/libsvn_diff/diff_file.c
===================================================================
--- subversion/libsvn_diff/diff_file.c  (revision 1140044)
+++ subversion/libsvn_diff/diff_file.c  (working copy)
@@ -530,7 +530,7 @@
   int suffix_lines_to_keep = SUFFIX_LINES_TO_KEEP;
   svn_boolean_t is_match, reached_prefix;
   apr_off_t lines = 0;
-  svn_boolean_t had_cr, had_nl;
+  svn_boolean_t had_cr, had_nl = FALSE;
   apr_size_t i;
 
   /* Initialize file_for_suffix[].

-- 
Philip

Reply via email to