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

[PATCH][swig-py3] Detach Python exception context in callbacks

From: Yasuhito FUTATSUKI <futatuki_at_yf.bsdclub.org>
Date: Sun, 3 Feb 2019 20:52:48 +0900

Hi,

Jun Omae told me (with patch) that exception from Python callback in
svn_swig_py_status_func2() causes segmentation fault on Python 3.7.
(The patch have already been committed as r1551888). I think cause of
segmentation fault on py3 is the change of exception handling between
py2 and py3, support for exception context.

So I looked over callbacks in swigutil_py.c, those of return value type
aren't svn_error_t *. I think they should be detached from callers
Python exception context because they can't report error to caller.

The patch attached fix them by inserting PyErr_Fetch() and PyErr_Restore()
save and restore Python error indicator.

(The patch in other thread textually conflict with this patch, though)

Cheers,

-- 
Yasuhito FUTATSUKI

Received on 2019-02-03 12:54:45 CET

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