some_user@unsafebox:/usr/local/apache2/htdocs$ php -v PHP 5.2.5 (cli) (built: Nov 11 2007 07:56:04) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies some_user@unsafebox:/usr/local/apache2/htdocs$ gdb php GNU gdb 6.6-debian Copyright (C) 2006 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 "i486-linux-gnu"... Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (gdb) run shot.php Starting program: /usr/bin/php shot.php [Thread debugging using libthread_db enabled] [New Thread -1215244608 (LWP 13757)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1215244608 (LWP 13757)] zend_lookup_class_ex (name=0xb686a018 'A' ..., name_length=8377000, use_autoload=1, ce=0x8718250) at /root/php-5.2.5/Zend/zend_execute_API.c:1046 1046 zend_str_tolower_copy(lc_name, name, name_length); (gdb) i r eax 0x7fd2a8 8377000 ecx 0x861d940 140630336 edx 0xb686a018 -1232691176 ebx 0x85f356c 140457324 esp 0xbf098ce0 0xbf098ce0 ebp 0xbf896048 0xbf896048 esi 0xbf098d00 -1089893120 edi 0x0 0 eip 0x83326e4 0x83326e4 eflags 0x210286 [ PF SF IF RF ID ] cs 0x73 115 ss 0x7b 123 ds 0x7b 123 es 0x7b 123 fs 0x0 0 gs 0x33 51 (gdb) i r eip eip 0x83326e4 0x83326e4 (gdb) x/1s 0xb686a018 0xb686a018: 'A' ... (gdb) x/15i $eip 0x83326e4 : mov %esi,(%esp) 0x83326e7 : mov %eax,0x8(%esp) 0x83326eb : mov %edx,0x4(%esp) 0x83326ef : call 0x8335750 0x83326f4 : mov 0xffffff8c(%ebp),%edx 0x83326f7 : mov 0xffffff84(%ebp),%eax 0x83326fa : mov %esi,0x4(%esp) 0x83326fe : mov %edx,0x8(%esp) 0x8332702 : mov 0xfffff83c(%ebx),%edx 0x8332708 : mov %eax,0xc(%esp) 0x833270c : mov 0x138(%edx),%eax 0x8332712 : mov %eax,(%esp) 0x8332715 : call 0x8348bd0 0x833271a : test %eax,%eax 0x833271c : je 0x8332697