php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21881 Java call on custom class causes SIGSEV
Submitted: 2003-01-25 23:48 UTC Modified: 2003-07-29 07:23 UTC
Votes:8
Avg. Score:4.9 ± 0.3
Reproduced:7 of 7 (100.0%)
Same Version:5 (71.4%)
Same OS:4 (57.1%)
From: phpbug at sourceillustrated dot com Assigned:
Status: No Feedback Package: Java related
PHP Version: 4.3.0 OS: Red Hat 8.0
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-01-25 23:48 UTC] phpbug at sourceillustrated dot com
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!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-27 20:31 UTC] phpbug at sourceillustrated dot com
Verified as a problem in both 4.3.0 and 4.2.3.
 [2003-07-29 07:23 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 07:01:29 2024 UTC