Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong frame name for PHP 7 #67

Closed
BitOne opened this issue Aug 7, 2018 · 3 comments
Closed

Wrong frame name for PHP 7 #67

BitOne opened this issue Aug 7, 2018 · 3 comments
Labels

Comments

@BitOne
Copy link
Owner

BitOne commented Aug 7, 2018

With the following code::

<?php
unset($_GET);
unset($_FILES);
unset($_POST);
unset($_SERVER);
unset($_COOKIE);
unset($argv);
unset($argc);

function test() {
    $a = "test";
    meminfo_dump(fopen('php://stdout', 'w'));
}   

test();

When executed with the PHP 7 version of the extension provides the following result:

{
"items": {
    "0x7f347ea57180" : {
        "type" : "unknown",
        "size" : "16",
        "symbol_name" : "argv",
        "is_root" : true,
        "frame" : "test()"
    },
    "0x7f347ea571a0" : {
        "type" : "unknown",
        "size" : "16",
        "symbol_name" : "argc",
        "is_root" : true,
        "frame" : "test()"
  }
}

The a variable is not present and the argv and argc variables are defined at the wrong frame.

Comparing to the execution with the PHP 5 version of the extension:

{
  "items": {
    "0x7fc6ca961158" : {
        "type" : "string",
        "size" : "28",
        "symbol_name" : "a",
        "is_root" : true,
        "frame" : "test()"
    }
}
@BitOne
Copy link
Owner Author

BitOne commented Aug 7, 2018

Fixed by #62

@BitOne
Copy link
Owner Author

BitOne commented Aug 7, 2018

Still need some test.

@BitOne
Copy link
Owner Author

BitOne commented Aug 7, 2018

Tests added by #69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant