On Sat, Mar 7, 2009 at 7:42 PM, Arfrever Frehtes Taifersar Arahesis
<Arfrever.FTA_at_gmail.com> wrote:
> For efficiency reasons, the system has converted the large body of this message into an attachment.
>
> ---------- Forwarded message ----------
> From: arfrever_at_tigris.org
> To: svn_at_subversion.tigris.org
> Date: Sat, 7 Mar 2009 15:41:43 -0800
> Subject: svn commit: r36404 - in trunk: . notes subversion/include subversion/libsvn_client subversion/libsvn_subr subversion/libsvn_wc subversion/svn subversion/tests/cmdline subversion/tests/cmdline/getopt_tests_data subversion/tests/cmdline/svntest
> Author: arfrever
> Date: Sat Mar 7 15:41:42 2009
> New Revision: 36404
>
> Log:
> Merge the 'svnpatch-diff' branch to trunk.
>
> Added:
> trunk/notes/svnpatch
> - copied unchanged from r36403, branches/svnpatch-diff/notes/svnpatch
> trunk/subversion/libsvn_client/patch.c
> - copied unchanged from r36403, branches/svnpatch-diff/subversion/libsvn_client/patch.c
> trunk/subversion/libsvn_wc/patch.c
> - copied unchanged from r36403, branches/svnpatch-diff/subversion/libsvn_wc/patch.c
> trunk/subversion/svn/patch-cmd.c
> - copied unchanged from r36403, branches/svnpatch-diff/subversion/svn/patch-cmd.c
> trunk/subversion/tests/cmdline/patch_tests.py
> - copied unchanged from r36403, branches/svnpatch-diff/subversion/tests/cmdline/patch_tests.py
> Modified:
> trunk/ (props changed)
> trunk/build.conf
> trunk/subversion/include/svn_client.h
> trunk/subversion/include/svn_config.h
> trunk/subversion/include/svn_error_codes.h
> trunk/subversion/include/svn_wc.h
> trunk/subversion/libsvn_client/client.h
> trunk/subversion/libsvn_client/deprecated.c
> trunk/subversion/libsvn_client/diff.c
> trunk/subversion/libsvn_client/merge.c
> trunk/subversion/libsvn_client/repos_diff.c
> trunk/subversion/libsvn_subr/config_file.c
> trunk/subversion/libsvn_wc/copy.c
> trunk/subversion/libsvn_wc/deprecated.c
> trunk/subversion/libsvn_wc/diff.c
> trunk/subversion/libsvn_wc/util.c
> trunk/subversion/svn/cl.h
> trunk/subversion/svn/diff-cmd.c
> trunk/subversion/svn/main.c
> trunk/subversion/svn/notify.c
> trunk/subversion/tests/cmdline/diff_tests.py
> trunk/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
> trunk/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
> trunk/subversion/tests/cmdline/svntest/actions.py
>
> Merged:
> /branches/svnpatch-diff:r25664-31830,31832-31911,31913-36403
>
<SNIP>
> @@ -1080,6 +1506,9 @@
>
> svn_pool_destroy(eb->pool);
>
> + if (eb->svnpatch_stream)
> + SVN_ERR(eb->diff_editor->close_edit(eb, pool));
> +
> return SVN_NO_ERROR;
> }
Hi Arfrever
repos_diff.c:svn_client__get_diff_editor() creates a subpool,
allocates eb in that subpool, and sets eb->pool equal to that subpool.
So destroying eb->pool then checking eb->svnpatch_stream can cause a
segfault. I'm surprised we haven't seen this happen already. I only
found it while doing some analysis of subtree merges, but the segfault
occurs frequently in my testing.
Moved the pool's destruction after the "if (eb->svnpatch_stream)" in r37726.
Paul
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2259616
Received on 2009-05-14 18:28:06 CEST