From: [EMAIL PROTECTED]
Operating system: Red Hat 8.0
PHP version: 4.2.3
PHP Bug Type: Reproducible crash
Bug description: Java call on custom class causes SIGSEV
I've gotten java integration working and can run the example in the php.net
manual that uses java.lang.System. It works fine when I run that
example.
However, created my own class in a directory I specified in my
java.class.path directive and it causes a seg fault if I call a method on
the object. Actually, I got a message saying "Document contains no data",
but running a backtrace shows the SIGSEV.
This is with Sun jdk 1.4.1_1
See below for code and backtrace:
<?
$obj = new Java('com.x.reports.Serv');
print $obj->getMsg();
?>
--- java code stored off of class path in com/x/reports ---
package com.x.reports;
class Serv
{
public String msg = "THIS IS A TEST MESSAGE";
Serv()
{
}
public String getMsg()
{
return this.msg;
}
}
------------------ BACKTRACE -------------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 8192 (LWP 9303)]
0x402da2cb in java_call_function_handler (ht=0, return_value=0x8114d14,
this_ptr=0x810d604, return_value_used=1, property_reference=0xbfffdf54) at
java.c:464
464 obj = zend_list_find(Z_LVAL_PP(handle), &type);
(gdb) bt
#0 0x402da2cb in java_call_function_handler (ht=0,
return_value=0x8114d14, this_ptr=0x810d604, return_value_used=1,
property_reference=0xbfffdf54) at java.c:464
#1 0x40191553 in call_overloaded_function (T=0xbfffdf48, arg_count=0,
return_value=0x8114d14) at zend_execute.c:953
#2 0x40194636 in execute (op_array=0x8114b6c) at zend_execute.c:1660
#3 0x401a40a3 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at zend.c:812
#4 0x401b5aaf in php_execute_script (primary_file=0xbffff450) at
main.c:1383
#5 0x401b0aba in apache_php_module_main (r=0x8107004,
display_source_mode=0) at sapi_apache.c:90
#6 0x401b18ea in send_php (r=0x8107004, display_source_mode=0,
filename=0x8107b34 "/opt/apache_1.3.27/htdocs/t.php") at mod_php4.c:575
#7 0x401b1963 in send_parsed_php (r=0x8107004) at mod_php4.c:590
#8 0x08074880 in ap_invoke_handler ()
#9 0x08088c76 in process_request_internal ()
#10 0x08088cd6 in ap_process_request ()
#11 0x0807ff9a in child_main ()
#12 0x0808013a in make_child ()
#13 0x080802a1 in startup_children ()
#14 0x080808ce in standalone_main ()
#15 0x080810ec in main ()
#16 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
Thanks for the help!
--
Edit bug report at http://bugs.php.net/?id=21881&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21881&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=21881&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=21881&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21881&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=21881&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=21881&r=support
Expected behavior: http://bugs.php.net/fix.php?id=21881&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=21881&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=21881&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=21881&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21881&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=21881&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=21881&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=21881&r=gnused