php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75290 debug info of Closures of internal functions contain garbage argument names
Submitted: 2017-09-29 20:22 UTC Modified: 2017-09-29 20:25 UTC
From: ajf@php.net Assigned: ajf (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 7.0.24 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ajf@php.net
New email:
PHP Version: OS:

 

 [2017-09-29 20:22 UTC] ajf@php.net
Description:
------------
https://3v4l.org/1ARiM

Seems to be broken since 7.x, worked in 5.6. Probably the switch from const char* to zend_string* for /internal/ arg names, but not user names, broke it.

Test script:
---------------
<?php

var_dump((new ReflectionFunction('sin'))->getClosure());

Expected result:
----------------
object(Closure)#2 (1) {
  ["parameter"]=>
  array(1) {
    ["$number"]=>
    string(10) "<required>"
  }
} 

Actual result:
--------------
object(Closure)#2 (1) {
  ["parameter"]=>
  array(1) {
    ["$p���x�����������X���@���T���t������|�����T���<���Internal zval's can't be arrays, objects or resources"]=>
    string(10) "<required>"
  }
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-29 20:25 UTC] ajf@php.net
-Assigned To: +Assigned To: ajf
 [2017-09-29 20:40 UTC] ajf@php.net
Automatic comment on behalf of ajf@ajf.me
Revision: http://git.php.net/?p=php-src.git;a=commit;h=abefb6dfe76c57803e49969185183c2b4ef9352e
Log: Fix bug #75290
 [2017-09-29 20:40 UTC] ajf@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 13:01:27 2024 UTC