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

Re: question about r15253

From: Branko Čibej <brane_at_xbc.nu>
Date: 2005-08-09 18:37:28 CEST

Ben Collins-Sussman wrote:

> I see that r15253 is nominated in the 1.2.2 STATUS file:
>
>
> Index: subversion/libsvn_ra_local/ra_plugin.c
> ===================================================================
> --- subversion/libsvn_ra_local/ra_plugin.c (revision 15252)
> +++ subversion/libsvn_ra_local/ra_plugin.c (revision 15253)
> @@ -920,6 +920,7 @@
> a loop. Truly, Nothing Can Go Wrong :-). But RA layers that
> go over a network should confirm the checksum. */
> SVN_ERR (svn_stream_copy (contents, stream, pool));
> + SVN_ERR (svn_stream_close (contents));
> }
> /* Handle props if requested. */
>
>
> So the bug here is that ra_local's implementation of svn_ra_get_file
> () was calling svn_fs_file_contents(), reading all the data from the
> stream object, then forgetting to close the stream object. This made
> perl bindings really unhappy.
>
> I'm wondering if similar problems exist in other RA layers. Looking
> in svnserve's call to svn_fs_file_contents(), it seems to close the
> stream after its done reading. But looking in mod_dav_svn/
> repos.c:dav_svn_deliver(), I don't see the stream being closed. Is
> this a bad thing?

It's a not exactly a resource leak since the stream will get closed when
its pool is destroyed, but it's not nice, either.

I'm guessing that the bit with the Perl bindings and ra_local was more
of a problem because there's no guarantee of regular pool cleanup.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 9 18:38:38 2005

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.