From: [EMAIL PROTECTED] Operating system: NetBSD 1.6 PHP version: 4CVS-2002-11-15 PHP Bug Type: XML related Bug description: xml_get_current_line_number produces segmentation fault
It looks like the xml_get_current_line_number of xml produces a segmentation fault. Here is the piece of code : function parse($file) { if(!($fp = fopen($file, 'r'))) echo "xml_parser error: Could not open $file.\n"; else while($data = fgets($fp, 4096)) if(!xml_parse($this->parser, $data, feof($fp))) echo 'xml_parser error: ', xml_error_string(xml_get_error_code($this->parser)), ' at line ', xml_get_current_line_number($this->parser), "\n"; fclose($fp); return $this->struct; } If the data.xml looks like this for example : <Example> <Test>Bla</Test> <Test>Muh</test> </Example> I runned the xml example file in shell and here is the output : Example Test Test xml_parser error: mismatched tag at line 4 xml_parser error: mismatched tag at line Segmentation fault (core dumped) Now where is the problem ? Does the XML parser try to get the line and is already at the end of the file ? -- Edit bug report at http://bugs.php.net/?id=20442&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20442&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20442&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20442&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20442&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20442&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20442&r=support Expected behavior: http://bugs.php.net/fix.php?id=20442&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20442&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20442&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20442&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20442&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20442&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20442&r=isapi