On 06.03.2017 21:56, Daniel Shahaf wrote:
[email protected] wrote on Mon, Mar 06, 2017 at 19:53:55 -0000:
Author: stefan2
Date: Mon Mar 6 19:53:55 2017
New Revision: 1785754
URL: http://svn.apache.org/viewvc?rev=1785754&view=rev
Log:
Make FSFS consistency no longer depend on hash algorithms.
First of all, thanks for fixing this.
I didn't do a full review with out-of-diff context, but I did spot two
issues:
+++ subversion/trunk/subversion/libsvn_fs_fs/transaction.c Mon Mar 6 19:53:55
2017
@@ -2385,6 +2392,78 @@ get_shared_rep(representation_t **old_re
+ /* The existing representation may itsel be part of the current
Typo: "itsel".
Fixed in r1786515.
+ /* Compare the two representations.
+ * Note that the stream comparison might also produce MD5 checksum
+ * errors or other failures in case of SHA1 collisions. */
+ SVN_ERR(svn_fs_fs__get_contents_from_file(&contents, fs, rep, file,
+ offset, scratch_pool));
+ SVN_ERR(svn_fs_fs__get_contents(&old_contents, fs, &old_rep_norm,
+ FALSE, scratch_pool));
+ err = svn_stream_contents_same2(&same, contents, old_contents,
+ scratch_pool);
+
+ /* Restore FILE's read / write position. */
+ SVN_ERR(svn_io_file_seek(file, APR_SET, &old_position, scratch_pool));
Leaks 'err'.
Fixed in r1786446.
Thanks for the review!
-- Stefan^2.