Re: [PHP-DEV] Bug in objects+XML

2001-04-24 Thread Jon Parise

On Tue, Apr 24, 2001 at 08:00:47PM +0400, Vadka wrote:

 ?
 $Bad=0; // try to set it to 1 for segfault
 
 $taggz[0]=table_here;
 $taggz[1]=mydir;
 $functinz['table_here']=my_func;
 $functinz['mydir']=my_func;
 
 error_reporting(E_ALL);
 
 Function my_func($atr){
 echo(Variable:-);
 var_dump($atr);
 }
 
 class my_xml {
 var $functinz;
 var $tagz;
 var $parser;
 var $parzed;
 
[trimmed]

Would you say this is the same problem that I reported a while
back?

http://www.php.net/bugs.php?id=6175

-- 
Jon Parise ([EMAIL PROTECTED])  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member

-- 
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]




Re: [PHP-DEV] Bug in objects+XML

2001-04-24 Thread Vadka



On Tue, 24 Apr 2001, Jon Parise wrote:

 [trimmed]
 Would you say this is the same problem that I reported a while
 back?
 http://www.php.net/bugs.php?id=6175

Yes, it is, as I can see. The problem remains. For now, I have no so
much time to
hack it, but it seems that the pointer is assumed to the pointer before
it's real initialization(class init) and this notation could not work in
a proper way.



-- 
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]




Re: [PHP-DEV] Bug in objects+XML

2001-04-24 Thread Vadka


More, calling xml_parse_into_struct after normal xml_parse cause the
segfault too (repeating of xml_parse will cause no error).


-- 
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]




Re: [PHP-DEV] Bug in objects+XML

2001-04-24 Thread Thies C. Arntzen

On Tue, Apr 24, 2001 at 08:00:47PM +0400, Vadka wrote:
 
 Hi!
frag

to get this working you have to say:

class hallo {

//...

function hallo($bla) {
//   ^ this is important!
$this-parser = xml_parser_create();
xml_set_object($this-parser,$this);
// ...
}
}

and then instantiate using:

$a = new hallo($bla);
//   ^ important.

the problem here a cyclic references _and_ $this _not_ being
the instantiated object (unless u use this ugly ampersand
hack as illustrated)

tc

 --- Script 
frag

-- 
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]




Re: [PHP-DEV] Bug in objects+XML

2001-04-24 Thread Jon Parise

On Tue, Apr 24, 2001 at 08:31:26PM +0200, Thies C. Arntzen wrote:

[workaround snipped]

 the problem here a cyclic references _and_ $this _not_ being
 the instantiated object (unless u use this ugly ampersand
 hack as illustrated)
 
Granted, it is a problem that can be worked around in PHP code,
but it still shouldn't crash the process with a segfault.  An
error or warning would be the correct result.

-- 
Jon Parise ([EMAIL PROTECTED])  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member

-- 
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]




Re: [PHP-DEV] Bug in objects+XML

2001-04-24 Thread Thies C. Arntzen

On Tue, Apr 24, 2001 at 03:57:05PM -0400, Jon Parise wrote:
 On Tue, Apr 24, 2001 at 08:31:26PM +0200, Thies C. Arntzen wrote:
 
 [workaround snipped]
 
  the problem here a cyclic references _and_ $this _not_ being
  the instantiated object (unless u use this ugly ampersand
  hack as illustrated)
  
 Granted, it is a problem that can be worked around in PHP code,
 but it still shouldn't crash the process with a segfault.  An
 error or warning would be the correct result.

cyclic references aren't supported by the engine - same as
infinite recursions (which crash the engine, too).

tc

-- 
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]