[Gambas-user] Elusive Gambas3 crashing bug

Jussi Lahtinen jussi.lahtinen at ...626...
Thu Nov 11 21:48:35 CET 2010


Hi!
I'm doing quick and dirty "GambasTester" project.
Idea is to fuzz with all commands to find out if all works correctly within
current revision.
Of course it is not possible to test all combinations and situations, but
much better than nothing.
I know IDE is pretty good tester itself, but this will be better in some
aspects, as it will automatically test things for you
and it uses commands that IDE doesn't.

While doing this I crashed gambas several times.
I ran this command in IDE's console (replacing X with several different
numbers):
? bin(rol(1073741784+ shl(9,2) + shr(24,3),X ),32)


(gdb) set args /usr/local/bin/gambas3
(gdb) run
Starting program: /usr/local/bin/gbr3 /usr/local/bin/gambas3
[Thread debugging using libthread_db enabled]
warning: unable to load Qt translation: en_GB.utf8
[New Thread 0x7fffdfa60710 (LWP 31378)]

Program received signal SIGSEGV, Segmentation fault.
0x0000000000423c50 in realloc_string (ptr=0x7fffffffc4a0, new_len=8)
    at gbx_string.c:242
242                STRING *nstr = alloc_string(new_len);
(gdb) f 1
#1  STRING_extend (ptr=0x7fffffffc4a0, new_len=8) at gbx_string.c:389
389            str = realloc_string(STRING_from_ptr(*ptr), new_len);


All logs are from very different cases, sometimes gambas crashes
immediately, some times it need much fuzzing.
Usually crash happens when I hit enter on console and then click focus to
editor.
See attached valgrind logs.

Gambas3 rev 3281 @ Ubuntu 10.04 64bit

Jussi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: valgrind-memcheck.log
Type: text/x-log
Size: 62716 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20101111/c71cc9e9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: valgrind-callgrind.log
Type: text/x-log
Size: 3303 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20101111/c71cc9e9/attachment-0001.bin>


More information about the User mailing list