php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63285 VLD exhausts memory in CLI run mode (-r)
Submitted: 2012-10-16 07:53 UTC Modified: 2012-10-16 08:37 UTC
From: frozenfire@php.net Assigned: frozenfire (profile)
Status: Closed Package: vld (PECL)
PHP Version: 5.4.7 OS: Ubuntu 12.04, Linux 3.2.0-30
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: frozenfire@php.net
New email:
PHP Version: OS:

 

 [2012-10-16 07:53 UTC] frozenfire@php.net
Description:
------------
Tried this with both PHP 5.4.6 and 5.3.10. Simply enabling vld and executing any 
code in the CLI SAPI's run mode results in memory exhaustion without generation 
of opcode information.

Test script:
---------------
Test 1: echo "<?php function test() { }" | php -dvld.active=1

Test 2: php -dvld.active=1 -r 'function test() { }'

Expected result:
----------------
Finding entry points
Branch analysis from position: 0
Return found
filename:       -
function name:  (null)
number of ops:  2
compiled vars:  none
line     # *  op                           fetch          ext  return  operands
--------------------------------------------------------------------------------
-
   1     0  >   NOP                                                      
   2     1    > RETURN                                                   1

branch: #  0; line:     1-    2; sop:     0; eop:     1
path #1: 0, 
Function test:
Finding entry points
Branch analysis from position: 0
Return found
filename:       -
function name:  test
number of ops:  1
compiled vars:  none
line     # *  op                           fetch          ext  return  operands
--------------------------------------------------------------------------------
-
   1     0  > > RETURN                                                   null

branch: #  0; line:     1-    1; sop:     0; eop:     0
path #1: 0, 
End of function test.

Actual result:
--------------
Test 1: As expected

Test 2:

Finding entry points
Branch analysis from position: 0
Return found
filename:       Command line code
function name:  (null)
number of ops:  2
compiled vars:  none
line     # *  op                           fetch          ext  return  operands
--------------------------------------------------------------------------------
-
   1     0  >   NOP                                                      
         1    > RETURN                                                   null

branch: #  0; line:     1-    1; sop:     0; eop:     1
path #1: 0, 
PHP Fatal error:  Out of memory (allocated -1969750016) (tried to allocate 
1866060001 bytes) in Unknown on line 0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-10-16 07:55 UTC] frozenfire@php.net
Bonus: php -dvld.active=1 -r 'echo "test";' works just fine.
 [2012-10-16 08:37 UTC] frozenfire@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: frozenfire
 [2012-10-16 08:37 UTC] frozenfire@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 19:01:31 2024 UTC