summaryrefslogtreecommitdiff
path: root/ext/opcache
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-04-012-3/+8
|\ | | | | | | | | * PHP-7.3: Fix literal compaction collision between string and double
| * Fix literal compaction collision between string and doubleNikita Popov2020-04-012-3/+8
| | | | | | | | | | For the sake of simplicity I'm using a separate hashtable, rather than trying to do hash perturabation on the double strings.
* | Merge branch 'PHP-7.3' into PHP-7.4Dmitry Stogov2020-03-252-3/+41
|\ \ | |/ | | | | | | * PHP-7.3: Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).
| * Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).Dmitry Stogov2020-03-252-3/+41
| |
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-03-231-0/+19
|\ \ | |/ | | | | | | * PHP-7.3: Add test file
| * Add test fileNikita Popov2020-03-231-0/+19
| | | | | | | | Forgot the git add again...
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-03-234-6/+16
|\ \ | |/ | | | | | | * PHP-7.3: Handle NULL caller_call_opline
| * Handle NULL caller_call_oplineNikita Popov2020-03-234-6/+16
| | | | | | | | | | This can happen if there is an EXIT in the call arguments, in which case the DO_CALL opcode may be eliminated as unreachable.
* | identation fixDmitry Stogov2020-03-121-1/+1
| |
* | Call global code of preloaded script in global contextDmitry Stogov2020-03-121-3/+44
| |
* | Avoid "Anonymous class wasn't preloaded" error by lazely loading of not ↵Dmitry Stogov2020-03-123-5/+34
| | | | | | | | preloaded part of a preloaded script
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-03-093-3/+3
|\ \ | |/ | | | | | | * PHP-7.3: Enclose INI values containing {TMP} in quotes
| * Enclose INI values containing {TMP} in quotesChristoph M. Becker2020-03-093-3/+3
| | | | | | | | | | At least on Windows, the temporary directory may contain tilde signs, which would result in an INI parse error.
* | Try to fix msvc buildNikita Popov2020-02-281-1/+2
| |
* | Fixed bug #79252Nikita Popov2020-02-281-0/+2
| |
* | Merge branch 'PHP-7.3' into PHP-7.4Dmitry Stogov2020-02-271-2/+2
|\ \ | |/ | | | | | | * PHP-7.3: Fixed incorrect overflow detection
| * Fixed incorrect overflow detectionDmitry Stogov2020-02-271-2/+2
| |
* | Fixed bug #79193Nikita Popov2020-01-302-0/+25
| |
* | Fixed bug #79128Nikita Popov2020-01-241-6/+11
| | | | | | | | | | | | | | | | | | | | We need to extend the hash table before performing raw append operations. This doesn't matter if preloading happens in the same process, as the tables will be large enough to hold all entries as a side-effect of the preloading process. However, if preloading happens in a different process, we need to reserve space here.
* | Let's make this safer from maliciously crafted filenameXinchen Hui2020-01-201-1/+1
| |
* | minor cleanupXinchen Hui2020-01-201-5/+7
| |
* | Fixed bug #79114 (Eval class during preload causes class to be only half ↵Xinchen Hui2020-01-203-2/+60
| | | | | | | | available)
* | Remove support for preloading on WindowsNikita Popov2020-01-0634-116/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | Due to ASLR restrictions, preloading on Windows does not work with any code that has preloading dependencies on internal classes. This effectively makes it unusable for any non-trivial codebase. Instead of pretending like preloading is going to work, only to make people realize that it really doesn't once they get beyond a dummy example, we disable support for preloading on Windows entirely. Closes GH-4999.
* | Fixed bug #79055Nikita Popov2020-01-021-37/+29
| | | | | | | | | | | | | | | | | | Fix file cache serialization of property types. I'm changing the overall type serialization format to perform additional adjustments in order to yield a plausible pointer for zend_type, rather than using an entirely separate serialization format, as was previously done. That would have been annoying to extend to the case of CE pointers.
* | Extract functions for file cache type serializationNikita Popov2020-01-021-17/+29
| | | | | | | | This is already done in master.
* | Fix file cache run_time_cache unserializationNikita Popov2020-01-021-1/+9
| | | | | | | | | | | | If the script was serialized as file_cache_only (thus non-immutable) and then gets unserialized into SHM, we need to allocate a new run_time_cache slot and can't use the serialized arena pointer.
* | Update ZCSG(map_ptr_last) only if for_shmNikita Popov2020-01-021-1/+3
| | | | | | | | | | Otherwise we may get a memory protection fault here. Updating of ZCSG(map_ptr_last) is handled when loading from file cache to SHM.
* | Also propagate include exceptions in opcacheNikita Popov2019-12-301-20/+28
| |
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2019-12-301-4/+5
|\ \ | |/ | | | | | | * PHP-7.3: Fix #79040: Warning Opcode handlers are unusable due to ASLR
| * Fix #79040: Warning Opcode handlers are unusable due to ASLRChristoph M. Becker2019-12-301-4/+5
| | | | | | | | | | | | | | We must not use the same shared memory OPcache instance for different SAPIs, since their memory layout is different. To avoid this, we add the SAPI name (truncated to at most 20 characters) to the names of the memory base file, the mutex and the file mapping.
* | Fixed bug #78986Nikita Popov2019-12-182-1/+29
| | | | | | | | | | Don't assume that handlers live in the arena, they may also be in SHM.
* | Fixed bug #78961 (erroneous optimization of re-assigned $GLOBALS)Dmitry Stogov2019-12-162-0/+20
| |
* | Introduce extra counter to avoid RTD key collisionsNikita Popov2019-12-131-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Also generate a fatal error if a collision occurs in zend_compile. This is not perfect, because collisions might still be introduced via opcache, if one file is included multiple times during a request, invalidate in the meantime and recompiled by different processes. This still needs to be addressed, but this patch fixes the much more common case of collisions occuring when opcache is not used. Fixes bug #78903.
* | Fixed bug #78950: Preloading trait method with static variablesNikita Popov2019-12-122-0/+28
| | | | | | | | | | | | We need to make sure that trait methods with static variables allocate a separate MAP slot for the static variables pointer, rather than working in-place.
* | Fix handling of non-final loop var free in sccpNikita Popov2019-12-125-7/+26
| | | | | | | | | | We only need to preserve the FE_FREE that marks the end of the loop range. Skip FE_FREEs with the FREE_ON_RETURN flag.
* | Addirional fix for bug #78918Dmitry Stogov2019-12-114-4/+28
| |
* | Fixed bug #78937 (Preloading unlinkable anonymous class can segfault)Dmitry Stogov2019-12-117-0/+146
| |
* | Fix error messageDmitry Stogov2019-12-101-1/+2
| |
* | Fix incorrect zend_try usageNikita Popov2019-12-101-2/+5
| |
* | Fix release build failureNikita Popov2019-12-103-14/+12
| | | | | | | | | | | | | | | | | | GCC complained about potentially uninitialized __orig_bailout, even though the variable has an initializer. This warning was quite persistent, I was only able to avoid it by using a separate function. Am I missing something?
* | Improve error messageChristoph M. Becker2019-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Formerly, the error message was like: | Can't preload unlinked class MyException: Internal parent (Windows | only limitation)Exception Now it's like: | Can't preload unlinked class MyException: Windows can't link to | internal parent Exception
* | Add support for class_alias to preloadingNikita Popov2019-12-104-0/+32
| | | | | | | | Related to bug #78918.
* | Fixed bug #78935: Check that all linked classes can be preloadedNikita Popov2019-12-1014-4/+229
| | | | | | | | | | | | | | | | | | During preloading, check that all classes that have been included as part of the preload script itself (rather than through opcache_compile_file) can actually be preloaded, i.e. satisfy Windows restrictions, have resolved initializers and resolved property types. When resolving initializers and property types, also autoload additional classes. Because of this, the resolution runs in a loop.
* | Fix merge mistakeNikita Popov2019-12-101-2/+0
| |
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-12-102-2/+27
|\ \ | |/ | | | | | | * PHP-7.3: Fix DCE with FE_FETCH
| * Fix DCE with FE_FETCHNikita Popov2019-12-102-2/+25
| | | | | | | | For now, don't treat FE_FETCH op2 as no-val use. See GH-4982.
* | Preload: Better reason message for internal parents on windowsNikita Popov2019-12-041-0/+7
| | | | | | | | Related to bug #78881.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-12-041-1/+1
|\ \ | |/ | | | | | | * PHP-7.3: Fix print_r return types in opcache
| * Fix print_r return types in opcacheTyson Andre2019-12-041-1/+1
| | | | | | | | | | | | | | https://www.php.net/print_r > When the return parameter is TRUE, this function will return a string. > Otherwise, the return value is TRUE.
* | Merge branch 'PHP-7.3' into PHP-7.4Dmitry Stogov2019-11-181-0/+34
|\ \ | |/ | | | | | | * PHP-7.3: Fix $x = (bool)$x; for undefined with opcache