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

Re: SEGFAULTs with Python bindings and generators

From: Yasuhito FUTATSUKI <futatuki_at_yf.bsdclub.org>
Date: Wed, 30 Sep 2020 10:08:35 +0900

On 2020/09/30 8:51, C. Michael Pilato wrote:
> Thanks for the reply. And I see what you're trying to do there, but in
> practice it doesn't seem to work. The swig proxy object doesn't allow
> arbitrary attribute creation:
> AttributeError: You cannot add instance attributes to <libsvn.fs.svn_fs_t;
>> proxy of <Swig Object of type 'svn_fs_t *' at 0x7f83bd4be420> >

Ah, I'm sorry you are right.
> I tried to work around this using this construct:
> - fs.repos = repos
>> + fs.__dict__['repos'] = repos
> ...and that avoids the AttributeError, but alas the code still SEGFAULTs.
> I'm attaching a(n edited for readability) log from a gdb session.

I also confirmed it occured in svn_fs_fs.is_packed_rev().

Perhaps SvnContentProxy object also keep fsroot object until the
stream is closed. I found a note in docstring for svn_fs_file_contents():

 * @todo kff: I am worried about lifetime issues with this pool vs
 * the trail created farther down the call stack. Trace this function
 * to investigate...


I worry about the svn_stream_t * object returned by svn_fs_file_contents()
depends that svn_fs_root_t * root is living.


Yasuhito FUTATSUKI <futatuki_at_yf.bsclub.org>
Received on 2020-09-30 03:10:25 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.