[wp-trac] [WordPress Trac] #44532: Extreme memory leak related to wp_is_stream in wp-includes/functions.php in WordPress 4.9.7

WordPress Trac noreply at wordpress.org
Fri Jul 6 12:00:17 UTC 2018


#44532: Extreme memory leak related to wp_is_stream in wp-includes/functions.php in
WordPress 4.9.7
--------------------------+-----------------------------
 Reporter:  timbowesohft  |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-----------------------------
 Changes to wp-includes/functions.php in the WordPress 4.9.7 update,
 specifically wp_is_stream (line 5233), appear to be causing abnormal
 memory issues for a number of users on the support forum following the
 update.

 {{{#!php
 <?php
 function wp_is_stream( $path ) {
     $wrappers = stream_get_wrappers();
     $wrappers_re = '(' . join('|', $wrappers) . ')';

     return preg_match( "!^$wrappers_re://!", $path ) === 1;
 }
 }}}

 Users are encountering errors like this:

 ''**Fatal error: Allowed memory size of 134217728 bytes exhausted (tried
 to allocate 8459550600754132419 bytes) in \wp-includes\functions.php**''

 Note that in this case it is trying to allocate 8 million terabytes (!) of
 memory -- though most users are encountering figures closer to 2000GB,
 which is still abnormal.

 I have reverted WordPress to version 4.9.6, and over the past hour of
 monitoring CPU/Mem/disk has remained stable and our users are reporting
 service as normal again.

 The are a number of topics open on the support forum reporting this issue.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44532>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list