[Kde-bindings] Hash to QVariant crash
David Palacio
dpalacio at orbitalibre.org
Thu Apr 21 02:56:08 UTC 2011
Greetings,
I have been experiencing a crash when creating a QVariant with a ruby
string key-ed hash as only argument (Using KDE/git master and Qt 4.7.2).
The backtrace is attached. I cannot reproduce it in Debian stable with
kdebindings 4.4.5 nor git/master. Debian stable ships with Qt 4.6.3.
Using the debugger I found that MethodCallBase::item is accessing an
invalid index (1) on MethodCall::_stack (which has 1 elements).
I also attach a diff which fixes this.
Regards,
David
-------------- next part --------------
*** glibc detected *** /usr/bin/ruby: free(): invalid pointer: 0x0000000000690b90 ***
======= Backtrace: =========
/lib/libc.so.6(+0x72336)[0x7ffff77ee336]
/home/kde/KDE/lib/libqtruby4shared.so.2(_ZN6QtRuby10MethodCallD1Ev+0x3b)[0x7ffff329a3e5]
/home/kde/ruby/bin/qtruby4.so(+0x1f6c6)[0x7ffff65396c6]
/usr/lib/libruby18.so.1.8(+0x3a60e)[0x7ffff7b1560e]
/usr/lib/libruby18.so.1.8(+0x3a7ed)[0x7ffff7b157ed]
/usr/lib/libruby18.so.1.8(+0x3fa90)[0x7ffff7b1aa90]
/usr/lib/libruby18.so.1.8(+0x40278)[0x7ffff7b1b278]
/usr/lib/libruby18.so.1.8(+0x45fe5)[0x7ffff7b20fe5]
/usr/lib/libruby18.so.1.8(ruby_exec+0x15)[0x7ffff7b21025]
/usr/lib/libruby18.so.1.8(ruby_run+0x25)[0x7ffff7b236f5]
/usr/bin/ruby[0x40095c]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7ffff779ab6d]
/usr/bin/ruby[0x400869]
======= Memory map: ========
00400000-00401000 r-xp 00000000 fe:00 349200 /usr/bin/ruby18
00600000-00601000 r--p 00000000 fe:00 349200 /usr/bin/ruby18
00601000-00602000 rw-p 00001000 fe:00 349200 /usr/bin/ruby18
00602000-00979000 rw-p 00000000 00:00 0 [heap]
7fffed3b4000-7fffed5ee000 rw-p 00000000 00:00 0
7fffed5ee000-7fffee9e7000 r-xp 00000000 fe:00 762992 /usr/lib64/libnvidia-glcore.so.260.19.36
7fffee9e7000-7fffeebe7000 ---p 013f9000 fe:00 762992 /usr/lib64/libnvidia-glcore.so.260.19.36
7fffeebe7000-7fffef1c4000 rwxp 013f9000 fe:00 762992 /usr/lib64/libnvidia-glcore.so.260.19.36
7fffef1c4000-7fffef1da000 rwxp 00000000 00:00 0
7fffef1da000-7fffef1db000 r-xp 00000000 fe:00 818063 /usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.260.19.36
7fffef1db000-7fffef3db000 ---p 00001000 fe:00 818063 /usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.260.19.36
7fffef3db000-7fffef3dc000 rw-p 00001000 fe:00 818063 /usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.260.19.36
7fffef3dc000-7fffef3e1000 r-xp 00000000 fe:00 589968 /usr/lib64/libXdmcp.so.6.0.0
7fffef3e1000-7fffef5e0000 ---p 00005000 fe:00 589968 /usr/lib64/libXdmcp.so.6.0.0
7fffef5e0000-7fffef5e1000 r--p 00004000 fe:00 589968 /usr/lib64/libXdmcp.so.6.0.0
7fffef5e1000-7fffef5e2000 rw-p 00005000 fe:00 589968 /usr/lib64/libXdmcp.so.6.0.0
7fffef5e2000-7fffef5e4000 r-xp 00000000 fe:00 590096 /usr/lib64/libXau.so.6.0.0
7fffef5e4000-7fffef7e4000 ---p 00002000 fe:00 590096 /usr/lib64/libXau.so.6.0.0
7fffef7e4000-7fffef7e5000 r--p 00002000 fe:00 590096 /usr/lib64/libXau.so.6.0.0
7fffef7e5000-7fffef7e6000 rw-p 00003000 fe:00 590096 /usr/lib64/libXau.so.6.0.0
7fffef7e6000-7fffef89d000 r-xp 00000000 fe:00 817683 /usr/lib64/opengl/nvidia/lib/libGL.so.260.19.36
7fffef89d000-7fffefa9d000 ---p 000b7000 fe:00 817683 /usr/lib64/opengl/nvidia/lib/libGL.so.260.19.36
7fffefa9d000-7fffefad5000 rwxp 000b7000 fe:00 817683 /usr/lib64/opengl/nvidia/lib/libGL.so.260.19.36
7fffefad5000-7fffefaeb000 rwxp 00000000 00:00 0
7fffefaeb000-7fffefb08000 r-xp 00000000 fe:00 610115 /usr/lib64/libxcb.so.1.1.0
7fffefb08000-7fffefd07000 ---p 0001d000 fe:00 610115 /usr/lib64/libxcb.so.1.1.0
7fffefd07000-7fffefd08000 r--p 0001c000 fe:00 610115 /usr/lib64/libxcb.so.1.1.0
7fffefd08000-7fffefd09000 rw-p 0001d000 fe:00 610115 /usr/lib64/libxcb.so.1.1.0
7fffefd09000-7fffefd30000 r-xp 00000000 fe:00 10865 /usr/lib64/libexpat.so.1.5.2
7fffefd30000-7fffeff30000 ---p 00027000 fe:00 10865 /usr/lib64/libexpat.so.1.5.2
7fffeff30000-7fffeff32000 r--p 00027000 fe:00 10865 /usr/lib64/libexpat.so.1.5.2
7fffeff32000-7fffeff33000 rw-p 00029000 fe:00 10865 /usr/lib64/libexpat.so.1.5.2
7fffeff33000-7fffeff37000 r-xp 00000000 fe:00 666065 /lib64/libuuid.so.1.3.0
7fffeff37000-7ffff0136000 ---p 00004000 fe:00 666065 /lib64/libuuid.so.1.3.0
7ffff0136000-7ffff0137000 r--p 00003000 fe:00 666065 /lib64/libuuid.so.1.3.0
7ffff0137000-7ffff0138000 rw-p 00004000 fe:00 666065 /lib64/libuuid.so.1.3.0
7ffff0138000-7ffff018e000 r-xp 00000000 fe:00 983261 /usr/lib64/qt4/libQtSvg.so.4.7.2
7ffff018e000-7ffff038e000 ---p 00056000 fe:00 983261 /usr/lib64/qt4/libQtSvg.so.4.7.2
7ffff038e000-7ffff0390000 r--p 00056000 fe:00 983261 /usr/lib64/qt4/libQtSvg.so.4.7.2
7ffff0390000-7ffff0391000 rw-p 00058000 fe:00 983261 /usr/lib64/qt4/libQtSvg.so.4.7.2
7ffff0391000-7ffff03cf000 r-xp 00000000 fe:00 692517 /usr/lib64/qt4/libQtSql.so.4.7.2
7ffff03cf000-7ffff05ce000 ---p 0003e000 fe:00 692517 /usr/lib64/qt4/libQtSql.so.4.7.2
7ffff05ce000-7ffff05d0000 r--p 0003d000 fe:00 692517 /usr/lib64/qt4/libQtSql.so.4.7.2
7ffff05d0000-7ffff05d1000 rw-p 0003f000 fe:00 692517 /usr/lib64/qt4/libQtSql.so.4.7.2
7ffff05d1000-7ffff06b5000 r-xp 00000000 fe:00 973322 /usr/lib64/qt4/libQtOpenGL.so.4.7.2
7ffff06b5000-7ffff08b5000 ---p 000e4000 fe:00 973322 /usr/lib64/qt4/libQtOpenGL.so.4.7.2
7ffff08b5000-7ffff08b9000 r--p 000e4000 fe:00 973322 /usr/lib64/qt4/libQtOpenGL.so.4.7.2
7ffff08b9000-7ffff08be000 rw-p 000e8000 fe:00 973322 /usr/lib64/qt4/libQtOpenGL.so.4.7.2
7ffff08be000-7ffff08bf000 rw-p 00000000 00:00 0
7ffff08bf000-7ffff0903000 r-xp 00000000 fe:00 158421 /usr/lib64/libdbus-1.so.3.5.4
7ffff0903000-7ffff0b02000 ---p 00044000 fe:00 158421 /usr/lib64/libdbus-1.so.3.5.4
7ffff0b02000-7ffff0b03000 r--p 00043000 fe:00 158421 /usr/lib64/libdbus-1.so.3.5.4
7ffff0b03000-7ffff0b04000 rw-p 00044000 fe:00 158421 /usr/lib64/libdbus-1.so.3.5.4
7ffff0b04000-7ffff0b46000 r-xp 00000000 fe:00 463011 /usr/lib64/qt4/libQtXml.so.4.7.2
7ffff0b46000-7ffff0d46000 ---p 00042000 fe:00 463011 /usr/lib64/qt4/libQtXml.so.4.7.2
7ffff0d46000-7ffff0d48000 r--p 00042000 fe:00 463011 /usr/lib64/qt4/libQtXml.so.4.7.2
7ffff0d48000-7ffff0d49000 rw-p 00044000 fe:00 463011 /usr/lib64/qt4/libQtXml.so.4.7.2
7ffff0d49000-7ffff0e83000 r-xp 00000000 fe:00 609581 /usr/lib64/libX11.so.6.3.0
7ffff0e83000-7ffff1083000 ---p 0013a000 fe:00 609581 /usr/lib64/libX11.so.6.3.0
7ffff1083000-7ffff1084000 r--p 0013a000 fe:00 609581 /usr/lib64/libX11.so.6.3.0
7ffff1084000-7ffff1089000 rw-p 0013b000 fe:00 609581 /usr/lib64/libX11.so.6.3.0
7ffff1089000-7ffff109b000 r-xp 00000000 fe:00 609713 /usr/lib64/libXext.so.6.4.0
Program received signal SIGABRT, Aborted.
0x00007ffff77ae455 in raise () from /lib/libc.so.6
(gdb) bt
#0 0x00007ffff77ae455 in raise () from /lib/libc.so.6
#1 0x00007ffff77af8d6 in abort () from /lib/libc.so.6
#2 0x00007ffff77e8ea3 in ?? () from /lib/libc.so.6
#3 0x00007ffff77ee336 in ?? () from /lib/libc.so.6
#4 0x00007ffff329a3e5 in QtRuby::MethodCall::~MethodCall (this=0x7fffffffcc20, __in_chrg=<value optimized out>) at /home/kde/src/KDE/qtruby/src/marshall_types.cpp:553
#5 0x00007ffff65396c6 in new_qvariant (argc=1, argv=0x7fffffffcfc0, self=140737353188720) at /home/kde/src/KDE/qtruby/src/qtruby.cpp:1226
#6 0x00007ffff7b1560e in ?? () from /usr/lib/libruby18.so.1.8
#7 0x00007ffff7b157ed in ?? () from /usr/lib/libruby18.so.1.8
#8 0x00007ffff7b1aa90 in ?? () from /usr/lib/libruby18.so.1.8
#9 0x00007ffff7b1b278 in ?? () from /usr/lib/libruby18.so.1.8
#10 0x00007ffff7b20fe5 in ?? () from /usr/lib/libruby18.so.1.8
#11 0x00007ffff7b21025 in ruby_exec () from /usr/lib/libruby18.so.1.8
#12 0x00007ffff7b236f5 in ruby_run () from /usr/lib/libruby18.so.1.8
#13 0x000000000040095c in main ()
-------------- next part --------------
--- a/src/qtruby.cpp
+++ b/src/qtruby.cpp
@@ -1223,7 +1223,7 @@ static Smoke::Index new_qvariant_qmap = 0;
if (argc == 1 && TYPE(argv[0]) == T_HASH) {
_current_method.smoke = qtcore_Smoke;
_current_method.index = new_qvariant_qmap;
- QtRuby::MethodCall c(qtcore_Smoke, _current_method.index, self, argv, argc-1);
+ QtRuby::MethodCall c(qtcore_Smoke, _current_method.index, self, argv, argc);
c.next();
return *(c.var());
} else if ( argc == 1
@@ -1233,7 +1233,7 @@ static Smoke::Index new_qvariant_qmap = 0;
{
_current_method.smoke = qtcore_Smoke;
_current_method.index = new_qvariant_qlist;
- QtRuby::MethodCall c(qtcore_Smoke, _current_method.index, self, argv, argc-1);
+ QtRuby::MethodCall c(qtcore_Smoke, _current_method.index, self, argv, argc);
c.next();
return *(c.var());
}
More information about the Kde-bindings
mailing list