From: lphuberdeau at phpquebec dot org Operating system: Windows 2000 PHP version: 5.0.3 PHP Bug Type: *XML functions Bug description: Schema Validation Infinite Loop
Description: ------------ When validating an XML document using a schema with references to other schemas, the validation falls in a loop until the script dies due to insufficient memory. Seems like there is no check to verify if the file has already been included. This bug might actually be located in libxml2. I was able to avoid the problem by only placing includes in the primary XSD. Reproduce code: --------------- Validate a DOM tree with a schema (schema1.xsd) with the following structure: schema1.xsd: include schema2.xsd include schema3.xsd schema2.xsd: include schema3.xsd schema3.xsd: include schema2.xsd Expected result: ---------------- The file to validate, ignoring any already included files, or at least throw an exception. Actual result: -------------- Using PHP-CLI, the system goes in an infinite loop and uses all available system memory. I would suspect the script to crash in a web environment with a memory limit. -- Edit bug report at http://bugs.php.net/?id=31829&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31829&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31829&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31829&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31829&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31829&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31829&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31829&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31829&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31829&r=support Expected behavior: http://bugs.php.net/fix.php?id=31829&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31829&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31829&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31829&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31829&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31829&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31829&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31829&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31829&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31829&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31829&r=mysqlcfg
