Control: found 855124 2.2.17-1.1+b1
Control: fixed 855124 2.2.17-1.2+b1

Dear Maintainer,
this issue seems to be a problem with the default python
pointer/int sizes which seem to default
to 32 bit in stretch on amd64.
Attached patch tries to declare these to avoid the crashes.

For some reason this issue does not show up with a system
running with packages from unstable.

Kind regards,
Bernhard
From fb93de8120eafbe47e37038fbcdfb1232e8daee0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bernhard=20=C3=9Cbelacker?= <bernha...@mailbox.org>
Date: Wed, 8 May 2019 05:19:11 +0200
Subject: [PATCH] Add parameter and return type sizes for 64 bit systems.

https://bugs.debian.org/855124
---
 python/geis/geis_v2.py | 39 ++++++++++++++++++++++++++++++++-------
 1 file changed, 32 insertions(+), 7 deletions(-)

diff --git a/python/geis/geis_v2.py b/python/geis/geis_v2.py
index edd8063..793355f 100644
--- a/python/geis/geis_v2.py
+++ b/python/geis/geis_v2.py
@@ -62,24 +62,40 @@ try:
     _geis_new.errcheck = _check_null
     _geis_delete = _geis_lib.geis_delete
     _geis_get_configuration = _geis_lib.geis_get_configuration
+    _geis_get_configuration.argtypes = [ ctypes.c_void_p, ctypes.c_char_p ]
     _geis_dispatch_events = _geis_lib.geis_dispatch_events
+    _geis_dispatch_events.argtypes = [ ctypes.c_void_p ]
     _geis_register_class_callback = _geis_lib.geis_register_class_callback
     _geis_register_device_callback = _geis_lib.geis_register_device_callback
     _geis_register_event_callback = _geis_lib.geis_register_event_callback
     _geis_next_event = _geis_lib.geis_next_event
+    _geis_next_event.argtypes = [ ctypes.c_void_p, ctypes.c_void_p ]
 
     _geis_subscription_new = _geis_lib.geis_subscription_new
     _geis_subscription_new.restype = ctypes.c_void_p
+    _geis_subscription_new.argtypes = [ ctypes.c_void_p, ctypes.c_char_p, ctypes.c_int ]
     _geis_subscription_new.errcheck = _check_null
     _geis_subscription_delete = _geis_lib.geis_subscription_delete
     _geis_subscription_activate = _geis_lib.geis_subscription_activate
+    _geis_subscription_activate.argtypes = [ ctypes.c_void_p ]
     _geis_subscription_deactivate = _geis_lib.geis_subscription_deactivate
     _geis_subscription_name = _geis_lib.geis_subscription_name
+    _geis_subscription_add_filter = _geis_lib.geis_subscription_add_filter
+    _geis_subscription_add_filter.argtypes = [ ctypes.c_void_p, ctypes.c_void_p ]
 
     _geis_attr_name = _geis_lib.geis_attr_name
     _geis_attr_name.restype = ctypes.c_char_p
+    _geis_attr_name.argtypes = [ ctypes.c_void_p ]
     _geis_attr_type = _geis_lib.geis_attr_type
+    _geis_attr_type.argtypes = [ ctypes.c_void_p ]
     _geis_attr_value_to_pointer = _geis_lib.geis_attr_value_to_pointer
+    _geis_attr_value_to_pointer.restype = ctypes.c_void_p
+    _geis_attr_value_to_pointer.argtypes = [ ctypes.c_void_p ]
+    _geis_attr_value_to_string = _geis_lib.geis_attr_value_to_string
+    _geis_attr_value_to_string.restype = ctypes.c_char_p
+    _geis_attr_value_to_string.argtypes = [ ctypes.c_void_p ]
+    _geis_attr_value_to_integer = _geis_lib.geis_attr_value_to_integer
+    _geis_attr_value_to_integer.argtypes = [ ctypes.c_void_p ]
 
     _geis_event_type = _geis_lib.geis_event_type
     _geis_event_attr_count = _geis_lib.geis_event_attr_count
@@ -89,10 +105,14 @@ try:
     _geis_gesture_class_unref = _geis_lib.geis_gesture_class_unref
     _geis_gesture_class_name = _geis_lib.geis_gesture_class_name
     _geis_gesture_class_name.restype = ctypes.c_char_p
+    _geis_gesture_class_name.argtypes = [ ctypes.c_void_p ]
     _geis_gesture_class_id = _geis_lib.geis_gesture_class_id
+    _geis_gesture_class_id.argtypes = [ ctypes.c_void_p ]
     _geis_gesture_class_attr_count = _geis_lib.geis_gesture_class_attr_count
+    _geis_gesture_class_attr_count.argtypes = [ ctypes.c_void_p ]
     _geis_gesture_class_attr = _geis_lib.geis_gesture_class_attr
     _geis_gesture_class_attr.restype = ctypes.c_void_p
+    _geis_gesture_class_attr.argtypes = [ ctypes.c_void_p ]
 
     _geis_device_ref = _geis_lib.geis_device_ref
     _geis_device_unref = _geis_lib.geis_device_unref
@@ -125,6 +145,13 @@ try:
     _geis_frame_is_class = _geis_lib.geis_frame_is_class
     _geis_frame_touchid_count = _geis_lib.geis_frame_touchid_count
     _geis_frame_touchid = _geis_lib.geis_frame_touchid
+    
+    _geis_filter_new = _geis_lib.geis_filter_new
+    _geis_filter_new.restype = ctypes.c_void_p
+    _geis_filter_new.argtypes = [ ctypes.c_void_p, ctypes.c_char_p ]
+    _geis_filter_add_term = _geis_lib.geis_filter_add_term
+    _geis_filter_add_term.argtypes = [ ctypes.c_void_p, ctypes.c_int ]
+    
 
 except AttributeError as ex:
     print(ex)
@@ -399,7 +426,7 @@ def _attr_type_float(attr):
 def _attr_type_integer(attr):
     """ Extracts an attribute value as a integer.
     """
-    return _geis_lib.geis_attr_value_to_integer(attr)
+    return _geis_attr_value_to_integer(attr)
 
 
 def _attr_type_pointer(attr):
@@ -412,9 +439,7 @@ def _attr_type_pointer(attr):
 def _attr_type_string(attr):
     """ Extracts an attribute value as a string.
     """
-    geis_attr_value_to_string = _geis_lib.geis_attr_value_to_string
-    geis_attr_value_to_string.restype = ctypes.c_char_p
-    return geis_attr_value_to_string(attr)
+    return _geis_attr_value_to_string(attr)
 
 
 def _attr_type_unknown(attr):
@@ -568,7 +593,7 @@ class Filter(object):
     """
 
     def __init__(self, geis, name):
-        self._filter  = _geis_lib.geis_filter_new(geis, name.encode('utf-8'))
+        self._filter  = _geis_filter_new(geis, name.encode('utf-8'))
 
     def __del__(self):
         _geis_lib.geis_filter_delete(self._filter)
@@ -592,7 +617,7 @@ class Filter(object):
             if len(term) != 3:
                 raise ValueError('invalid filter term')
             name, op, value = term
-            _geis_lib.geis_filter_add_term(self._filter, facility,
+            _geis_filter_add_term(self._filter, facility,
                                            name.encode('utf-8'), op, value, 0)
 
 
@@ -643,7 +668,7 @@ class Subscription(object):
         # keep a reference to the filter for Python doesn't garbage collect it
         if filt not in self._filters:
             self._filters.append(filt)
-        _geis_lib.geis_subscription_add_filter(self._sub, filt)
+        _geis_subscription_add_filter(self._sub, filt)
 
     def remove_filter(self, filt):
         """ Removes a filter from the subscription.
-- 
2.11.0


# Unstable amd64 qemu VM 2019-05-08


apt update
apt dist-upgrade


reboot


apt install systemd-coredump xserver-xorg lightdm openbox x11vnc mc gdb strace 
rr geis-tools python3-gi gir1.2-gtk-3.0 python3.5-dbg libgeis1-dbgsym fakeroot 
git


systemctl start lightdm


export DISPLAY=:0
geisview


#########


benutzer@debian:~$ geisview 
Traceback (most recent call last):
  File "/usr/bin/geisview", line 29, in <module>
    import geisview.classview
  File "/usr/lib/python3/dist-packages/geisview/classview.py", line 22, in 
<module>
    from gi.repository import Gtk
ModuleNotFoundError: No module named 'gi'


-> Missing dependency to python3-gi ?


benutzer@debian:~$ geisview 
Traceback (most recent call last):
  File "/usr/bin/geisview", line 29, in <module>
    import geisview.classview
  File "/usr/lib/python3/dist-packages/geisview/classview.py", line 22, in 
<module>
    from gi.repository import Gtk
  File "/usr/lib/python3/dist-packages/gi/importer.py", line 133, in load_module
    'introspection typelib not found' % namespace)
ImportError: cannot import name Gtk, introspection typelib not found


-> Missing dependency to gir1.2-gtk-3.0 ?

#########


export DISPLAY=:0
benutzer@debian:~$ geisview 
/usr/lib/python3/dist-packages/geisview/classview.py:22: PyGIWarning: Gtk was 
imported without specifying a version first. Use gi.require_version('Gtk', 
'3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
creating subscription


-> Could not reproduce on current Unstable


#########
#########
#########


# Stretch amd64 qemu VM 2019-05-08


apt update
apt dist-upgrade


reboot


apt install systemd-coredump xserver-xorg lightdm openbox x11vnc mc gdb strace 
rr geis-tools python3-gi gir1.2-gtk-3.0 python3.5-dbg libgeis1-dbgsym fakeroot 
git
apt build-dep geis


systemctl start lightdm



mkdir /home/benutzer/source/geis/orig -p
cd    /home/benutzer/source/geis/orig
apt source geis
cd



export DISPLAY=:0
geisview


benutzer@debian:~$ geisview
/usr/lib/python3/dist-packages/geisview/classview.py:22: PyGIWarning: Gtk was 
imported without specifying a version first. Use gi.require_version('Gtk', 
'3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
Speicherzugriffsfehler (Speicherabzug geschrieben)


dmesg:
[  109.027525] geisview[7515]: segfault at ffffffff83caa468 ip 00007fd2923071b0 
sp 00007ffc8b066960 error 5 in libgeis.so.1.3.0[7fd2922f9000+25000]


root@debian:~# coredumpctl list
TIME                            PID   UID   GID SIG COREFILE EXE
Wed 2019-05-08 02:12:59 CEST   7515  1000  1000  11 present  /usr/bin/python3.5


root@debian:~# coredumpctl gdb 7515
           PID: 7515 (geisview)
           UID: 1000 (benutzer)
           GID: 1000 (benutzer)
        Signal: 11 (SEGV)
     Timestamp: Wed 2019-05-08 02:12:59 CEST (44s ago)
  Command Line: /usr/bin/python3 /usr/bin/geisview
    Executable: /usr/bin/python3.5
 Control Group: /user.slice/user-1000.slice/session-3.scope
          Unit: session-3.scope
         Slice: user-1000.slice
       Session: 3
     Owner UID: 1000 (benutzer)
       Boot ID: 2d72425d0d38485c8a6d4ab5c7ed193e
    Machine ID: 9e5901179cfe4b73bc18669e6a6e0ab9
      Hostname: debian
       Storage: 
/var/lib/systemd/coredump/core.geisview.1000.2d72425d0d38485c8a6d4ab5c7ed193e.7515.1557274379000000000000.lz4
       Message: Process 7515 (geisview) of user 1000 dumped core.
                
                Stack trace of thread 7515:
                #0  0x00007fd2923071b0 geis_get_configuration (libgeis.so.1)
                #1  0x00007fd28ee03aa8 ffi_call_unix64 
(_ctypes.cpython-35m-x86_64-linux-gnu.so)
                #2  0x00007fd28ee0350a ffi_call 
(_ctypes.cpython-35m-x86_64-linux-gnu.so)
                #3  0x00007fd28edfccb4 _ctypes_callproc 
(_ctypes.cpython-35m-x86_64-linux-gnu.so)
                #4  0x00007fd28edfb461 n/a 
(_ctypes.cpython-35m-x86_64-linux-gnu.so)
                #5  0x0000563881944e17 PyObject_Call (python3.5)
                #6  0x00005638818c44a6 PyEval_EvalFrameEx (python3.5)
                #7  0x00005638818c3f84 PyEval_EvalFrameEx (python3.5)
                #8  0x00005638818b116f PyEval_EvalCodeEx (python3.5)
                #9  0x00005638818fb0e3 n/a (python3.5)
                #10 0x0000563881944e17 PyObject_Call (python3.5)
                #11 0x000056388186234e n/a (python3.5)
                #12 0x0000563881944e17 PyObject_Call (python3.5)
                #13 0x00005638818f18c9 n/a (python3.5)
                #14 0x00005638819127c4 n/a (python3.5)
                #15 0x0000563881944e17 PyObject_Call (python3.5)
                #16 0x00005638818c44a6 PyEval_EvalFrameEx (python3.5)
                #17 0x00005638818c3f84 PyEval_EvalFrameEx (python3.5)
                #18 0x00005638818c8b06 n/a (python3.5)
                #19 0x00005638818c97bf PyEval_EvalCode (python3.5)
                #20 0x000056388198ea22 n/a (python3.5)
                #21 0x0000563881990ead PyRun_FileExFlags (python3.5)
                #22 0x000056388199164e PyRun_SimpleFileExFlags (python3.5)
                #23 0x00005638819be2e7 Py_Main (python3.5)
                #24 0x000056388184dd71 main (python3.5)
                #25 0x00007fd292a152e1 __libc_start_main (libc.so.6)
                #26 0x0000563881954a7a _start (python3.5)

GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
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.5...(no debugging symbols found)...done.

warning: core file may not match specified executable file.
[New LWP 7515]
[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 /usr/bin/geisview'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fd2923071b0 in geis_get_configuration () from 
/usr/lib/x86_64-linux-gnu/libgeis.so.1
(gdb) set width 0
(gdb) set pagination off
(gdb) bt
#0  0x00007fd2923071b0 in geis_get_configuration () from 
/usr/lib/x86_64-linux-gnu/libgeis.so.1
#1  0x00007fd28ee03aa8 in ffi_call_unix64 () from 
/usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so
#2  0x00007fd28ee0350a in ffi_call () from 
/usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so
#3  0x00007fd28edfccb4 in _ctypes_callproc () from 
/usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so
#4  0x00007fd28edfb461 in ?? () from 
/usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so
#5  0x0000563881944e17 in PyObject_Call ()
#6  0x00005638818c44a6 in PyEval_EvalFrameEx ()
#7  0x00005638818c3f84 in PyEval_EvalFrameEx ()
#8  0x00005638818b116f in PyEval_EvalCodeEx ()
#9  0x00005638818fb0e3 in ?? ()
#10 0x0000563881944e17 in PyObject_Call ()
#11 0x000056388186234e in ?? ()
#12 0x0000563881944e17 in PyObject_Call ()
#13 0x00005638818f18c9 in ?? ()
#14 0x00005638819127c4 in ?? ()
#15 0x0000563881944e17 in PyObject_Call ()
#16 0x00005638818c44a6 in PyEval_EvalFrameEx ()
#17 0x00005638818c3f84 in PyEval_EvalFrameEx ()
#18 0x00005638818c8b06 in ?? ()
#19 0x00005638818c97bf in PyEval_EvalCode ()
#20 0x000056388198ea22 in ?? ()
#21 0x0000563881990ead in PyRun_FileExFlags ()
#22 0x000056388199164e in PyRun_SimpleFileExFlags ()
#23 0x00005638819be2e7 in Py_Main ()
#24 0x000056388184dd71 in main ()



Core was generated by `/usr/bin/python3 /usr/bin/geisview'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  geis_get_configuration (geis=0xffffffff83caa440, 
configuration_item_name=<optimized out>, 
configuration_item_value=0x7fd29285a450) at geis.c:870
870     geis.c: Datei oder Verzeichnis nicht gefunden.
(gdb) set width 0
(gdb) set pagination off
(gdb) bt
#0  geis_get_configuration (geis=0xffffffff83caa440, 
configuration_item_name=<optimized out>, 
configuration_item_value=0x7fd29285a450) at geis.c:870
#1  0x00007fd28ee03aa8 in ffi_call_unix64 () from 
/usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so
#2  0x00007fd28ee0350a in ffi_call () from 
/usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so
#3  0x00007fd28edfccb4 in _call_function_pointer (argcount=3, 
resmem=0x7ffc8b066ae0, restype=<optimized out>, atypes=0x7ffc8b066a80, 
avalues=0x7ffc8b066ab0, pProc=0x7fd292307110 <geis_get_configuration>, 
flags=4353) at ./Modules/_ctypes/callproc.c:813
#4  _ctypes_callproc () at ./Modules/_ctypes/callproc.c:1151
#5  0x00007fd28edfb461 in PyCFuncPtr_call.lto_priv.76 () at 
./Modules/_ctypes/_ctypes.c:3876
#6  0x0000563881944e17 in PyObject_Call () at ../Objects/abstract.c:2166
#7  0x00005638818c44a6 in do_call (nk=<optimized out>, na=<optimized out>, 
pp_stack=0x7ffc8b066df0, func=<optimized out>) at ../Python/ceval.c:4951
#8  call_function (oparg=<optimized out>, pp_stack=0x7ffc8b066df0) at 
../Python/ceval.c:4747
#9  PyEval_EvalFrameEx () at ../Python/ceval.c:3251
#10 0x00005638818c3f84 in fast_function (nk=<optimized out>, na=<optimized 
out>, n=<optimized out>, pp_stack=0x7ffc8b066f20, func=<optimized out>) at 
../Python/ceval.c:4818
#11 call_function (oparg=<optimized out>, pp_stack=0x7ffc8b066f20) at 
../Python/ceval.c:4745
#12 PyEval_EvalFrameEx () at ../Python/ceval.c:3251
#13 0x00005638818b116f in _PyEval_EvalCodeWithName.lto_priv.1929 (qualname=0x0, 
name=<optimized out>, closure=0x0, kwdefs=0x0, defcount=0, defs=0x0, kwcount=0, 
kws=<optimized out>, argcount=<optimized out>, args=<optimized out>, 
locals=<optimized out>, globals=<optimized out>, _co=<optimized out>) at 
../Python/ceval.c:4033
#14 PyEval_EvalCodeEx () at ../Python/ceval.c:4054
#15 0x00005638818fb0e3 in function_call.lto_priv () at 
../Objects/funcobject.c:627
#16 0x0000563881944e17 in PyObject_Call () at ../Objects/abstract.c:2166
#17 0x000056388186234e in method_call.lto_priv () at 
../Objects/classobject.c:330
#18 0x0000563881944e17 in PyObject_Call () at ../Objects/abstract.c:2166
#19 0x00005638818f18c9 in slot_tp_init () at ../Objects/typeobject.c:6287
#20 0x00005638819127c4 in type_call.lto_priv () at ../Objects/typeobject.c:905
#21 0x0000563881944e17 in PyObject_Call () at ../Objects/abstract.c:2166
#22 0x00005638818c44a6 in do_call (nk=<optimized out>, na=<optimized out>, 
pp_stack=0x7ffc8b0672f0, func=<optimized out>) at ../Python/ceval.c:4951
#23 call_function (oparg=<optimized out>, pp_stack=0x7ffc8b0672f0) at 
../Python/ceval.c:4747
#24 PyEval_EvalFrameEx () at ../Python/ceval.c:3251
#25 0x00005638818c3f84 in fast_function (nk=<optimized out>, na=<optimized 
out>, n=<optimized out>, pp_stack=0x7ffc8b067420, func=<optimized out>) at 
../Python/ceval.c:4818
#26 call_function (oparg=<optimized out>, pp_stack=0x7ffc8b067420) at 
../Python/ceval.c:4745
#27 PyEval_EvalFrameEx () at ../Python/ceval.c:3251
#28 0x00005638818c8b06 in _PyEval_EvalCodeWithName.lto_priv.1929 () at 
../Python/ceval.c:4033
#29 0x00005638818c97bf in PyEval_EvalCodeEx () at ../Python/ceval.c:4054
#30 PyEval_EvalCode (co=<optimized out>, globals=<optimized out>, 
locals=<optimized out>) at ../Python/ceval.c:777
#31 0x000056388198ea22 in run_mod () at ../Python/pythonrun.c:976
#32 0x0000563881990ead in PyRun_FileExFlags () at ../Python/pythonrun.c:929
#33 0x000056388199164e in PyRun_SimpleFileExFlags () at 
../Python/pythonrun.c:396
#34 0x00005638819be2e7 in run_file (p_cf=0x7ffc8b06769c, 
filename=0x563883745280 L"/usr/bin/geisview", fp=0x5638837a51f0) at 
../Modules/main.c:318
#35 Py_Main () at ../Modules/main.c:768
#36 0x000056388184dd71 in main () at ../Programs/python.c:65
#37 0x00007fd292a152e1 in __libc_start_main (main=0x56388184dc90 <main>, 
argc=2, argv=0x7ffc8b0678a8, init=<optimized out>, fini=<optimized out>, 
rtld_fini=<optimized out>, stack_end=0x7ffc8b067898) at ../csu/libc-start.c:291
#38 0x0000563881954a7a in _start ()




(gdb) down
#0  geis_get_configuration (geis=0xffffffff83caa440, 
configuration_item_name=<optimized out>, 
configuration_item_value=0x7fd29285a450) at geis.c:870
870             = geis_backend_multiplexor_fd(geis->backend_multiplexor);

(gdb) display/i $pc
1: x/i $pc
=> 0x7fd2923071b0 <geis_get_configuration+160>: mov    0x28(%r8),%rdi
(gdb) print/x $r8
$1 = 0xffffffff83caa440
(gdb) x/1xg $r8 + 0x28
0xffffffff83caa468:     Cannot access memory at address 0xffffffff83caa468
(gdb) print geis
$2 = (Geis) 0xffffffff83caa440

(gdb) info reg
rax            0x7fd29278f850   140542377261136
rbx            0x7ffc8b066980   140722640939392
rcx            0x0      0
rdx            0x7fd29285a450   140542378091600
rsi            0x7fd29278f86d   140542377261165
rdi            0x7fd29231443c   140542372561980
rbp            0x7ffc8b066980   0x7ffc8b066980
rsp            0x7ffc8b066960   0x7ffc8b066960
r8             0xffffffff83caa440       -2083871680
r9             0x563883aedc10   94800727432208
r10            0x7ffc8b0668d0   140722640939216
r11            0x7fd292307110   140542372507920
r12            0x0      0
r13            0x4      4
r14            0x7ffc8b066a80   140722640939648
r15            0x7ffc8b066ab0   140722640939696
rip            0x7fd2923071b0   0x7fd2923071b0 <geis_get_configuration+160>
eflags         0x10246  [ PF ZF IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0


(gdb) list geis.c:857,880
857     /**
858      * Gets a named configuration item.
859      */
860     GeisStatus
861     geis_get_configuration(Geis        geis, 
862                            GeisString  configuration_item_name,
863                            void       *configuration_item_value)
864     {
865       GeisStatus status = GEIS_STATUS_NOT_SUPPORTED;
866
867       if (0 == strcmp(configuration_item_name, GEIS_CONFIGURATION_FD))
868       {
869         *(int*)configuration_item_value
870             = geis_backend_multiplexor_fd(geis->backend_multiplexor);       
    <<<<<<<<<<<<<<
871         status = GEIS_STATUS_SUCCESS; 
872       }
873       else if (0 == strcmp(configuration_item_name, GEIS_CONFIG_MAX_EVENTS))
874       {
875         *(int*)configuration_item_value
876             = 
geis_backend_multiplexor_max_events_per_pump(geis->backend_multiplexor);
877         status = GEIS_STATUS_SUCCESS; 
878       }
879       else if (0 == strcmp(configuration_item_name, 
GEIS_CONFIG_ATOMIC_GESTURES))
880       {




(gdb) py-bt
Traceback (most recent call first):
  File "/usr/lib/python3/dist-packages/geis/geis_v2.py", line 484, in 
get_configuration
    ctypes.byref(fd))
  File "/usr/bin/geisview", line 81, in __init__
    geis_fd = self._geis.get_configuration(geis.GEIS_CONFIGURATION_FD)
  File "/usr/bin/geisview", line 303, in main
    geis_viewer = GeisViewer(args)
  File "/usr/bin/geisview", line 308, in <module>
    main()



(gdb) py-list 478,490
 478        def get_configuration(self, item_name):
 479            """ Gets a named configuration value. """
 480            if (item_name == _geis_bindings.GEIS_CONFIGURATION_FD):
 481                fd = ctypes.c_long()
 482                status = _geis_get_configuration(self._instance,
 483                                                 item_name.encode('utf-8'),
>484                                                 ctypes.byref(fd))
 485                if status != _geis_bindings.GEIS_STATUS_SUCCESS:
 486                    raise GeisError('error retrieving GEIS fd')
 487                return fd.value
 488            raise ValueError('unsupported config item name')
 489    
 490        def set_configuration(self, name, value):

(gdb) py-print self
local 'self' = <Geis(_device_curry=None, _class_curry=None, 
_cb_wrapper=<CFunctionType at remote 0x7fd287e79818>, _instance=94800729252928, 
_event_curry=None) at remote 0x7fd29278beb8>

(gdb) print/x 94800729252928
$3 = 0x563883caa440



0xffffffff83caa440
    0x563883caa440
-> Pointer truncation ?




set width 0
set pagination off
directory /home/benutzer/source/geis/orig/geis-2.2.17/libgeis
bt


###########


benutzer@debian:~/source/geis/orig/geis-2.2.17$ dpkg -l | grep geis
ii  geis-tools                       2.2.17-1.1+b1                  amd64       
 Gesture engine interface support - test tools
ii  libgeis1:amd64                   2.2.17-1.1+b1                  amd64       
 Gesture engine interface support
ii  libgeis1-dbgsym:amd64            2.2.17-1.1+b1                  amd64       
 Debug symbols for libgeis1
ii  python3-geis                     2.2.17-1.1+b1                  amd64       
 Python3 bindings for libgeis



###########



cd /home/benutzer/source/geis
cp orig try1 -a
cd try1/geis-2.2.17/
dpkg-buildpackage

cd /home/benutzer/source/geis/try1
dpkg -i geis-tools_2.2.17-1.1_amd64.deb libgeis1_2.2.17-1.1_amd64.deb 
libgeis1-dbgsym_2.2.17-1.1_amd64.deb python3-geis_2.2.17-1.1_amd64.deb

-> Segfault

Reply via email to