[Geany] Crash in compare_symbol()

Enrico Tröger enrico.troeger at xxxxx
Wed Aug 1 17:25:48 UTC 2007


On Tue, 31 Jul 2007 19:05:10 +0200, Enrico Tröger
<enrico.troeger at uvena.de> wrote:

> On Tue, 31 Jul 2007 03:46:00 -0500, "Jeff Pohlmeyer"
> <yetanothergeek at gmail.com> wrote:
> 
> > I just ran into a (probably rare) crash bug in Geany.
> > 
> > If I try to switch Document->Set Encoding from "Unicode->UTF-8"
> > to "Without encoding" , then the next time I save the document
> > I get a segfault. It looks like it happens when Geany tries to
> > rebuild the tags...
> > 
> > 
> > 
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread -1219221808 (LWP 30632)]
> > 0xb75d8f91 in strcmp () from /lib/libc.so.6
> > 
> > (gdb) bt
> > #0  0xb75d8f91 in strcmp () from /lib/libc.so.6
> > #1  0x080c5e8e in compare_symbol (a=0x84ed040, b=0x84ed030) at
> > #symbols.c:311
> > ....
> > ....
> > ....
> > #37 0x080b2581 in main (argc=12, argv=0xbfe97994) at main.c:769
> > 
> > (gdb) frame 1
> > #1  0x080c5e8e in compare_symbol (a=0x84ed040, b=0x84ed030) at
> > #symbols.c:311
> > 311             ret = strcmp(a->str, b->str);
> > 
> > (gdb) print a->str
> > $1 = (gchar *) 0x0
> > 
> > (gdb) print b->str
> > $2 = (gchar *) 0x0
> > 
> > 
> > As you can see, compare_symbol() calls strcmp(0x0,0x0) but I don't
> > know enough about what's happening to know if it's OK just to check
> > if ( a->str && b->str ) else return 0, or maybe there is a problem
> > with the upstream code that this should never happen anyway.
> The upstream code(we are talking about tagmanager?) isn't the problem.
> The problem is my code, as usual ;-). Should be double-fixed in SVN
> r1767 (double because the cause and effect were fixed).
I forgot to mention: Thanks for reporting.

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.key
Powered by Debian GNU/Linux, GnuPG and Sylpheed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20070801/07fcf628/attachment.pgp>


More information about the Users mailing list