Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subversion python tests segfault with SWIG 4.1.0 #2373

Closed
jplesnik opened this issue Sep 18, 2022 · 2 comments
Closed

Subversion python tests segfault with SWIG 4.1.0 #2373

jplesnik opened this issue Sep 18, 2022 · 2 comments
Labels

Comments

@jplesnik
Copy link
Contributor

I am testing rebuild of SWIG dependencies against version 4.1.0 in Fedora rawhide/38.

The build of subversion-1.14.2 is failing with this version.

+ make check-swig-py
mkdir /builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python/libsvn
if [ "LD_LIBRARY_PATH" = "DYLD_LIBRARY_PATH" ]; then for d in /builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python/libsvn_swig_py /builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python/../../../libsvn_*; do if [ -n "$DYLD_LIBRARY_PATH" ]; then LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$d/.libs"; else LD_LIBRARY_PATH="$d/.libs"; fi; done; export LD_LIBRARY_PATH; fi; \
cd /builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python; \
  /usr/bin/python3 /builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python/tests/run_all.py

RPM build errors:
make: *** [Makefile:947: check-swig-py] Segmentation fault (core dumped)
+ : Python swig test failure.
+ exit 1

Complete build log is here. Other information about the build can be found here.

@ojwb ojwb added the Python label Sep 18, 2022
@jschueller
Copy link
Contributor

jschueller commented Sep 19, 2022

not really a swig bug, upstream relies on the internal define SWIGPYTHON_PY3 in its code:
https://github.com/apache/subversion/blob/trunk/subversion/bindings/swig/include/proxy.swg#L69

it was dropped since a343b7e
maybe upstream should patch it to #if defined(SWIGPYTHON_PY3) || (SWIG_VERSION >= 0x040100) ?

@jplesnik
Copy link
Contributor Author

Thanks it helps. I'll report it to upstream and Fedora maintainer.

asfgit pushed a commit to apache/subversion that referenced this issue Sep 20, 2022
…roxy code.

We are using different code for proxy object, by Python version and by SWIG
version.  The distinguish between Python 2 and Python 3 was done by SWIG
macro "SWIGPYTHON_PY3".  However, the macro was dropped since SWIG commit
a343b7e[1], between SWIG 4.0.2 release and upcoming SWIG 4.1.0 release.

As we already dropped support for the combination of SWIG >= 4.0 and Python 2,
we should detect Python 2 only in SWIG < 4.0 case. So we can rely on the macro
only in the case.

* subversion/bindings/swig/include/proxy.swg ():
  Reorder the conditionals distinguish SWIG versions and Python versions,
  as described above.

Found by: Jitka Plesnikova (jplesnik {_AT_} redhat.com)

Suggested by: Julien Schueller (schueller {_AT_} phimeca.com) [2]

[1] swig/swig@a343b7e
[2] swig/swig#2373 (comment)


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1904167 13f79535-47bb-0310-9956-ffa450edef68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants