#31829 [Fbk->NoF]: Schema Validation Infinite Loop
| From: | sniper@php.net | Date: | Mon, 21 Feb 2005 18:56:25 +0000 |
| Subject: | #31829 [Fbk->NoF]: Schema Validation Infinite Loop | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-74353@lists.php.net to get a copy of this message | ||
ID: 31829
Updated by: sniper@php.net
Reported By: lphuberdeau at phpquebec dot org
-Status: Feedback
+Status: No Feedback
Bug Type: *XML functions
Operating System: Windows 2000
PHP Version: 5.0.3
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2005-02-03 19:12:49] chregu@php.net
Most certainly a libxml2 bug. PHP has nothing to do with the actual
parsing and validation.
Can you check with xmllint, if that has the same problem? And update to
the latest libxml2 libraries, they were quite some fixes lately
regarding XSDs.
------------------------------------------------------------------------
[2005-02-03 16:02:19] lphuberdeau at phpquebec dot org
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 this bug report at http://bugs.php.net/?id=31829&edit=1