Skip Menu | will be shut down on March 1st, 2021.

This queue is for tickets about the XML-Tidy CPAN distribution.

Report information
The Basics
Id: 120296
Status: open
Priority: 0/
Queue: XML-Tidy

Owner: Pip [...] CPAN.Org
Requestors: jozef [...]

Bug Information
Severity: (no value)
Broken in: 1.16
Fixed in: (no value)

Subject: leaking memory on ->tidy()
Download (untitled) / with headers
text/plain 318b
Hi Pip, there seems to be circular reference out there somewhere: perl -MXML::Tidy -MIO::String -lE 'while (1) { XML::Tidy->new(ioref => IO::String->new("<body><div>d</div></body>"))->tidy() }' will result in process that keeps on allocating more and more memory. XML::Tidy 1.16 XML::XPath 1.40 Best regards Jozef
Download (untitled) / with headers
text/plain 505b
Hello Jozef, Thank you very much for the bug report. I was just able to look into this and it appears the problem stems from every XML::XPath->findnodes() call that my Tidy module uses. Running the similar: perl -MXML::XPath -MIO::String -lE 'while (1) { XML::XPath->new(ioref => IO::String->new("<body><div>d</div></body>"))->findnodes("/") }' ... seems to demonstrate the leaking behavior is coming from Tidy's parent class. Hopefully it can be fixed there in XPath. Thanks again! -- -Pip@CPAN.Org

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to