Hi,
I have been experimenting with simpleindex.php in the php4 examples.
However, the command seems to crash on exit:
$ php simpleindex.php h < simpleindex.php
Segmentation fault
I ran it through gdb to get a stack trace (see below). It looks to me as
if the WritableDatabase may be getting deleted twice. Can this be fixed,
or alternatively is there any work around?
I'd have a look at it myself but I don't really know where to start (and
my C/C++ is very basic).
Dave
(gdb) bt
#0 0x00000019 in ?? ()
#1 0xb766dccf in __wrap_delete_WritableDatabase (rsrc=0x80a27ec,
type_name=0xb76e0d15 "_p_Xapian__WritableDatabase")
at xapian_wrap.cc:13182
#2 0xb766f205 in _wrap_destroy_p_Xapian__WritableDatabase
(rsrc=0x80a27ec) at xapian_wrap.cc:16836
#3 0xb7f8410d in list_entry_destructor () from
/usr/lib/libphp_common.so.432
#4 0x080a27ec in ?? ()
#5 0x00000027 in ?? ()
#6 0xbfff6d70 in ?? ()
#7 0xb7fe6c80 in ?? ()
#8 0x080c8ba8 in ?? ()
#9 0xb7fc10e8 in ?? () from /usr/lib/libphp_common.so.432
#10 0x080a280c in ?? ()
#11 0xb7f82ada in zend_hash_clean () from /usr/lib/libphp_common.so.432
#12 0x080a280c in ?? ()
#13 0xb7fd0c60 in executor_globals () from /usr/lib/libphp_common.so.432
#14 0x080c8bc0 in ?? ()
#15 0xb7f82ca9 in zend_hash_apply_with_argument () from
/usr/lib/libphp_common.so.432
#16 0xb7f842a0 in zend_destroy_rsrc_list () from
/usr/lib/libphp_common.so.432
#17 0xbfff6e20 in ?? ()
#18 0xb7f84324 in zend_destroy_rsrc_list () from
/usr/lib/libphp_common.so.432
#19 0xb7f842a0 in zend_destroy_rsrc_list () from
/usr/lib/libphp_common.so.432
#20 0xb7fc10e8 in ?? () from /usr/lib/libphp_common.so.432
#21 0xb7fc10e8 in ?? () from /usr/lib/libphp_common.so.432
#22 0x080c8b80 in ?? ()
#23 0xb7fcc940 in ini_in () from /usr/lib/libphp_common.so.432
#24 0xb7f82c82 in zend_hash_apply_with_argument () from
/usr/lib/libphp_common.so.432
#25 0x080d37b0 in ?? ()
#26 0xb7fd0e00 in zend_open () from /usr/lib/libphp_common.so.432
#27 0xb7f807c0 in module_registry_request_startup () from
/usr/lib/libphp_common.so.432
#28 0xb7f8438f in zend_clean_module_rsrc_dtors () from
/usr/lib/libphp_common.so.432
#29 0xb7f842c0 in zend_destroy_rsrc_list () from
/usr/lib/libphp_common.so.432
#30 0xb7e33c20 in in6addr_any () from /lib/tls/libc.so.6
#31 0xb7f84360 in zend_destroy_rsrc_list () from
/usr/lib/libphp_common.so.432
#32 0xb7fc10e8 in ?? () from /usr/lib/libphp_common.so.432
#33 0xb7f8071d in module_destructor () from /usr/lib/libphp_common.so.432
---Type <return> to continue, or q <return> to quit---
#34 0x00000017 in ?? ()
#35 0xb7f56380 in php_file_le_pstream () from /usr/lib/libphp_common.so.432
#36 0xb7fc10e8 in ?? () from /usr/lib/libphp_common.so.432
#37 0xb7fd9b30 in ?? () from /usr/lib/php/extensions/sqlite.so
#38 0x080a0cd0 in ?? ()
#39 0xb7fc10e8 in ?? () from /usr/lib/libphp_common.so.432
#40 0x080d3780 in ?? ()
#41 0xb7f82ada in zend_hash_clean () from /usr/lib/libphp_common.so.432
#42 0x080d3780 in ?? ()
#43 0xb7fd0e00 in zend_open () from /usr/lib/libphp_common.so.432
#44 0xb7f807c0 in module_registry_request_startup () from
/usr/lib/libphp_common.so.432
#45 0xb7f82c11 in zend_hash_apply () from /usr/lib/libphp_common.so.432
#46 0xb7fd0b9c in executor_globals () from /usr/lib/libphp_common.so.432
#47 0x0000009c in ?? ()
#48 0x0000009c in ?? ()
#49 0xb7f7d2ef in zend_deactivate_modules () from
/usr/lib/libphp_common.so.432
#50 0xb7f807c0 in module_registry_request_startup () from
/usr/lib/libphp_common.so.432
#51 0x0000009c in ?? ()
#52 0x00000000 in ?? ()
#53 0xb7fe6c80 in ?? ()
#54 0x00000000 in ?? ()
#55 0xbfff6f20 in ?? ()
#56 0x00fe6c80 in ?? ()
#57 0x00000000 in ?? ()
#58 0x00000000 in ?? ()
#59 0x00000000 in ?? ()
#60 0x00000000 in ?? ()
#61 0x00000000 in ?? ()
#62 0x00000000 in ?? ()
#63 0x00000000 in ?? ()
#64 0x00000000 in ?? ()
#65 0x00000000 in ?? ()
#66 0x00000000 in ?? ()
#67 0x00000000 in ?? ()
#68 0x00000000 in ?? ()
---Type <return> to continue, or q <return> to quit---
#69 0x00000000 in ?? ()
#70 0x00000000 in ?? ()
#71 0x00000000 in ?? ()
#72 0x00000000 in ?? ()
#73 0x00000000 in ?? ()
#74 0x00000000 in ?? ()
#75 0x00000000 in ?? ()
#76 0x00000000 in ?? ()
#77 0x00000000 in ?? ()
#78 0x00000000 in ?? ()
#79 0x00000000 in ?? ()
#80 0x00000000 in ?? ()
#81 0x00000000 in ?? ()
#82 0x00000000 in ?? ()
#83 0x00000000 in ?? ()
#84 0x00000000 in ?? ()
#85 0x00000000 in ?? ()
#86 0x00000000 in ?? ()
#87 0x00000000 in ?? ()
#88 0x00000000 in ?? ()
#89 0x00000000 in ?? ()
#90 0x00000000 in ?? ()
#91 0x00000000 in ?? ()
#92 0x00000000 in ?? ()
#93 0x00000000 in ?? ()
#94 0x00000000 in ?? ()
#95 0x00000000 in ?? ()
#96 0x00000000 in ?? ()
#97 0xb7f7d240 in zend_activate_modules () from
/usr/lib/libphp_common.so.432
#98 0xb7fd0a80 in zend_compile_file () from /usr/lib/libphp_common.so.432
#99 0xb7f4ad4d in php_request_shutdown () from /usr/lib/libphp_common.so.432
#100 0xbfff71f0 in ?? ()
#101 0x0000009c in ?? ()
#102 0xb7e3f800 in __malloc_initialize_hook () from /lib/tls/libc.so.6
#103 0xb7ffc020 in ?? () from /lib/ld-linux.so.2
---Type <return> to continue, or q <return> to quit---
#104 0x00000000 in ?? ()
#105 0xb7ffc020 in ?? () from /lib/ld-linux.so.2
#106 0x00000038 in ?? ()
#107 0xb7e3dff4 in ?? () from /lib/tls/libc.so.6
#108 0xb7e3f800 in __malloc_initialize_hook () from /lib/tls/libc.so.6
#109 0x080a8728 in ?? ()
#110 0xbfff7038 in ?? ()
#111 0xb7d7a68e in free () from /lib/tls/libc.so.6
Previous frame inner to this frame (corrupt stack?)