File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ Zend MM disabled:
24
24
25
25
$ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();'
26
26
27
+ Shared extensions:
28
+ ------------------
29
+
30
+ Since PHP 5.4 it is possible to prevent shared extensions from unloading so
31
+ that valgrind can correctly track the memory leaks in shared extensions. For
32
+ this there is the ZEND_DONT_UNLOAD_MODULES environment variable. If set, then
33
+ DL_UNLOAD() is skipped during the shutdown of shared extensions.
34
+
27
35
Tweaking:
28
36
---------
29
37
Original file line number Diff line number Diff line change @@ -2137,7 +2137,7 @@ void module_destructor(zend_module_entry *module) /* {{{ */
2137
2137
2138
2138
#if HAVE_LIBDL
2139
2139
#if !(defined(NETWARE ) && defined(APACHE_1_BUILD ))
2140
- if (module -> handle ) {
2140
+ if (module -> handle && ! getenv ( "ZEND_DONT_UNLOAD_MODULES" ) ) {
2141
2141
DL_UNLOAD (module -> handle );
2142
2142
}
2143
2143
#endif
You can’t perform that action at this time.
0 commit comments