From: Roland S. <ro...@xi...> - 2005-08-16 21:27:03
|
Hi, i tried opensync on an amd64 system. It dies with a segfault=20 in osync_member_initialize when the initialize function of the plugin is called. I tried this with gcc-3.2 -3.3 and -4.0 and always got the same=20 result. I don't know how to track this. It seems to me, that the=20 stack gets somehow overwritten during the call to fs_initialize,=20 but this is only a guess. btw. compiling with -Werror fails because casting void* to int=20 gives a warning on x86_64. opensync_debug.c:65: warning: cast from pointer to integer of different siz= e This is a run of msynctool --sync filefile in gdb roland@alderaan:~/opensync$ gdb ./bin/msynctool GNU gdb 6.3-debian Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you ar= e welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-linux"...Using host libthread_db library= "/lib/libthread_db.so.1". (gdb) break opensync_member.c:982 No source file named opensync_member.c. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (opensync_member.c:982) pending. (gdb) run --sync filefile Starting program: /home/roland/opensync/bin/msynctool --sync filefile [Thread debugging using libthread_db enabled] [New Thread 46912515451632 (LWP 32346)] Breakpoint 2 at 0x2aaaaad56f94: file opensync_member.c, line 982. Pending breakpoint "opensync_member.c:982" resolved Synchronizing group "filefile" The previous synchronization was unlean. Slow-syncing [Switching to Thread 46912515451632 (LWP 32346)] Breakpoint 2, osync_member_initialize (member=3D0x515750, error=3D0x7fffffc= fb538) at opensync_member.c:982 982 if (!(member->plugindata =3D functions.initialize(member, e= rror))) { (gdb) print *member $1 =3D {id =3D 1, configdir =3D 0x5157e0 "/home/roland/.opensync/group1/1", configdata =3D 0x0, configsize =3D 0, plugin =3D 0x50a2e0, memberfunctions =3D 0x5156f0, group =3D 0x506740, enginedata =3D 0x512a70= , plugindata =3D 0x0, format_sinks =3D 0x50a170, objtype_sinks =3D 0x50a140= , pluginname =3D 0x517760 "file-sync", accepted_objtypes =3D 0x0, filters = =3D 0x0, extension =3D 0x0, loop =3D 0x512b80} (gdb) s fs_initialize (member=3D0x7fffffcfb538, error=3D0x7fffffcfb538) at file_syn= c.c:66 66 { (gdb) print *member $2 =3D {id =3D 0, configdir =3D 0x0, configdata =3D 0x0, configsize =3D 0, = plugin =3D 0x0, memberfunctions =3D 0x0, group =3D 0x0, enginedata =3D 0x0, plugindata = =3D 0x0, format_sinks =3D 0x0, objtype_sinks =3D 0x0, pluginname =3D 0x0, accepted_objtypes =3D 0x0, filters =3D 0x0, extension =3D 0x0, loop =3D 0= x0} (gdb) finish Run till exit from #0 fs_initialize (member=3D0x7fffffcfb538, error=3D0x7fffffcfb538) at file_sync.c:66 0x00002aaaaad56f9c in osync_member_initialize (member=3D0x0, error=3D0x7fffffcfb538) at opensync_member.c:982 982 if (!(member->plugindata =3D functions.initialize(member, e= rror))) { Value returned is $3 =3D (void *) 0x517670 (gdb) print *member Cannot access memory at address 0x0 (gdb) n Program received signal SIGSEGV, Segmentation fault. 0x00002aaaaad56f9f in osync_member_initialize (member=3D0x0, error=3D0x7fffffcfb538) at opensync_member.c:982 982 if (!(member->plugindata =3D functions.initialize(member, e= rror))) { (gdb) Roland |