You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix memory leak, callable validation, and edge cases for private(namespace)
This commit resolves several critical issues with the private(namespace)
visibility feature implementation:
Callable Validation Fix:
- is_callable() was incorrectly using EG(current_execute_data) instead of
the frame parameter passed to zend_is_callable_check_func()
- Created zend_get_caller_namespace_ex() that accepts an execute_data frame
- Updated both namespace visibility checks in callable validation to use
frame-aware version
- Ensures callable checks respect the actual caller's namespace context
Global Namespace Edge Case:
- Traditional zend_check_method_accessible() was rejecting private(namespace)
methods when called from top-level code (scope=NULL)
- Skip accessibility check for ZEND_ACC_NAMESPACE_PRIVATE methods since they
have their own namespace-based visibility rules
- Set namespace_name on top-level op_arrays to track namespace for file-level
code execution
Test Fixes:
- Fixed private_namespace_edge_005.phpt: Use bracketed namespace syntax
- Fixed inheritance test expectations to match actual error messages
0 commit comments