GNOME Bugzilla – Bug 540696
gobject.markup_escape_text() causes python to segfault
Last modified: 2008-06-29 14:54:04 UTC
Steps to reproduce: 1. Start python /home/abbe $ python Python 2.5.2 (r252:60911, Jun 29 2008, 03:10:54) [GCC 4.2.1 20070719 [FreeBSD]] on freebsd7 Type "help", "copyright", "credits" or "license" for more information. >>> 2. import gobject module. >>> import gobject 3. Invoke gobject.markup_escape_text() with non-empty string argument. >>> print gobject.markup_escape_text('Hi') Stack trace: abbe [~] chateau% gdb `which python2.5` GNU gdb 6.1.1 [FreeBSD] Copyright 2004 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 "amd64-marcel-freebsd"... (gdb) core-file python.core warning: core file may not match specified executable file. Core was generated by `python'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libutil.so.7...done. Loaded symbols for /lib/libutil.so.7 Reading symbols from /lib/libm.so.5...done. Loaded symbols for /lib/libm.so.5 Reading symbols from /lib/libthr.so.3...done. Loaded symbols for /lib/libthr.so.3 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /usr/local/lib/python2.5/lib-dynload/readline.so...done. Loaded symbols for /usr/local/lib/python2.5/lib-dynload/readline.so Reading symbols from /lib/libreadline.so.7...done. Loaded symbols for /lib/libreadline.so.7 Reading symbols from /lib/libncurses.so.7...done. Loaded symbols for /lib/libncurses.so.7 Reading symbols from /usr/local/lib/python2.5/site-packages/gtk-2.0/gobject/_gobject.so...done. Loaded symbols for /usr/local/lib/python2.5/site-packages/gtk-2.0/gobject/_gobject.so Reading symbols from /usr/local/lib/libgobject-2.0.so.0...done. Loaded symbols for /usr/local/lib/libgobject-2.0.so.0 Reading symbols from /usr/local/lib/libglib-2.0.so.0...done. Loaded symbols for /usr/local/lib/libglib-2.0.so.0 Reading symbols from /usr/local/lib/libiconv.so.3...done. Loaded symbols for /usr/local/lib/libiconv.so.3 Reading symbols from /usr/local/lib/libintl.so.8...done. Loaded symbols for /usr/local/lib/libintl.so.8 Reading symbols from /usr/local/lib/libicui18n.so.38...done. Loaded symbols for /usr/local/lib/libicui18n.so.38 Reading symbols from /usr/local/lib/libpcre.so.0...done. Loaded symbols for /usr/local/lib/libpcre.so.0 Reading symbols from /usr/local/lib/libicuuc.so.38...done. Loaded symbols for /usr/local/lib/libicuuc.so.38 Reading symbols from /usr/local/lib/libicudata.so.38...done. Loaded symbols for /usr/local/lib/libicudata.so.38 Reading symbols from /usr/lib/libstdc++.so.6...done. Loaded symbols for /usr/lib/libstdc++.so.6 Reading symbols from /lib/libgcc_s.so.1...done. Loaded symbols for /lib/libgcc_s.so.1 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1
+ Trace 201643
Other information: OS: FreeBSD 7.0-RELEASE-p2 Architecture: AMD64 i386 users aren't having this issue.
This works fine for me on x86/linux.
Works fine for me on x86_64/linux. But checking the code I found an error, regarding int vs Py_ssize_t.
Fixed in 2-14 and trunk.
Thanks for fixing this bug, Gustavo. The fix works :) .