Opened 7 years ago
Last modified 7 years ago
#48973 new defect (bug)
wp_text_diff() out of memory with 10GB memory limit on certain revisions
| Reported by: | justjack1 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Revisions | Version: | 5.3.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | administration |
Description
Hi,
I have identified a bug with wp_text_diff on a blank WP install on PHP 7.2.8 and 7.3.12
The bug causes the system to run out of memory no matter how much is available. I found it while trying to edit some revisions. The texts are large (50KB), maybe it has something to do with it.
To replicate the bug you need to use this code. I will provide the files.
<?php $content_from = file_get_contents( ABSPATH . '/content_from.txt' ); $content_to = file_get_contents( ABSPATH . '/content_to.txt' ); $diff = wp_text_diff( $content_from, $content_to, [] );
}}}
Attachments (1)
Change History (2)
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
7 years ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Archive contains two files with HTML text to be used in testing the bug