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

Re: Segfault in ruby tests

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 02 Feb 2009 16:07:53 +0000

Kouhei Sutou wrote:
> In <497F4B21.5030008_at_mail.utexas.edu>
> "Segfault in ruby tests" on Tue, 27 Jan 2009 11:57:53 -0600,
> "Hyrum K. Wright" <hyrum_wright_at_mail.utexas.edu> wrote:
>
> > The ruby bindings tests are segfaulting on the buildbot. I can reproduce locally:
>
> I don't know about the detail of the problem but this patch
> will solve the problem:
>
> Index: subversion/libsvn_delta/text_delta.c
> ===================================================================
> --- subversion/libsvn_delta/text_delta.c (revision 35611)
> +++ subversion/libsvn_delta/text_delta.c (working copy)
> @@ -788,8 +788,11 @@
> apr_pool_t *pool)
> {
> svn_txdelta_stream_t *txstream;
> + apr_pool_t *sub_pool;
> svn_error_t *err;
>
> + sub_pool = svn_pool_create(pool);
> +
> /* ### this is a hack. we should simply read from the stream, construct
> ### some windows, and pass those to the handler. there isn't any reason
> ### to crank up a full "diff" algorithm just to copy a stream.
> @@ -798,8 +801,8 @@
>
> /* Create a delta stream which converts an *empty* bytestream into the
> target bytestream. */
> - svn_txdelta(&txstream, svn_stream_empty(pool), stream, pool);
> - err = svn_txdelta_send_txstream(txstream, handler, handler_baton, pool);
> + svn_txdelta(&txstream, svn_stream_empty(sub_pool), stream, sub_pool);
> + err = svn_txdelta_send_txstream(txstream, handler, handler_baton, sub_pool);
>
> if (digest && (! err))
> {
> @@ -809,6 +812,8 @@
> memcpy(digest, result_md5, APR_MD5_DIGESTSIZE);
> }
>
> + svn_pool_destroy(sub_pool);
> +
> return err;
> }

I believe you're saying that this change makes the problem go away for
you but there is no logical reason why it should. (I can't see any
reason why it should help.) If that's the case, I just want to make sure
that is clear so that nobody will commit this change until we know why
it makes the problem go away.

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1091237
Received on 2009-02-02 17:08:19 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.