Bug #80364 [Dup]: Potential issue in ext/standard/user_filters.c: Return Value Not Checked
| From: | sagpant at microsoft dot com | Date: | Fri, 13 Nov 2020 18:14:50 +0000 |
| Subject: | Bug #80364 [Dup]: Potential issue in ext/standard/user_filters.c: Return Value Not Checked | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-230345@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80364&edit=1
ID: 80364
User updated by: sagpant at microsoft dot com
Reported by: sagpant at microsoft dot com
Summary: Potential issue in ext/standard/user_filters.c:
Return Value Not Checked
Status: Duplicate
Type: Bug
Package: *General Issues
PHP Version: 7.4.12
Block user comment: N
Private report: N
New Comment:
If this is not a bug then yes we can ignore it altogether.
But if this is a bug (per @cmb's comment), then we should also address this instance of the
function call.
Infact, our analyzer has found 5 other instance (including this) of this function call which have
similar issues? Should all those be included under the same PR too?
Previous Comments:
------------------------------------------------------------------------
[2020-11-13 18:05:39] requinix@php.net
Judging by bug #80284 and the commentary on
https://github.com/php/php-src/pull/6412
this is either not a bug (call_user_function is invoking a function which returns void from within a
destructor) or a duplicate (per @cmb's "I think we should at least document..."
comment).
------------------------------------------------------------------------
[2020-11-13 17:27:00] sagpant at microsoft dot com
Description:
------------
In this codebase, you often check the return value of the implicated function when calling it, but
in this instance, it appears that you didnât. Using a consistent return value checking and/or
error handling approach can improve code robustness and readability.
File: PHP-7.4.12/ext/standard/user_filters.c
Line Number: 140
Function: call_user_function
Correct reference usage found in main/streams/userspace.c line: 940
Test script:
---------------
Analyzer points out inconsistencies in the code.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80364&edit=1