quait / madcow

Automatically exported from code.google.com/p/madcow
GNU General Public License v3.0
0 stars 0 forks source link

megahal buffer overflow #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
DEBUG: initializing brain with: /home/bot/data/megahal/madcow
*** buffer overflow detected ***: python terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x37)[0x7fceddbe81e7]
/lib/libc.so.6(+0xfe0a0)[0x7fceddbe70a0]
/lib/libc.so.6(__fread_chk+0x15b)[0x7fceddbe787b]
/home/chris/bot/evo/include/megahal.so(megahal_initialize+0x294)[0x7fcedc1fd0f4]
/home/chris/bot/evo/include/megahal.so(+0x1761)[0x7fcedc1fa761]
python(PyEval_EvalFrameEx+0x516e)[0x4a7c5e]
python(PyEval_EvalFrameEx+0x5a60)[0x4a8550]
python(PyEval_EvalCodeEx+0x911)[0x4a9671]
python[0x537680]
python(PyObject_Call+0x47)[0x41f0c7]
python[0x427dff]
python(PyObject_Call+0x47)[0x41f0c7]
python[0x477bff]
python[0x46f47f]
python(PyObject_Call+0x47)[0x41f0c7]
python(PyEval_EvalFrameEx+0x4888)[0x4a7378]
python(PyEval_EvalFrameEx+0x5a60)[0x4a8550]
python(PyEval_EvalCodeEx+0x911)[0x4a9671]
python[0x537680]
python(PyObject_Call+0x47)[0x41f0c7]
python[0x427dff]
python(PyObject_Call+0x47)[0x41f0c7]
python[0x477bff]
python[0x46f47f]
python(PyObject_Call+0x47)[0x41f0c7]
python(PyEval_EvalFrameEx+0x4888)[0x4a7378]
python(PyEval_EvalCodeEx+0x911)[0x4a9671]
python(PyEval_EvalFrameEx+0x4d19)[0x4a7809]
python(PyEval_EvalCodeEx+0x911)[0x4a9671]
python[0x537680]
python(PyObject_Call+0x47)[0x41f0c7]
python[0x427dff]
python(PyObject_Call+0x47)[0x41f0c7]
python[0x477bff]
python[0x46f47f]
python(PyObject_Call+0x47)[0x41f0c7]
python(PyEval_EvalFrameEx+0x4888)[0x4a7378]
python(PyEval_EvalFrameEx+0x5a60)[0x4a8550]
python(PyEval_EvalCodeEx+0x911)[0x4a9671]
python(PyEval_EvalCode+0x32)[0x4a9742]
python(PyRun_FileExFlags+0x13e)[0x4c9a0e]
python(PyRun_SimpleFileExFlags+0xd4)[0x4c9c24]
python(Py_Main+0x9ef)[0x41a7ff]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7fceddb07c4d]
python[0x4199f9]
======= Memory map: ========
00400000-0061c000 r-xp 00000000 08:06 1572952                           
/usr/bin/python2.6
0081b000-0081c000 r--p 0021b000 08:06 1572952                           
/usr/bin/python2.6
0081c000-0087e000 rw-p 0021c000 08:06 1572952                           
/usr/bin/python2.6
0087e000-0088d000 rw-p 00000000 00:00 0 
01579000-02045000 rw-p 00000000 00:00 0                                  [heap]
7fcedbfe2000-7fcedbff8000 r-xp 00000000 08:06 786597                    
/lib/libgcc_s.so.1
7fcedbff8000-7fcedc1f7000 ---p 00016000 08:06 786597                    
/lib/libgcc_s.so.1
7fcedc1f7000-7fcedc1f8000 r--p 00015000 08:06 786597                    
/lib/libgcc_s.so.1
7fcedc1f8000-7fcedc1f9000 rw-p 00016000 08:06 786597                    
/lib/libgcc_s.so.1
7fcedc1f9000-7fcedc1fe000 r-xp 00000000 08:01 11800648                  
/home/chris/bot/evo/include/megahal.so
7fcedc1fe000-7fcedc3fd000 ---p 00005000 08:01 11800648                  
/home/chris/bot/evo/include/megahal.so
7fcedc3fd000-7fcedc3fe000 r--p 00004000 08:01 11800648                  
/home/chris/bot/evo/include/megahal.so
7fcedc3fe000-7fcedc3ff000 rw-p 00005000 08:01 11800648                  
/home/chris/bot/evo/include/megahal.so
7fcedc3ff000-7fcedc569000 r-xp 00000000 08:06 1575875                   
/usr/lib/libdb-4.8.so
7fcedc569000-7fcedc769000 ---p 0016a000 08:06 1575875                   
/usr/lib/libdb-4.8.so
7fcedc769000-7fcedc76b000 r--p 0016a000 08:06 1575875                   
/usr/lib/libdb-4.8.so
7fcedc76b000-7fcedc76c000 rw-p 0016c000 08:06 1575875                   
/usr/lib/libdb-4.8.so
7fcedc76c000-7fcedc76f000 r-xp 00000000 08:06 1591401                   
/usr/lib/python2.6/lib-dynload/dbm.so
7fcedc76f000-7fcedc96e000 ---p 00003000 08:06 1591401                   
/usr/lib/python2.6/lib-dynload/dbm.so
7fcedc96e000-7fcedc96f000 r--p 00002000 08:06 1591401                   
/usr/lib/python2.6/lib-dynload/dbm.so
7fcedc96f000-7fcedc970000 rw-p 00003000 08:06 1591401                   
/usr/lib/python2.6/lib-dynload/dbm.so
7fcedc970000-7fcedcbae000 r-xp 00000000 08:06 1573016                   
/usr/lib/libpython2.6.so.1.0
7fcedcbae000-7fcedcdae000 ---p 0023e000 08:06 1573016                   
/usr/lib/libpython2.6.so.1.0
7fcedcdae000-7fcedcdb0000 r--p 0023e000 08:06 1573016                   
/usr/lib/libpython2.6.so.1.0
7fcedcdb0000-7fcedce12000 rw-p 00240000 08:06 1573016                   
/usr/lib/libpython2.6.so.1.0
7fcedce12000-7fcedce21000 rw-p 00000000 00:00 0 
7fcedce21000-7fcedcf67000 r-xp 00000000 08:06 1576670                   
/usr/lib/libxml2.so.2.7.6
7fcedcf67000-7fcedd166000 ---p 00146000 08:06 1576670                   
/usr/lib/libxml2.so.2.7.6
7fcedd166000-7fcedd16e000 r--p 00145000 08:06 1576670                   
/usr/lib/libxml2.so.2.7.6
7fcedd16e000-7fcedd170000 rw-p 0014d000 08:06 1576670                   
/usr/lib/libxml2.so.2.7.6
7fcedd170000-7fcedd171000 rw-p 00000000 00:00 0 
7fcedd171000-7fcedd1c4000 r-xp 00000000 08:06 1587604                   
/usr/lib/pyshared/python2.6/libxml2mod.so
7fcedd1c4000-7fcedd3c3000 ---p 00053000 08:06 1587604                   
/usr/lib/pyshared/python2.6/libxml2mod.so
7fcedd3c3000-7fcedd3c4000 r--p 00052000 08:06 1587604                   
/usr/lib/pyshared/python2.6/libxml2mod.so
7fcedd3c4000-7fcedd3ce000 rw-p 00053000 08:06 1587604                   
/usr/lib/pyshared/python2.6/libxml2mod.so
7fcedd3ce000-7fcedd3e0000 r-xp 00000000 08:06 1591329                   
/usr/lib/python2.6/lib-dynload/datetime.so
7fcedd3e0000-7fcedd5df000 ---p 00012000 08:06 1591329                   
/usr/lib/python2.6/lib-dynload/datetime.so
7fcedd5df000-7fcedd5e0000 r--p 00011000 08:06 1591329                   
/usr/lib/python2.6/lib-dynload/datetime.so
7fcedd5e0000-7fcedd5e4000 rw-p 00012000 08:06 1591329                   
/usr/lib/python2.6/lib-dynload/datetime.so
7fcedd5e4000-7fcedd6a5000 rw-p 00000000 00:00 0 
7fcedd6a5000-7fcedd6a8000 r-xp 00000000 08:06 1591331                   
/usr/lib/python2.6/lib-dynload/_heapq.so
7fcedd6a8000-7fcedd8a7000 ---p 00003000 08:06 1591331                   
/usr/lib/python2.6/lib-dynload/_heapq.so
7fcedd8a7000-7fcedd8a8000 r--p 00002000 08:06 1591331                   
/usr/lib/python2.6/lib-dynload/_heapq.so
7fcedd8a8000-7fcedd8aa000 rw-p 00003000 08:06 1591331                   
/usr/lib/python2.6/lib-dynload/_heapq.so
7fcedd8aa000-7fcedd8eb000 rw-p 00000000 00:00 0 
7fcedd96d000-7fcedd9ae000 rw-p 00000000 00:00 0 
7fcedd9ef000-7fcedda30000 rw-p 00000000 00:00 0 
7fcedda31000-7fcedda38000 r--s 00000000 08:06 1585833                   
/usr/lib/gconv/gconv-modules.cache
7fcedda38000-7fcedda77000 r--p 00000000 08:06 1579686                   
/usr/lib/locale/en_US.utf8/LC_CTYPE
7fcedda77000-7fceddab8000 rw-p 00000000 00:00 0 
7fceddae9000-7fceddc61000 r-xp 00000000 08:06 786533                    
/lib/libc-2.11.1.so
7fceddc61000-7fcedde61000 ---p 00178000 08:06 786533                    
/lib/libc-2.11.1.soAborted

Original issue reported on code.google.com by chris2...@gmail.com on 23 Mar 2010 at 2:49

GoogleCodeExporter commented 9 years ago
Wow, that's one hell of a stack trace.. I'm not sure what to say, I didn't 
actually write megahal.  It's just the original C code, and mostly a 
proof-of-concept for an AI contest.

Out of curiosity, is that after using it for a while or trying to train it with 
a large corpus of text?  It does have some limitations regarding its internal 
dictionary size.

Original comment by cjo...@gmail.com on 20 Jun 2010 at 8:38

GoogleCodeExporter commented 9 years ago
Note, I *do* have a pure python megahal I wrote if this thing doesn't work at 
all for you.. but, it is really pretty slow compared to the C version.  5th 
order markov chains + this guys entropy testing is really intense cpu-wise.

But feel free to ping me if you are interested in that.

Original comment by cjo...@gmail.com on 20 Jun 2010 at 8:49

GoogleCodeExporter commented 9 years ago
I cannot reproduce this, and megahal is not my code. If you can offer more 
insight into this, feel free to re-open.

Original comment by cjo...@gmail.com on 2 Sep 2010 at 4:57