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.

Cheers,
-- 
Yasuhito FUTATSUKI <futat...@yf.bsclub.org>

Reply via email to