Comments (4)
This might be related to https://bugs.php.net/bug.php?id=75931.
from uopz.
That does seem related, although this doesn't crash under PHP 7.3 + uopz.
from uopz.
This obvious and rather crude fix prevents the segfault:
diff --git a/src/return.c b/src/return.c
index baf59ed..16bd2c2 100644
--- a/src/return.c
+++ b/src/return.c
@@ -132,6 +132,10 @@ uopz_return_t* uopz_find_return(zend_function *function) { /* {{{ */
return NULL;
}
+ if ((EG(flags) & EG_FLAGS_IN_SHUTDOWN)) {
+ return NULL;
+ }
+
if (function->common.scope) {
returns = zend_hash_find_ptr(&UOPZ(returns), function->common.scope->name);
} else {
Is there a better way? That hashtable is no longer around at the point we hit this user filter callback, so trying to look up return overrides at that point won't work.
from uopz.
I think that's the best we can do, committed to both hook and return code, thanks.
from uopz.
Related Issues (20)
- Release HOT 4
- zend_mm_heap corrupted HOT 8
- appveyor HOT 4
- phpunit9+mockery Segfault HOT 8
- constant redefinition HOT 2
- uopz_extend HOT 2
- 7.1.0 HOT 5
- error: implicit declaration of function 'RETURN_THROWS' is invalid in C99 HOT 1
- Feature request: Function to reset PHP memory peak usage on runtime HOT 6
- 8.1 bugfix release HOT 2
- Build issue with 8.1.1RC1 HOT 3
- Segfault in test suite with 8.1.2 HOT 5
- make error HOT 5
- Repro pattern for SIGSEGV with PHPUnit ^9.5 HOT 4
- uopz_get_return incorrectly returns null if the method/function name contains upper-case characters HOT 1
- Uopz seems to kill composer autoload HOT 5
- uopz_set_return() overload confusion HOT 2
- can we use uopz extension as alternative for tideways HOT 1
- Does this affect performance if used in production code? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uopz.