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

Elastic APM PHP agent causes segmentation fault when handling errors #1077

Closed
intuibase opened this issue Oct 2, 2023 · 0 comments · Fixed by #1078
Closed

Elastic APM PHP agent causes segmentation fault when handling errors #1077

intuibase opened this issue Oct 2, 2023 · 0 comments · Fixed by #1078
Assignees
Labels
agent-php bug Something isn't working
Milestone

Comments

@intuibase
Copy link
Contributor

Describe the bug
Agent crashes application when handling errors.

To Reproduce
call following script:

<?php

$filename = __DIR__."/highlight_file.dat";

var_dump(highlight_file($filename));

var_dump(highlight_file('data:,<?php echo "test"; ?>'));

var_dump(highlight_file('data:,<?php echo "test ?>'));

$data = '
<?php
class test {
    public $var = 1;
    private function foo() { echo "foo"; }
    public function bar() { var_dump(test::foo()); }
}
?>';

file_put_contents($filename, $data);
var_dump(highlight_file($filename));


@unlink($filename);
echo "Done\n";
?>

Expected behavior
Run without crash

@intuibase intuibase added the bug Something isn't working label Oct 2, 2023
@intuibase intuibase added this to the 8.11 milestone Oct 2, 2023
@intuibase intuibase self-assigned this Oct 2, 2023
intuibase added a commit to intuibase/apm-agent-php that referenced this issue Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-php bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant