PHP 4.0 Bug #8467 Updated: Crash in Tomcat with PHP/Servlet feature

From: Date: Thu, 28 Dec 2000 23:35:25 +0000
Subject: PHP 4.0 Bug #8467 Updated: Crash in Tomcat with PHP/Servlet feature
Groups: php.dev 
Request: Send a blank email to php-dev+get-42486@lists.php.net to get a copy of this message
ID: 8467 Updated by: akilov Reported By: akilov@us.ibm.com Status: Open Bug Type: Reproduceable crash Assigned To: Comments: Finally figured out how to get a gdb backtrace (sorry, my first time). Here's the relevant section: #5 0xd6ec80a8 in open_file_for_scanning (file_handle=0x209ce358, compiler_globals=0x20250a38) at ./zend_language_scanner.l:297 #6 0xd6ec78c8 in compile_file (file_handle=0x209ce358, type=2, compiler_globals=0x20250a38) at ./zend_language_scanner.l:345 #7 0xd6eafe20 in zend_execute_scripts (type=8, compiler_globals=0x20250a38, executor_globals=0x202548a8, file_count=3) at zend.c:738 #8 0xd6f1ab0c in php_execute_script (primary_file=0x209ce358, compiler_globals=0x20250a38, executor_globals=0x202548a8, core_globals=0x202581d8) at main.c:1209 #9 0xd6f950b8 in Java_net_php_servlet_send (jenv=0x209cef04, self=0x4, requestMethod=0x3, queryString=0x0, requestURI=0x2, pathTranslated=0x1, contentType=0x0, contentLength=-1, authUser=0x0, display_source_mode=0 '\000') at servlet.c:409 Previous Comments: --------------------------------------------------------------------------- [2000-12-28 18:18:57] akilov@us.ibm.com Trying to get PHP built on AIX with the IBM C compiler. The setup I used is as follows: CC=xlc_r CFLAGS="-ma -g -Dinline= " CXX=xlC_r ./configure --without-xml --without-mysql --with-servlet --with-java The JDK level is IBM118. Had to hack servlet.c and ext/java/config.m4 to make sure the compile and link work. The change needed to servlet.c is to rename the sapi_module structure to sapi_module_servlet since the IBM compiler doesn't allow duplication of struct names. The ext/java/config.m4 fix is to make it look for libjava.a instead of the hardcoded libjava.so. The configure/make/install work with the above setup although there are quite a few warnings about type conversions and invalid suffix (.lo). Start Tomcat and attempt to invoke a PHP file and get a core and a stack dump which points at open_file_for_scanning. I tracked it down to the first instantiation of the istdiostream class. More specifically, in zend_language_scanner.l >> open_file_for_scanning() in the ZEND_HANDLE_FP case (ZTS). The file_handle and file_handle->handle.fp are not null but the file_handle->handle.is assignment never completes. The native stack contains: open_file_for_scanning compile_file zend_execute_scripts php_execute_script Java_net_php_servlet_send Called from net.php.servlet.service() in Java. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8467

« previous php.dev (#42486) next »