[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Perl/Ruby bindings fail in trunk

From: Mark Phippard <markphip_at_gmail.com>
Date: Fri, 14 Nov 2008 10:04:58 -0500

On Thu, Nov 13, 2008 at 8:43 AM, Kouhei Sutou <kou_at_cozmixng.org> wrote:
> Hi,
>
> In <f16625f20811121745q6ef836f6w196068a04665ac45_at_mail.gmail.com>
> "Re: Perl/Ruby bindings fail in trunk" on Wed, 12 Nov 2008 18:45:22 -0700,
> "Jeremy Whitlock" <jcscoobyrs_at_gmail.com> wrote:
>
>> > All tests before that one passed on Linux. The segfault kills the test run,
>> > so I do not know if there will be more errors.
>>
>> I can confirm this as well.
>
> It seems that r33975 misses NULL checks.

With this patch applied my segfault is fixed when running the Ruby
tests. Hyrum, if you see this could you look at this patch and
possibly commit it? It looks related to code you were working on and
no one else has committed it.

After applying the patch, here are the results I get from the Ruby
tests (which do run to completion now):

Loaded suite .
Started
.....................................EE.....................................................................................FF..............................................................F........F...............
Finished in 477.687061 seconds.

  1) Error:
test_merge(SvnClientTest):
Svn::Error::WcFoundConflict:
subversion/libsvn_client/commit_util.c:341:
Svn::Error::WcFoundConflict: Aborting commit:
'/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/wc-tmp/wc/trunk/sample.txt'
remains in conflict
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/svn/util.rb:86:in
`svn_client_commit4'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/svn/util.rb:86:in
`commit4'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/svn/client.rb:156:in
`commit'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/test/test_client.rb:990:in
`assert_merge'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/test/test_client.rb:1013:in
`test_merge'

  2) Error:
test_merge_peg(SvnClientTest):
Svn::Error::WcFoundConflict:
subversion/libsvn_client/commit_util.c:341:
Svn::Error::WcFoundConflict: Aborting commit:
'/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/wc-tmp/wc/trunk/sample.txt'
remains in conflict
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/svn/util.rb:86:in
`svn_client_commit4'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/svn/util.rb:86:in
`commit4'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/svn/client.rb:156:in
`commit'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/test/test_client.rb:990:in
`assert_merge'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/test/test_client.rb:1019:in
`test_merge_peg'

  3) Failure:
test_delta(SvnFsTest)
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/test/test_fs.rb:366:in
`test_delta'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/svn/fs.rb:100:in
`transaction'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/test/test_fs.rb:361:in
`test_delta':
<Svn::Error::ChecksumMismatch> exception expected but none was thrown.

  4) Failure:
test_delta_with_deprecated_api(SvnFsTest)
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/test/test_fs.rb:366:in
`test_delta'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/svn/fs.rb:100:in
`transaction'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/test/test_fs.rb:361:in
`test_delta'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/test/test_fs.rb:373:in
`test_delta_with_deprecated_api':
<Svn::Error::ChecksumMismatch> exception expected but none was thrown.

  5) Failure:
test_entry(SvnWcTest)
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/test/test_wc.rb:201:in
`test_entry'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/svn/wc.rb:117:in
`_open'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/svn/wc.rb:95:in
`open'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/test/test_wc.rb:190:in
`test_entry':
<false> is not true.

  6) Failure:
test_relocate(SvnWcTest)
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/test/test_wc.rb:981:in
`test_relocate'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/svn/wc.rb:117:in
`_open'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/svn/wc.rb:101:in
`probe_open'
/Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/test/test_wc.rb:968:in
`test_relocate':
<[["1446557e-444e-46f4-b33f-e570454e700c",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2",
  nil],
 ["1446557e-444e-46f4-b33f-e570454e700c",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2"],
 [nil,
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2/dir1",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2"],
 [nil,
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2/dir1/hello.txt",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2"],
 [nil,
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2/dir2",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2"],
 [nil,
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2/dir2/hello2.txt",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2"]]>
expected but was
<[["1446557e-444e-46f4-b33f-e570454e700c",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2",
  nil],
 ["1446557e-444e-46f4-b33f-e570454e700c",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2"],
 ["1446557e-444e-46f4-b33f-e570454e700c",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2/dir1",
  nil],
 ["1446557e-444e-46f4-b33f-e570454e700c",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2/dir1",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2"],
 ["1446557e-444e-46f4-b33f-e570454e700c",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2/dir1/hello.txt",
  nil],
 ["1446557e-444e-46f4-b33f-e570454e700c",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2/dir1/hello.txt",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2"],
 ["1446557e-444e-46f4-b33f-e570454e700c",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2/dir2",
  nil],
 ["1446557e-444e-46f4-b33f-e570454e700c",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2/dir2",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2"],
 ["1446557e-444e-46f4-b33f-e570454e700c",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2/dir2/hello2.txt",
  nil],
 ["1446557e-444e-46f4-b33f-e570454e700c",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2/dir2/hello2.txt",
  "file:///Users/mphippard/work/svn-trunk/subversion/bindings/swig/ruby/repos/dir2"]]>.

213 tests, 1442 assertions, 4 failures, 2 errors

>
> {{{
> Add missing NULL checks.
>
> * subversion/libsvn_fs_fs/tree.c
> (fs_file_checksum, apply_textdelta): Add missing NULL check.
> }}}
>
>
> Thanks,
> --
> kou
>
> Index: subversion/libsvn_fs_fs/tree.c
> ===================================================================
> --- subversion/libsvn_fs_fs/tree.c (revision 34171)
> +++ subversion/libsvn_fs_fs/tree.c (working copy)
> @@ -2256,7 +2256,10 @@
>
> SVN_ERR(get_dag(&file, root, path, pool));
> SVN_ERR(svn_fs_fs__dag_file_checksum(&file_checksum, file, pool));
> - *checksum = (file_checksum->kind == kind) ? file_checksum : NULL;
> + if (file_checksum && file_checksum->kind == kind)
> + *checksum = file_checksum;
> + else
> + *checksum = NULL;
> return SVN_NO_ERROR;
> }
>
> @@ -2426,7 +2429,8 @@
> /* Until we finalize the node, its data_key points to the old
> contents, in other words, the base text. */
> SVN_ERR(svn_fs_fs__dag_file_checksum(&checksum, tb->node, pool));
> - if (tb->base_checksum->kind == checksum->kind
> + if (checksum
> + && tb->base_checksum->kind == checksum->kind
> && !svn_checksum_match(tb->base_checksum, checksum))
> return svn_error_createf
> (SVN_ERR_CHECKSUM_MISMATCH,
>
>

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-11-14 16:05:15 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.