Fwd: SEGV in dbus-ping-send.c
Vitaly V. Ch
vitaly.v.ch at gmail.com
Wed Oct 24 09:42:04 PDT 2007
Thanks, It solve problem.
How about I found out direct link on dbus-ping-XXXX.c on freedesktop.orf?
On 10/24/07, Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> wrote:
>
> On Wed, 2007-10-24 at 12:04 +0300, ext Vitaly V. Ch wrote:
> >
> >
> > ---------- Forwarded message ----------
> > From: Vitaly V. Ch <vitaly.v.ch at gmail.com>
> > Date: Oct 23, 2007 4:52 PM
> > Subject: Re: SEGV in dbus-ping-send.c
> > To: Rafaël Carré <funman at videolan.org>
> >
> > Hm. It's success. Thanks
> > But At now I have another troubles with dbus-ping-listen.
> >
> > sources and valgrind log is attached
> >
> > bash-3.1# gdb ./dbus-ping-listen
> > GNU gdb 6.6
> > Copyright (C) 2006 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and
> > you are
> > welcome to change it and/or distribute copies of it under certain
> > conditions.
> > Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB. Type "show warranty" for
> > details.
> > This GDB was configured as "i486-slackware-linux"...
> > Using host libthread_db library "/lib/libthread_db.so.1".
> > (gdb) run
> > Starting program: /root/projects.izum/dbus.ping/dbus-ping-listen
> > Ping received: Ping!
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0xb7d4e0c7 in free () from /lib/libc.so.6
> > (gdb) bt
> > #0 0xb7d4e0c7 in free () from /lib/libc.so.6
> > #1 0xb7f17e91 in dbus_free () from /usr/lib/libdbus-1.so.3
> > #2 0x080488db in signal_filter (connection=0x804b6e8,
> > message=0x804bb10, user_data=0x804ae88) at dbus-ping-listen.c :57
>
> Just remove the dbus_free() call from signal_filter(), the string is not
> a copy.
>
> BR, Kimmo
>
> > #3 0xb7efea2c in dbus_connection_dispatch ()
> > from /usr/lib/libdbus-1.so.3
> > #4 0xb7f2b56d in ?? () from /usr/lib/libdbus-glib-1.so.2
> > #5 0x0804b6e8 in ?? ()
> > #6 0x0804d4b8 in ?? ()
> > #7 0xbfbbf188 in ?? ()
> > #8 0xb7e69da2 in g_slist_prepend () from /usr/lib/libglib-2.0.so.0
> > #9 0xb7e51b11 in g_main_context_dispatch ()
> > from /usr/lib/libglib-2.0.so.0
> > #10 0xb7e54b86 in ?? () from /usr/lib/libglib-2.0.so.0
> > #11 0x0804a008 in ?? ()
> > #12 0x00000000 in ?? ()
> > (gdb) quit
> > The program is running. Exit anyway? (y or n) y
> > bash-3.1#
> >
> >
> >
> > On 10/23/07, Rafaël Carré <funman at videolan.org> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Vitaly V. Ch a écrit :
> > > I receive unexpected SIGSEGV at trying to start dbus-ping-
> > send from
> > > examples.
> > >
> > > dbus-ping-send.c is attached.
> > >
> > > system slackware-12.0
> > >
> > > bash-3.1# gdb ./dbus-ping-send
> > > GNU gdb 6.6
> > > Copyright (C) 2006 Free Software Foundation, Inc.
> > > GDB is free software, covered by the GNU General Public
> > License, and you are
> > > welcome to change it and/or distribute copies of it under
> > certain
> > > conditions.
> > > Type "show copying" to see the conditions.
> > > There is absolutely no warranty for GDB. Type "show
> > warranty" for details.
> > > This GDB was configured as "i486-slackware-linux"...
> > > Using host libthread_db library "/lib/libthread_db.so.1".
> > > (gdb) break send_ping
> > > Breakpoint 1 at 0x80487c7: file dbus-ping-send.c, line 44.
> > > (gdb) run
> > > Starting program: /root/projects.izum/dbus.ping/dbus-ping-
> > send
> > >
> > > Breakpoint 1, send_ping (bus=0x804b6e8) at dbus-ping-
> > send.c:44
> > > 44 message = dbus_message_new_signal
> > ("/com/burtonini/dbus/ping",
> > > (gdb) next
> > > 47 dbus_message_append_args (message,
> > > (gdb)
> > >
> > > Program received signal SIGSEGV, Segmentation fault.
> > > 0xb7cec253 in strlen () from /lib/libc.so.6
> > > (gdb) bt
> > > #0 0xb7cec253 in strlen () from /lib/libc.so.6
> > > #1 0xb7eb2751 in ?? () from /usr/lib/libdbus- 1.so.3
> > > #2 0x676e6950 in ?? ()
> > > #3 0x00000061 in ?? ()
> > > #4 0x0000006c in ?? ()
> > > #5 0xbfe8d398 in ?? ()
> > > #6 0xb7dbbff4 in ?? () from /lib/libc.so.6
> > > #7 0xb7dbd120 in ?? () from /lib/libc.so.6
> > > #8 0x0000000c in ?? ()
> > > #9 0xb7eb3a3c in ?? () from /usr/lib/libdbus-1.so.3
> > > #10 0xb7ce7b7e in malloc () from /lib/libc.so.6
> > > #11 0xb7e9f4cc in ?? () from /usr/lib/libdbus-1.so.3
> > > #12 0x0804bb50 in ?? ()
> > > #13 0x00000000 in ?? ()
> > > (gdb) quit
> > > The program is running. Exit anyway? (y or n) y
> > > bash-3.1#
> > >
> > >
> > > Log of runing under valgrind is attached also
> > >
> >
> > char *ping = "Ping!";
> > dbus_message_append_args (message,
> > DBUS_TYPE_STRING, &ping,
> >
> > is the correct way to go
> >
> > - --
> > Rafaël Carré
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.6 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iD8DBQFHHfeiYWCeGMCv8Q8RAh5xAJ4jTutO7trbdMAOQHQ9shRQLlr6wQCZAYWU
> > LtIq8fHm9ukaqH4ygohzx+Y=
> > =lhVY
> > -----END PGP SIGNATURE-----
> >
> >
> >
> > _______________________________________________
> > dbus mailing list
> > dbus at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/dbus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20071024/0f465976/attachment.htm
More information about the dbus
mailing list