Skip to content

Instantly share code, notes, and snippets.

@jun66j5
Last active January 23, 2019 03:22
Show Gist options
  • Save jun66j5/05ba06b9fbfcbecfefab24d753f8d190 to your computer and use it in GitHub Desktop.
Save jun66j5/05ba06b9fbfcbecfefab24d753f8d190 to your computer and use it in GitHub Desktop.
check-swig-py failing...
diff --git a/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c b/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
index d3372b08a..0a6668f50 100644
--- a/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
+++ b/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
@@ -3134,7 +3134,10 @@ void svn_swig_py_status_func2(void *baton,
/* Our error has no place to go. :-( */
if (err)
- svn_error_clear(err);
+ {
+ svn_error_clear(err);
+ PyErr_Clear();
+ }
svn_swig_py_release_py_lock();
}
$ gdb /usr/bin/python3.7 ./subversion/bindings/swig/python/core
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/python3.7...(no debugging symbols found)...done.
[New LWP 20317]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/python3.7 /home/jun66j5/src/subversion.git/subversion/bindings/swig/py'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 run_cleanups (cref=0x7f1c22059d48) at /build/apr-jfvVat/apr-1.5.2/memory/unix/apr_pools.c:2351
2351 /build/apr-jfvVat/apr-1.5.2/memory/unix/apr_pools.c: No such file or directory.
(gdb) bt
#0 run_cleanups (cref=0x7f1c22059d48) at /build/apr-jfvVat/apr-1.5.2/memory/unix/apr_pools.c:2351
#1 apr_pool_destroy (pool=pool@entry=0x7f1c22059cd8) at /build/apr-jfvVat/apr-1.5.2/memory/unix/apr_pools.c:804
#2 0x00007f1c21d6c50d in _wrap_apr_pool_destroy (self=<optimized out>, args=<optimized out>)
at subversion/bindings/swig/python/core.c:4009
#3 0x00000000004e8f91 in _PyMethodDef_RawFastCallKeywords ()
#4 0x00000000004e8d90 in _PyCFunction_FastCallKeywords ()
#5 0x0000000000560b78 in _PyEval_EvalFrameDefault ()
#6 0x00000000004ea66a in _PyFunction_FastCallKeywords ()
#7 0x00000000005607c0 in _PyEval_EvalFrameDefault ()
#8 0x00000000004e9569 in _PyObject_FastCallDict ()
#9 0x000000000053068c in ?? ()
#10 0x000000000051b122 in PyObject_CallFinalizerFromDealloc ()
#11 0x000000000052da86 in ?? ()
#12 0x000000000050e303 in ?? ()
#13 0x000000000052d80c in ?? ()
#14 0x00000000004f1638 in ?? ()
#15 0x000000000058ee97 in ?? ()
#16 0x00000000004ed397 in ?? ()
#17 0x00000000004ed543 in ?? ()
#18 0x00000000004ed3c3 in ?? ()
#19 0x00000000004ed543 in ?? ()
#20 0x0000000000570f20 in PyErr_Clear ()
#21 0x000000000043e063 in ?? ()
#22 0x000000000052fc72 in ?? ()
#23 0x000000000051abd6 in PyObject_GetAttrString ()
#24 0x00000000004ea9af in PyObject_CallMethod ()
#25 0x00007f1c21b283ef in proxy_set_pool (pool=0x7f1c1ac38a58, proxy=<synthetic pointer>)
at subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:295
#26 svn_swig_py_new_pointer_obj (obj=obj@entry=0x7f1c183aa028, type=<optimized out>, pool=pool@entry=0x7f1c1ac38a58,
args=args@entry=0x0) at subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:325
#27 0x00007f1c21b28b7a in make_ob_wc_status (value=0x7f1c185b91f8)
at subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:1031
#28 0x0000000000581d86 in ?? ()
#29 0x00000000004eb597 in PyObject_CallFunction ()
#30 0x00007f1c21b2b60f in svn_swig_py_status_func2 (baton=0x7f1c18a9d158,
path=0x7f1c185b90a0 "/tmp/tmptsz5g7o7-wc-wc/branches/v1x", status=0x7f1c185b91f8)
at subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:3121
#31 0x00007f1c21138b1d in status_editor3_compat_func (baton=<optimized out>, path=<optimized out>, status=<optimized out>,
pool=<optimized out>) at subversion/libsvn_wc/deprecated.c:3084
#32 0x00007f1c2113c504 in status4_wrapper_func (baton=baton@entry=0x7f1c184112c8,
local_abspath=local_abspath@entry=0x7f1c185b90a0 "/tmp/tmptsz5g7o7-wc-wc/branches/v1x", status=<optimized out>,
scratch_pool=scratch_pool@entry=0x7f1c185b9028) at subversion/libsvn_wc/deprecated.c:2944
#33 0x00007f1c2115a870 in send_status_structure (wb=wb@entry=0x7fff2000df90,
local_abspath=local_abspath@entry=0x7f1c185b90a0 "/tmp/tmptsz5g7o7-wc-wc/branches/v1x",
parent_repos_root_url=parent_repos_root_url@entry=0x7f1c183ba928 "file:///tmp/tmp2v9wzb1l-wc-repo",
parent_repos_relpath=parent_repos_relpath@entry=0x7f1c183ba918 "branches",
parent_repos_uuid=parent_repos_uuid@entry=0x7f1c183ba948 "92ea810a-adf3-0310-b540-bef912dcf5ba",
info=info@entry=0x7f1c183bab10, dirent=0x7f1c183ba5c8, get_all=1, status_func=0x7f1c2113c470 <status4_wrapper_func>,
status_baton=0x7f1c184112c8, scratch_pool=0x7f1c185b9028) at subversion/libsvn_wc/status.c:837
#34 0x00007f1c2115b6b3 in one_child_status (wb=wb@entry=0x7fff2000df90,
local_abspath=local_abspath@entry=0x7f1c185b90a0 "/tmp/tmptsz5g7o7-wc-wc/branches/v1x",
parent_abspath=parent_abspath@entry=0x7f1c183ba0a0 "/tmp/tmptsz5g7o7-wc-wc/branches", info=info@entry=0x7f1c183bab10,
dirent=dirent@entry=0x7f1c183ba5c8, dir_repos_root_url=0x7f1c183ba928 "file:///tmp/tmp2v9wzb1l-wc-repo",
dir_repos_relpath=0x7f1c183ba918 "branches", dir_repos_uuid=0x7f1c183ba948 "92ea810a-adf3-0310-b540-bef912dcf5ba",
unversioned_tree_conflicted=<optimized out>, collected_ignore_patterns=0x7fff2000dc20, ignore_patterns=0x7f1c184110a0,
depth=svn_depth_infinity, get_all=1, no_ignore=0, status_func=0x7f1c2113c470 <status4_wrapper_func>,
status_baton=0x7f1c184112c8, cancel_func=0x7f1c21b2b6a0 <svn_swig_py_cancel_func>, cancel_baton=0xa49aa0 <_Py_NoneStruct>,
result_pool=0x7f1c183ba028, scratch_pool=0x7f1c185b9028) at subversion/libsvn_wc/status.c:1114
#35 0x00007f1c2115bddd in get_dir_status (wb=wb@entry=0x7fff2000df90,
local_abspath=local_abspath@entry=0x7f1c183ba0a0 "/tmp/tmptsz5g7o7-wc-wc/branches", skip_this_dir=skip_this_dir@entry=1,
parent_repos_root_url=parent_repos_root_url@entry=0x7f1c183b6af0 "file:///tmp/tmp2v9wzb1l-wc-repo",
parent_repos_relpath=parent_repos_relpath@entry=0x7f1c183b6ae8 "",
parent_repos_uuid=parent_repos_uuid@entry=0x7f1c183b6b10 "92ea810a-adf3-0310-b540-bef912dcf5ba", dir_info=0x7f1c183b6f28,
dirent=0x7f1c183b6930, ignore_patterns=0x7f1c184110a0, depth=svn_depth_infinity, get_all=1, no_ignore=0,
status_func=0x7f1c2113c470 <status4_wrapper_func>, status_baton=0x7f1c184112c8,
cancel_func=0x7f1c21b2b6a0 <svn_swig_py_cancel_func>, cancel_baton=0xa49aa0 <_Py_NoneStruct>, scratch_pool=0x7f1c183ba028)
at subversion/libsvn_wc/status.c:1362
#36 0x00007f1c2115b732 in one_child_status (wb=wb@entry=0x7fff2000df90,
local_abspath=local_abspath@entry=0x7f1c183ba0a0 "/tmp/tmptsz5g7o7-wc-wc/branches",
parent_abspath=parent_abspath@entry=0x7f1c18411488 "/tmp/tmptsz5g7o7-wc-wc", info=info@entry=0x7f1c183b6f28,
dirent=dirent@entry=0x7f1c183b6930, dir_repos_root_url=0x7f1c183b6af0 "file:///tmp/tmp2v9wzb1l-wc-repo",
dir_repos_relpath=0x7f1c183b6ae8 "", dir_repos_uuid=0x7f1c183b6b10 "92ea810a-adf3-0310-b540-bef912dcf5ba",
unversioned_tree_conflicted=<optimized out>, collected_ignore_patterns=0x7fff2000de70, ignore_patterns=0x7f1c184110a0,
depth=svn_depth_infinity, get_all=1, no_ignore=0, status_func=0x7f1c2113c470 <status4_wrapper_func>,
status_baton=0x7f1c184112c8, cancel_func=0x7f1c21b2b6a0 <svn_swig_py_cancel_func>, cancel_baton=0xa49aa0 <_Py_NoneStruct>,
result_pool=0x7f1c183b6028, scratch_pool=0x7f1c183ba028) at subversion/libsvn_wc/status.c:1126
#37 0x00007f1c2115bddd in get_dir_status (wb=wb@entry=0x7fff2000df90,
local_abspath=local_abspath@entry=0x7f1c18411488 "/tmp/tmptsz5g7o7-wc-wc", skip_this_dir=skip_this_dir@entry=0,
parent_repos_root_url=parent_repos_root_url@entry=0x0, parent_repos_relpath=parent_repos_relpath@entry=0x0,
parent_repos_uuid=parent_repos_uuid@entry=0x0, dir_info=0x7f1c183b60a0, dirent=0x7f1c183b65c0, ignore_patterns=0x7f1c184110a0,
depth=svn_depth_infinity, get_all=1, no_ignore=0, status_func=0x7f1c2113c470 <status4_wrapper_func>,
status_baton=0x7f1c184112c8, cancel_func=0x7f1c21b2b6a0 <svn_swig_py_cancel_func>, cancel_baton=0xa49aa0 <_Py_NoneStruct>,
scratch_pool=0x7f1c183b6028) at subversion/libsvn_wc/status.c:1362
#38 0x00007f1c2115ceb5 in svn_wc__internal_walk_status (db=0x7f1c1844a0b8, local_abspath=0x7f1c18411488 "/tmp/tmptsz5g7o7-wc-wc",
depth=svn_depth_infinity, get_all=1, no_ignore=0, ignore_text_mods=ignore_text_mods@entry=0, ignore_patterns=0x7f1c184110a0,
status_func=0x7f1c2113c470 <status4_wrapper_func>, status_baton=0x7f1c184112c8,
cancel_func=0x7f1c21b2b6a0 <svn_swig_py_cancel_func>, cancel_baton=0xa49aa0 <_Py_NoneStruct>, scratch_pool=0x7f1c183b6028)
at subversion/libsvn_wc/status.c:2693
#39 0x00007f1c2115d11c in close_edit (edit_baton=<optimized out>, pool=<optimized out>) at subversion/libsvn_wc/status.c:2442
#40 0x00007f1c1c9f5858 in svn_delta_editor_invoke_close_edit (_obj=0x7f1c18411b08, scratch_pool=0x7f1c183b6028,
edit_baton=<optimized out>) at subversion/bindings/swig/python/svn_delta.c:3505
#41 _wrap_svn_delta_editor_invoke_close_edit (self=<optimized out>, args=<optimized out>)
at subversion/bindings/swig/python/svn_delta.c:8652
#42 0x0000000000429a65 in ?? ()
#43 0x0000000000561faa in _PyEval_EvalFrameDefault ()
#44 0x000000000055b2aa in _PyEval_EvalCodeWithName ()
#45 0x00000000004294c0 in _PyFunction_FastCallDict ()
#46 0x000000000055d9b4 in _PyEval_EvalFrameDefault ()
#47 0x000000000055b2aa in _PyEval_EvalCodeWithName ()
#48 0x00000000004ea745 in _PyFunction_FastCallKeywords ()
#49 0x00000000005607c0 in _PyEval_EvalFrameDefault ()
#50 0x000000000055b668 in _PyEval_EvalCodeWithName ()
#51 0x00000000004ea745 in _PyFunction_FastCallKeywords ()
#52 0x000000000055c1a9 in _PyEval_EvalFrameDefault ()
#53 0x000000000055b2aa in _PyEval_EvalCodeWithName ()
#54 0x00000000004eae73 in _PyObject_Call_Prepend ()
#55 0x00000000004eb2fe in PyObject_Call ()
#56 0x000000000055d9b4 in _PyEval_EvalFrameDefault ()
#57 0x000000000055b2aa in _PyEval_EvalCodeWithName ()
#58 0x00000000004eae18 in _PyObject_Call_Prepend ()
#59 0x0000000000530547 in ?? ()
#60 0x00000000004e97ba in _PyObject_FastCallKeywords ()
#61 0x0000000000560895 in _PyEval_EvalFrameDefault ()
#62 0x000000000055b2aa in _PyEval_EvalCodeWithName ()
#63 0x00000000004eae73 in _PyObject_Call_Prepend ()
#64 0x00000000004eb2fe in PyObject_Call ()
#65 0x000000000055d9b4 in _PyEval_EvalFrameDefault ()
#66 0x000000000055b2aa in _PyEval_EvalCodeWithName ()
#67 0x00000000004eae18 in _PyObject_Call_Prepend ()
#68 0x0000000000530547 in ?? ()
#69 0x00000000004e97ba in _PyObject_FastCallKeywords ()
#70 0x0000000000560895 in _PyEval_EvalFrameDefault ()
#71 0x000000000055b2aa in _PyEval_EvalCodeWithName ()
#72 0x00000000004eae73 in _PyObject_Call_Prepend ()
#73 0x00000000004eb2fe in PyObject_Call ()
#74 0x000000000055d9b4 in _PyEval_EvalFrameDefault ()
#75 0x000000000055b2aa in _PyEval_EvalCodeWithName ()
#76 0x00000000004eae18 in _PyObject_Call_Prepend ()
#77 0x0000000000530547 in ?? ()
#78 0x00000000004e97ba in _PyObject_FastCallKeywords ()
#79 0x0000000000560895 in _PyEval_EvalFrameDefault ()
#80 0x000000000055b2aa in _PyEval_EvalCodeWithName ()
#81 0x00000000004eae73 in _PyObject_Call_Prepend ()
#82 0x00000000004eb2fe in PyObject_Call ()
#83 0x000000000055d9b4 in _PyEval_EvalFrameDefault ()
#84 0x000000000055b2aa in _PyEval_EvalCodeWithName ()
#85 0x00000000004eae18 in _PyObject_Call_Prepend ()
#86 0x0000000000530547 in ?? ()
#87 0x00000000004e97ba in _PyObject_FastCallKeywords ()
#88 0x0000000000560895 in _PyEval_EvalFrameDefault ()
#89 0x00000000004ea66a in _PyFunction_FastCallKeywords ()
#90 0x000000000055c41f in _PyEval_EvalFrameDefault ()
#91 0x00000000004ea66a in _PyFunction_FastCallKeywords ()
#92 0x000000000055c41f in _PyEval_EvalFrameDefault ()
#93 0x000000000055b668 in _PyEval_EvalCodeWithName ()
#94 0x00000000004eb078 in _PyObject_Call_Prepend ()
#95 0x000000000052d257 in ?? ()
#96 0x000000000052a7b9 in ?? ()
#97 0x00000000004e98a5 in _PyObject_FastCallKeywords ()
#98 0x00000000005616fa in _PyEval_EvalFrameDefault ()
#99 0x000000000055b2aa in _PyEval_EvalCodeWithName ()
#100 0x000000000055b033 in PyEval_EvalCode ()
#101 0x000000000062d082 in ?? ()
#102 0x000000000062d4ea in PyRun_FileExFlags ()
#103 0x000000000062d2a7 in PyRun_SimpleFileExFlags ()
#104 0x0000000000606505 in ?? ()
#105 0x000000000060618a in _Py_UnixMain ()
#106 0x00007f1c228ff830 in __libc_start_main (main=0x4e58c0 <main>, argc=2, argv=0x7fff20010ec8, init=<optimized out>,
fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff20010eb8) at ../csu/libc-start.c:291
#107 0x0000000000606079 in _start ()
diff --git a/subversion/bindings/swig/python/tests/wc.py b/subversion/bindings/swig/python/tests/wc.py
index 721ec2d78..e35ae4971 100644
--- a/subversion/bindings/swig/python/tests/wc.py
+++ b/subversion/bindings/swig/python/tests/wc.py
@@ -159,7 +159,6 @@ class SubversionWorkingCopyTestCase(unittest.TestCase):
def test_status_editor(self):
paths = []
def status_func(target, status):
- self.assertTrue(target.startswith(self.path))
paths.append(target)
(anchor_access, target_access,
@@ -176,6 +175,9 @@ class SubversionWorkingCopyTestCase(unittest.TestCase):
None, # traversal_info
)
editor.close_edit(edit_baton)
+
+ for target in paths:
+ self.assertTrue(target.startswith(self.path))
self.assertTrue(len(paths) > 0)
def test_is_normal_prop(self):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment