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

Re: svn commit: r15154 - in trunk: subversion/bindings/swig/ruby/libsvn_swig_ruby subversion/bindings/swig/ruby/svn subversion/bindings/swig/ruby/test tools/examples tools/hook-scripts

From: David James <james82_at_gmail.com>
Date: 2005-07-02 20:58:21 CEST

On 6/23/05, kou@tigris.org <kou@tigris.org> wrote:
> + apr_pool_t(apr_pool_t *parent=NULL, apr_allocator_t *allocator=NULL) {
> + return svn_pool_create_ex(parent, allocator);
> }
[...snip...]
> + ~apr_pool_t() {
> + apr_pool_destroy(self);
> }
Kouhei, are there any safeguards in place here to prevent Ruby from
destroying a pool when references to its children still exist? I tried
using this code for the Python bindings and ran into problems. Here
are some examples.

Example crash #1:
>>> pool = apr_pool_t()
>>> pool2 = apr_pool_t(pool)
>>> del pool
>>> del pool2
zsh: segmentation fault python

Example crash #2:
>>> pool = None
>>> def someFunction():
... pool2 = apr_pool_t()
... pool = apr_pool_t(pool2)
...
>>> someFunction()
zsh: segmentation fault python

Cheers,

David

-- 
David James -- http://www.cs.toronto.edu/~james
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 2 21:00:03 2005

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