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