[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] cvs of 12-10-2004: mkpat crash for mingw version
From: |
Gunnar Farnebäck |
Subject: |
Re: [gnugo-devel] cvs of 12-10-2004: mkpat crash for mingw version |
Date: |
Thu, 21 Oct 2004 00:08:04 +0200 |
User-agent: |
EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI) |
Teun wrote:
> Possibly something is not initialized properly, resulting
> in random results. ElectricFence did not reveal a problem.
> Can someone run valgrind on mkpat?
Yes, valgrind does find a problem.
virihaure 447% valgrind ./mkpat -D -m -b -t ../patterns/owl_attackpats.dtr
owl_attackpat -i ../patterns/owl_attackpats.db -o owl_attackpat.c
[...]
==12452== Invalid read of size 4
==12452== at 0x804EA30: member_att (dfa.c:98)
==12452== by 0x804EA98: union_att (dfa.c:139)
==12452== by 0x804FDC6: do_sync_product (dfa.c:693)
==12452== by 0x804FE97: do_sync_product (dfa.c:719)
==12452== Address 0x1BA8EC58 is 0 bytes after a block of size 2000 alloc'd
==12452== at 0x1B9059FF: realloc (vg_replace_malloc.c:197)
==12452== by 0x804EDC0: resize_dfa (dfa.c:270)
==12452== by 0x804FECA: do_sync_product (dfa.c:710)
==12452== by 0x804FE97: do_sync_product (dfa.c:719)
==12452==
==12452== Invalid read of size 4
==12452== at 0x804EA35: member_att (dfa.c:101)
==12452== by 0x804EA98: union_att (dfa.c:139)
==12452== by 0x804FDC6: do_sync_product (dfa.c:693)
==12452== by 0x804FE97: do_sync_product (dfa.c:719)
==12452== Address 0x1BA8EC5C is 4 bytes after a block of size 2000 alloc'd
==12452== at 0x1B9059FF: realloc (vg_replace_malloc.c:197)
==12452== by 0x804EDC0: resize_dfa (dfa.c:270)
==12452== by 0x804FECA: do_sync_product (dfa.c:710)
==12452== by 0x804FE97: do_sync_product (dfa.c:719)
[...]
I assume this means that there's memory read out of bounds. For the
record this only applies to mainline CVS but not to 3.6-pre2. There is
no relevant diff in mkpat.c between these versions but after copying
over the more recent owl_attackpats.dtr from 3.6-pre2 the problem went
away.
Paul, does this make sense?
Teun, can you try the same fix?
/Gunnar