#32494 [Ver]: crash when using expat in a class

2005-08-18 Thread sniper
 ID:   32494
 Updated by:   [EMAIL PROTECTED]
 Reported By:  evert at rooftopsolutions dot nl
 Status:   Verified
 Bug Type: XML related
 Operating System: Linux glibc 2.3.4
 PHP Version:  4CVS-2005-07-30 (4 only!)
 New Comment:

See also bug #34150


Previous Comments:


[2005-05-17 10:46:57] [EMAIL PROTECTED]

Does NOT happen with PHP 5 (using libxml instead of expat)




[2005-05-05 01:01:03] evert at rooftopsolutions dot nl

Thank you rmartins!!!



[2005-05-05 00:10:43] rmartins at dcc dot online dot pt

Try freeing the parser via xml_parser_free()

Ricardo Martins



[2005-03-30 02:05:33] evert at rooftopsolutions dot nl

Description:

My PHP crashes when using expat functions in a class.
My scripts opens the 'test' file, but it doesn't matter if it exists or
not.

Right now I'm unable to check this with the latest cvs, but I did test
this on multiple servers running 4.3.10

Reproduce code:
---
parser = xml_parser_create('UTF-8');
  
xml_parser_set_option($this->parser,XML_OPTION_CASE_FOLDING,false);
   xml_set_element_handler($this->parser,array($this,
'onStartElement'),array($this,'onEndElement'));
  
xml_set_character_data_handler($this->parser,array($this,'onCDATA'));
  
xml_set_processing_instruction_handler($this->parser,array($this,'onProcessInstruction'));
   if (!xml_parse($this->parser,$data)) {
  
$this->onXMLError(xml_get_current_line_number($this->parser),
xml_get_error_code($this->parser),
xml_error_string(xml_get_error_code($
this->parser)));
   return false;
   } else return $this->parsedData;

   }

   function execute($data) {

   return $this->xmlparse($data);

   }

 }

 $disp = new sParser();

 $disp->execute(file_get_contents('test'));


?> 

Expected result:

No errors

Actual result:
--
PHP Crash

my apache logs says:

[Tue Mar 29 07:07:25 2005] [notice] child pid 9106 exit signal Aborted
(6)
*** glibc detected *** double free or corruption (!prev): 0x08205058
***






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


#32494 [Ver]: crash when using expat in a class

2005-05-17 Thread sniper
 ID:   32494
 Updated by:   [EMAIL PROTECTED]
 Reported By:  evert at rooftopsolutions dot nl
 Status:   Verified
 Bug Type: XML related
 Operating System: Linux glibc 2.3.4
 PHP Version:  4CVS-2005-03-30
 New Comment:

Does NOT happen with PHP 5 (using libxml instead of expat)



Previous Comments:


[2005-05-05 01:01:03] evert at rooftopsolutions dot nl

Thank you rmartins!!!



[2005-05-05 00:10:43] rmartins at dcc dot online dot pt

Try freeing the parser via xml_parser_free()

Ricardo Martins



[2005-03-30 02:05:33] evert at rooftopsolutions dot nl

Description:

My PHP crashes when using expat functions in a class.
My scripts opens the 'test' file, but it doesn't matter if it exists or
not.

Right now I'm unable to check this with the latest cvs, but I did test
this on multiple servers running 4.3.10

Reproduce code:
---
parser = xml_parser_create('UTF-8');
  
xml_parser_set_option($this->parser,XML_OPTION_CASE_FOLDING,false);
   xml_set_element_handler($this->parser,array($this,
'onStartElement'),array($this,'onEndElement'));
  
xml_set_character_data_handler($this->parser,array($this,'onCDATA'));
  
xml_set_processing_instruction_handler($this->parser,array($this,'onProcessInstruction'));
   if (!xml_parse($this->parser,$data)) {
  
$this->onXMLError(xml_get_current_line_number($this->parser),
xml_get_error_code($this->parser),
xml_error_string(xml_get_error_code($
this->parser)));
   return false;
   } else return $this->parsedData;

   }

   function execute($data) {

   return $this->xmlparse($data);

   }

 }

 $disp = new sParser();

 $disp->execute(file_get_contents('test'));


?> 

Expected result:

No errors

Actual result:
--
PHP Crash

my apache logs says:

[Tue Mar 29 07:07:25 2005] [notice] child pid 9106 exit signal Aborted
(6)
*** glibc detected *** double free or corruption (!prev): 0x08205058
***






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


#32494 [Ver]: crash when using expat in a class

2005-05-04 Thread evert at rooftopsolutions dot nl
 ID:   32494
 User updated by:  evert at rooftopsolutions dot nl
 Reported By:  evert at rooftopsolutions dot nl
 Status:   Verified
 Bug Type: XML related
 Operating System: Linux glibc 2.3.4
 PHP Version:  4CVS-2005-03-30
 New Comment:

Thank you rmartins!!!


Previous Comments:


[2005-05-05 00:10:43] rmartins at dcc dot online dot pt

Try freeing the parser via xml_parser_free()

Ricardo Martins



[2005-03-30 23:44:59] [EMAIL PROTECTED]

It happens with the bundled expat library too..




[2005-03-30 17:11:36] evert at rooftopsolutions dot nl

My configure line, thanx your help! I need to wait for the stable
versions for updates. if you know a workaround, please let me know :)

'./configure' '--prefix=/usr' '--disable-static'
'--with-apxs=/usr/sbin/apxs' '--sysconfdir=/etc'
'--enable-discard-path' '--with-config-file-path=/etc/apache'
'--enable-safe-mode' '--with-openssl' '--with-mhash' '--enable-bcmath'
'--with-bz2' '--with-pic' '--enable-calendar' '--enable-ctype'
'--with-gdbm' '--with-db3' '--with-imap-ssl=/usr/local/lib/c-client'
'--with-imap=/usr/local/lib/c-client' '--enable-dbase' '--enable-ftp'
'--with-iconv' '--with-exif' '--enable-exif' '--with-gd'
'--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png'
'--with-gmp' '--with-mysql=shared,/usr' '--with-gettext=shared,/usr'
'--with-expat-dir=/usr' '--with-xml' '--enable-wddx' '--with-mm=/usr'
'--enable-trans-sid' '--enable-shmop' '--enable-sockets'
'--with-regex=php' '--enable-sysvsem' '--enable-sysvshm' '--enable-yp'
'--enable-memory-limit' '--with-tsrm-pthreads' '--enable-shared'
'--disable-debug' '--with-zlib=/usr'



[2005-03-30 07:56:29] [EMAIL PROTECTED]

I can reproduce this when using external expat library.
What was the configure line you used for PHP?




[2005-03-30 02:05:33] evert at rooftopsolutions dot nl

Description:

My PHP crashes when using expat functions in a class.
My scripts opens the 'test' file, but it doesn't matter if it exists or
not.

Right now I'm unable to check this with the latest cvs, but I did test
this on multiple servers running 4.3.10

Reproduce code:
---
parser = xml_parser_create('UTF-8');
  
xml_parser_set_option($this->parser,XML_OPTION_CASE_FOLDING,false);
   xml_set_element_handler($this->parser,array($this,
'onStartElement'),array($this,'onEndElement'));
  
xml_set_character_data_handler($this->parser,array($this,'onCDATA'));
  
xml_set_processing_instruction_handler($this->parser,array($this,'onProcessInstruction'));
   if (!xml_parse($this->parser,$data)) {
  
$this->onXMLError(xml_get_current_line_number($this->parser),
xml_get_error_code($this->parser),
xml_error_string(xml_get_error_code($
this->parser)));
   return false;
   } else return $this->parsedData;

   }

   function execute($data) {

   return $this->xmlparse($data);

   }

 }

 $disp = new sParser();

 $disp->execute(file_get_contents('test'));


?> 

Expected result:

No errors

Actual result:
--
PHP Crash

my apache logs says:

[Tue Mar 29 07:07:25 2005] [notice] child pid 9106 exit signal Aborted
(6)
*** glibc detected *** double free or corruption (!prev): 0x08205058
***






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