php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72102 Segfault when using func_get_args as error handler
Submitted: 2016-04-25 16:45 UTC Modified: 2016-07-31 09:23 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: nikic@php.net Assigned: nikic
Status: Assigned Package: Scripting Engine problem
PHP Version: 7.0.6RC1 OS:
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [2016-04-25 16:45 UTC] nikic@php.net
Description:
------------
<?php
set_error_handler('func_get_args');
function test($a) {
    echo $undef;
}
test(1);

Don't ask me what the expected result should be, but it shouldn't crash...


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-05-17 05:50 UTC] krakjoe@php.net
-Assigned To: +Assigned To: nikic
 [2016-05-17 05:50 UTC] krakjoe@php.net
Just assigning to you so that this is not forgotten when the solution is merged.
 [2016-07-30 19:59 UTC] kalle@php.net
Wasn't this fixed in 7.1 with the restriction to calls to func_get_args in a dynamic context?
 [2016-07-31 09:23 UTC] cmb@php.net
For reference: <https://3v4l.org/TA4CW>. It seems we still a need
a solution for PHP 7.0, or we'd have to fix the docs:

| Generates a warning if called from outside of a user-defined
| function.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sat Aug 19 14:01:35 2017 UTC