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

Re: [PATCH] Fix segfaults in the Python bindings caused by pool lifetime problems (1.3.x, Issue #2172)

From: David James <james82_at_gmail.com>
Date: 2005-10-03 15:53:58 CEST

On 9/30/05, David James <james82@gmail.com> wrote:
> [[[
>
> Fix segfaults in the Python bindings caused by pool lifetime
> problems by creating deep-copy functions and using them to
> extend the lifetime of various structure types. This change
> solves issue #2172.
>
> Core changes:
>
> * subversion/include/svn_delta.h
> (svn_txdelta_window_dup): Rename from svn_txdelta__copy_window(),
> and publicize.
>
> * subversion/include/svn_types.h
> (svn_log_changed_path_dup): New.
>
> * subversion/include/svn_auth.h
> (svn_auth_ssl_server_cert_info_dup): New.
>
> * subversion/libsvn_subr/auth.c
> (svn_auth_ssl_server_cert_info_dup): New.
>
> * subversion/libsvn_subr/constructors.c
> (svn_log_changed_path_dup): New.
>
> * subversion/libsvn_delta/delta.h
> (svn_txdelta__copy_window): Remove.
>
> * subversion/libsvn_delta/text_delta.c
> (svn_txdelta__copy_window): Rename to svn_txdelta_window_dup().
>
> * subversion/libsvn_fs_base/reps-strings.c
> (compose_handler): Use svn_txdelta_window_dup instead of
> svn_txdelta__copy_window.
>
>
> SWIG/Python changes:
>
> * build.conf
> (libsvn_swig_py): Add libsvn_wc as dependency.
>
> * subversion/bindings/swig/python/tests/repository.py: New.
>
> * subversion/bindings/swig/python/tests/run_all.py
> (suite): Add SubversionRepositoryTestCase as test case.
>
> * subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
> (make_ob_txdelta_window, make_ob_wc_status,
> make_ob_auth_ssl_server_cert_info): Rename from make_ob_window(),
> make_ob_status() and make_ob_server_cert_info() respectively. Upgrade
> functions to reallocate provided objects using a new anonymous pool. Remove
> pool argument.
>
> (make_ob_status, make_ob_lock): Upgrade functions to reallocate provided
> objects using a new anonymous pool. Remove pool argument.
>
> (convert_txdelta_window, svn_swig_py_convert_txdelta_window_hash,
> convert_log_changed_path, svn_swig_py_convert_log_changed_path,
> convert_wc_status, svn_swig_py_convert_wc_status,
> convert_lock, svn_swig_py_convert_lock, convert_auth_ssl_server_cert_info,
> svn_swig_py_convert_auth_ssl_server_cert_info): New.
>
> (window_handler): Use make_ob_txdelta_window instead of make_ob_window.
>
> (svn_swig_py_status_func): Use make_ob_wc_status instead of make_ob_status.
>
> (svn_swig_py_auth_ssl_server_trust_prompt_func):
> Use make_ob_auth_ssl_server_cert_info instead of make_ob_server_info.
>
> (svn_swig_py_fs_get_locks_func):
> Remove pool argument from call to make_ob_lock.
>
> (svn_swig_py_log_receiver): Use svn_swig_py_convert_log_changed_path_hash,
> instead of svn_swig_py_convert_hash.
>
>
> Approved by: cmpilato
> (cmpilato approved the standalone core changes and helped
> clarify the log message.)
>
> Review by: julianfoad
> (julianfoad reviewed the core code changes and suggested improvements.)

Committed in r16398 with a few minor tweaks.

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 Mon Oct 3 15:56:24 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.