You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2017/03/06 20:56:14 UTC
Re: svn commit: r1785754 - in /subversion/trunk/subversion:
include/svn_error_codes.h libsvn_fs_fs/cached_data.c
libsvn_fs_fs/cached_data.h libsvn_fs_fs/transaction.c
tests/libsvn_fs/fs-test.c
stefan2@apache.org 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".
> + /* 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'.
Cheers,
Daniel
Re: svn commit: r1785754 - in /subversion/trunk/subversion:
include/svn_error_codes.h libsvn_fs_fs/cached_data.c
libsvn_fs_fs/cached_data.h libsvn_fs_fs/transaction.c
tests/libsvn_fs/fs-test.c
Posted by Stefan Fuhrmann <st...@apache.org>.
On 06.03.2017 21:56, Daniel Shahaf wrote:
> stefan2@apache.org 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.