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

Re: svn commit: r32164 - trunk/subversion/bindings/swig/python/tests

From: Blair Zajac <blair_at_orcaware.com>
Date: Thu, 17 Jul 2008 13:34:42 -0700

Hyrum K. Wright wrote:
>> -------Original Message-------
>> From: Blair Zajac <blair_at_orcaware.com>
>> Subject: Re: svn commit: r32164 - trunk/subversion/bindings/swig/python/tests
>> Sent: 17 Jul '08 12:51
>>
>> hwright_at_tigris.org wrote:
>> > Author: hwright
>> > Date: Thu Jul 17 12:49:29 2008
>> > New Revision: 32164
>> >
>> > Log:
>> > Fix a segfault in the python tests.
>> >
>> > The problem here is that we're using a pre-1.5 log message callback function
>> > to call a pre-1.5 API. That's all well and good, except that the callback
>> > doesn't really behave like it's pre-1.5. Instead, it attempts to convert the
>> > incoming svn_client_commit_item2_t references to svn_client_commit_item3_t
>> > references, which summarily results in a segfault.
>> >
>> > There might be a better, more complete solution to this problem, but that will
>> > take more swig-fu than I can muster right now.
>>
>> Yeah, if one can still cause the core dump in Python code, we'll need one of our
>> swig-experts to figure this out :)
>>
>> We should leave this test there for svn_client_commit_item2_t but commented out
>> so when it gets fixed for real, we can enable it.
>
> I'm a bit confused: I didn't actually remove any tests, just made it so the client library (correctly) interpreted the python-provided callback as compatible with svn_client_commit_item3_t structures. Which bits should be commented out?

Mispoke about commenting out the test.

So is the real problem is that somewhere either
client.svn_swig_py_get_commit_log_func or self.log_message_func changed what its
returning and we were putting this into the wrong client structure.

But the Python code using the callbacks hasn't changed, so isn't this a break in
our API? I mean, if I had this code in my own project using 1.4 and it now core
dumps in going to 1.5.1, isn't that an issue we should fix?

Should we introduce versioned methods to work around this?

Isn't there a mismatching of numbers? client.svn_swig_py_get_commit_log_func
and self.log_message_func are both unversioned but we put them into versioned
fields?

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-17 22:35:23 CEST

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.