ID: 14365
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Old Bug Type: Filesystem function related
Bug Type: Scripting Engine problem
Operating System: RedHat Linux 7.2
PHP Version: 4.0.6
New Comment:

Does this happen with PHP 4.1.0RC5:

http://download.php.net/~zeev/php-4.1.0RC5.tar.gz

Previous Comments:
------------------------------------------------------------------------

[2001-12-06 14:46:30] [EMAIL PROTECTED]

I have an old server running RedHat 6.2, Aolserver 3.0, PHP 4.0.6 (compiled as a 
module) and SquirrelMail (a webmail application written in PHP) 1.0.6 just fine.

I'm trying to setup a new server with RedHat 7.2, Aolserver 3.4.2, PHP 4.0.6, and 
SquirrelMail 1.2.0-rc3 but I run into a consistent segfault. I haven't been able to 
write a script that abstracts the problem but it always happens at the same point in 
SquirrelMail: after you login, in the function squimap_mailbox_list (in 
functions/imap_mailbox.php). The offending line is functions/imap_mailbox.php:217:

    require_once('../src/load_prefs.php');

This file exists and is fine, and is require_once'd several times before this 
invocation (and I've stepped through other invocations of virtual_file_ex to see that 
it works)
but this line always segfaults:

backtrace:
#0  0x400aedd3 in canonicalize (
    name=0x82f9c38 
"/usr/local/aolserver-3.4.2/servers/webmail/pages/squirrelmail-1.2.0-rc3/src/../src/load_prefs.php",
 resolved=0x40522edc "")
    at canonicalize.c:88
#1  0x402bde61 in virtual_file_ex (state=0x40523f0c, 
    path=0x82c00dc "../src/load_prefs.php", verify_path=0)
    at tsrm_virtual_cwd.c:299
#2  0x402be427 in virtual_fopen (path=0x82c00dc "../src/load_prefs.php", 
    mode=0x402d1e07 "rb") at tsrm_virtual_cwd.c:497
#3  0x40240a84 in php_fopen_and_set_opened_path (
    path=0x82c00dc "../src/load_prefs.php", mode=0x402d1e07 "rb", 
    opened_path=0x40528880) at fopen_wrappers.c:235
#4  0x402410b9 in php_fopen_with_path (
    filename=0x82c00dc "../src/load_prefs.php", mode=0x402d1e07 "rb", 
    path=0x402d35fb ".:/usr/local/lib/php", opened_path=0x40528880)
    at fopen_wrappers.c:391
#5  0x402412e8 in php_fopen_url_wrapper (
    path=0x82c00dc "../src/load_prefs.php", mode=0x402d1e07 "rb", options=1, 
    issock=0x40525050, socketd=0x40525054, opened_path=0x40528880)
    at fopen_wrappers.c:470
#6  0x4023ece1 in php_fopen_wrapper_for_zend (
    filename=0x82c00dc "../src/load_prefs.php", opened_path=0x40528880)
    at main.c:477
#7  0x40222f06 in execute (op_array=0x84668d0, executor_globals=0x82282f8)
    at ./zend_execute.c:1999
#8  0x40220e03 in execute (op_array=0x821b2d0, executor_globals=0x82282f8)
    at ./zend_execute.c:1544
#9  0x40220e03 in execute (op_array=0x83cf358, executor_globals=0x82282f8)
    at ./zend_execute.c:1544
#10 0x40220e03 in execute (op_array=0x834c908, executor_globals=0x82282f8)
    at ./zend_execute.c:1544
#11 0x40220e03 in execute (op_array=0x83df304, executor_globals=0x82282f8)
    at ./zend_execute.c:1544
#12 0x4022f1cd in zend_execute_scripts (type=8, compiler_globals=0x839f938, 
    executor_globals=0x82282f8, file_count=3) at zend.c:752
#13 0x402401c7 in php_execute_script (primary_file=0x405316cc, 
    compiler_globals=0x839f938, executor_globals=0x82282f8, 
    core_globals=0x839b6f0) at main.c:1206
#14 0x4023df92 in php_ns_module_main (ns_context=0x81ed510, 
    sapi_globals=0x8276c50) at aolserver.c:434
#15 0x4023e1df in php_ns_request_handler (context=0x8184658, conn=0x819a8d0)
    at aolserver.c:519
#16 0x08077bb7 in Ns_ConnRunRequest (conn=0x819a8d0) at op.c:196
#17 0x0807e2c2 in ConnRun (connPtr=0x819a8d0) at serv.c:882
#18 0x0807dc10 in NsConnThread (arg=0x81f5178) at serv.c:671
#19 0x0811833b in NsThreadMain (arg=0x81f6590) at thread.c:228
#20 0x4002dc6f in pthread_start_thread (arg=0x40531be0) at manager.c:284
#21 0x4002dd5f in pthread_start_thread_event (arg=0x40531be0) at manager.c:308

and some extra gdb output:

[right before the segfault]
Breakpoint 9, canonicalize (
    name=0x82f9c38 
"/usr/local/aolserver-3.4.2/servers/webmail/pages/squirrelmail-1.2.0-rc3/src/../src/load_prefs.php",
 resolved=0x40522edc "")
    at canonicalize.c:88
88            rpath[0] = '/';
(gdb) print rpath[0]
$94 = 0 '\000'
(gdb) step

Program received signal SIGSEGV, Segmentation fault.
0x400aedd3 in canonicalize (
    name=0x82f9c38 
"/usr/local/aolserver-3.4.2/servers/webmail/pages/squirrelmail-1.2.0-rc3/src/../src/load_prefs.php",
 resolved=0x40522edc "")
    at canonicalize.c:88
88            rpath[0] = '/';

(gdb) info local
name = 0x82f9c38 
"/usr/local/aolserver-3.4.2/servers/webmail/pages/squirrelmail-1.2.0-rc3/src/../src/load_prefs.php"

rpath = 0x40521dec ""
dest = 0x0
extra_buf = 0x0
start = 0x0
end = 0x0
rpath_limit = 0x40522deb "@"
num_links = 0
rpath = 0x40521dec ""
dest = 0x0
extra_buf = 0x0
end = 0x0
rpath_limit = 0x40522deb "@"
num_links = 0

php config:

./configure --with-aolserver=/usr/local/aolserver --without-mysql --with-openssl 
--with-gettext

I've tried this on whatever other platforms I have handy. The same segfault occurs 
with any combination of RedHat 7.0/7.2, Aolserver 3.0/3.4.2, SquirrelMail 
1.0.6/1.2.0-rc2/1.2.0-rc3.

Thanks




------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=14365&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to