summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge branch 'PHP-7.4'Nikita Popov2020-01-301-0/+1
|\ \ | |/ | | | | | | | | * PHP-7.4: Reset trampoline on executor startup Fix UAF in is_callable() and allocated trampoline
| * Reset trampoline on executor startupNikita Popov2020-01-301-0/+1
| | | | | | | | | | Make sure the trampoline is usable, even if we had an unclean shutdown on the last request.
* | Move undefined constant error into get_constant_exNikita Popov2020-01-101-18/+2
| | | | | | | | | | All the other error conditions are already handled in there, so this one should be as well.
* | Merge branch 'PHP-7.4'Nikita Popov2019-12-131-0/+4
|\ \ | |/ | | | | | | * PHP-7.4: Fixed bug #78921
| * Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-12-131-0/+4
| |\ | | | | | | | | | | | | * PHP-7.3: Fixed bug #78921
| | * Fixed bug #78921Nikita Popov2019-12-131-0/+4
| | | | | | | | | | | | | | | By resetting fake_scope during autoloading. We already do the same when executing destructors.
| | * Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-07-091-21/+7
| | |\
| | | * Revert "Fixed bug #76980"Nikita Popov2019-07-091-21/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 35353dc49a73a58c17c7896c4c4c3997ef2c007d. This changes causes issues for Symfony, see https://github.com/symfony/symfony/issues/32395. I'm reverting it from PHP 7.2 and PHP 7.3 and only leaving it in PHP 7.4.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-10-211-5/+0
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Fix leak with cycle in static prop of internal class
| * | | Fix leak with cycle in static prop of internal classNikita Popov2019-10-211-5/+0
| | | | | | | | | | | | | | | | | | | | More the cleanup of interned classes before the final GC run, just like it is done for user classes.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-10-011-1/+1
|\ \ \ \ | |/ / /
| * | | Remove func copy optimization for private method with static varsNikita Popov2019-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not NULLing the static_variables pointer for shadow methods during static var shutdown would be a way to avoid this leak, but unless there's evidence that inherited private methods with static vars are actually a common use-case, I don't think we should keep this kind of fragile edge-case optimization. Fixes OSS-Fuzz #17875.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-09-121-0/+1
|\ \ \ \ | |/ / /
| * | | Allow throwing exception while loading parent classNikita Popov2019-09-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fix for symfony/symfony#32995. The behavior is: * Throwing exception when loading parent/interface is allowed (and we will also throw one if the class is simply not found). * If this happens, the bucket key for the class is reset, so it's possibly to try registering the same class again. * However, if the class has already been used due to a variance obligation, the exception is upgraded to a fatal error, as we cannot safely unregister the class stub anymore.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-09-111-2/+6
|\ \ \ \ | |/ / /
| * | | Only allow "nearly linked" classes for parent/interfaceNikita Popov2019-09-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The requirements for parent/interface are difference than for the variance checks in type declarations. The latter can work on fully unlinked classes, but the former need inheritance to be essentially finished, only variance checks may still be outstanding. Adding a new flag for this because we have lots of space, but we could also represent these "inheritance states" more compactly in the future.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-08-281-1/+1
|\ \ \ \ | |/ / /
| * | | Add missed mutability checkNikita Popov2019-08-281-1/+1
| | | |
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-08-281-16/+15
|\ \ \ \ | |/ / /
| * | | Destroy error handlers before final GC runNikita Popov2019-08-281-16/+15
| | | |
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-08-281-48/+45
|\ \ \ \ | |/ / /
| * | | Fixed bug #78335Nikita Popov2019-08-281-48/+45
| | | | | | | | | | | | | | | | | | | | Destroy static properties and variables prior to the final GC run, as they may hold GC roots.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-08-121-0/+1
|\ \ \ \ | |/ / /
| * | | Fixed bug #78396Nikita Popov2019-08-121-0/+1
| | | |
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-07-031-0/+1
|\ \ \ \ | |/ / /
| * | | Fixed bug #78239Nikita Popov2019-07-031-0/+1
| | | |
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-07-011-21/+16
|\ \ \ \ | |/ / /
| * | | Clarify #if indentation in time limit implemementationNikita Popov2019-07-011-21/+16
| | | |
* | | | Merge branch 'PHP-7.4'Dmitry Stogov2019-06-281-0/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Fixed use-after-free
| * | | Fixed use-after-freeDmitry Stogov2019-06-281-0/+2
| | | |
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-06-201-7/+6
|\ \ \ \ | |/ / /
| * | | Change indexing scheme for symtable_cacheNikita Popov2019-06-201-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | symtable_cache_ptr now points to the first unused symtable_cache entry, rahter than the last used one. This avoids taking a pointer to the minus first element of the array, which is UB. Instead we take a pointer to the end plus one, which is not UB.
* | | | Constify some char* arguments or return values of ZEND_APItwosee2019-06-121-4/+4
| | | | | | | | | | | | | | | | Closes GH-4247.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-06-111-1/+3
|\ \ \ \ | |/ / /
| * | | Support full variance if autoloading is usedNikita Popov2019-06-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep track of delayed variance obligations and check them after linking a class is otherwise finished. Obligations may either be unresolved method compatibility (because the necessecary classes aren't available yet) or open parent/interface dependencies. The latter occur because we allow the use of not fully linked classes as parents/interfaces now. An important aspect of the implementation is we do not require classes involved in variance checks to be fully linked in order for the class to be fully linked. Because the involved types do have to exist in the class table (as partially linked classes) and we do check these for correct variance, we have the guarantee that either those classes will successfully link lateron or generate an error, but there is no way to actually use them until that point and as such no possibility of violating the variance contract. This is important because it ensures that a class declaration always either errors or will produce an immediately usable class afterwards -- there are no cases where the finalization of the class declaration has to be delayed until a later time, as earlier variants of this patch did. Because variance checks deal with classes in various stages of linking, we need to use a special instanceof implementation that supports this, and also introduce finer-grained flags that tell us which parts have been linked already and which haven't. Class autoloading for variance checks is delayed into a separate stage after the class is otherwise linked and before delayed variance obligations are processed. This separation is needed to handle cases like A extends B extends C, where B is the autoload root, but C is required to check variance. This could end up loading C while the class structure of B is in an inconsistent state.
* | | | Merge branch 'PHP-7.4'Dmitry Stogov2019-05-311-14/+0
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Better hot/cold code splitting
| * | | Better hot/cold code splittingDmitry Stogov2019-05-311-14/+0
| | | |
* | | | Merge branch 'PHP-7.4'Dmitry Stogov2019-05-291-2/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Mark "cold" functions
| * | | Mark "cold" functionsDmitry Stogov2019-05-291-2/+2
| | | |
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-05-271-7/+7
|\ \ \ \ | |/ / /
| * | | Accept flags argument in zend_lookup_class_ex()Nikita Popov2019-05-271-7/+7
| | | | | | | | | | | | | | | | Instead of a single boolean, so we have space for extension here.
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-05-231-1/+5
|\ \ \ \ | |/ / /
| * | | Forbid use of not fully linked classesNikita Popov2019-05-231-1/+5
| | | |
* | | | Merge branch 'PHP-7.4'Nikita Popov2019-05-151-7/+21
|\ \ \ \ | |/ / /
| * | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-05-151-7/+21
| |\ \ \ | | |/ /
| | * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-05-151-7/+21
| | |\ \ | | | |/
| | | * Fixed bug #76980Nikita Popov2019-05-151-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we perform a class fetch that is not marked as exception safe, convert exceptions thrown by autoloaders into a fatal error. Ideally fetching the interfaces would be exception safe, but as it isn't right now, we must abort at this point.
| | | * Trim trailing whitespace in source code filesPeter Kokot2018-10-131-1/+1
| | | |
| | * | Future-proof email addressesZeev Suraski2018-11-011-3/+3
| | | |
* | | | Merge branch 'PHP-7.4'Dmitry Stogov2019-04-161-1/+0
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: execute_data->return_value is not used for internal functions