1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00
Commit Graph

3012 Commits

Author SHA1 Message Date
Dmitry Stogov bb30fe9e2b Fixed bug #78868 (Calling __autoload() with incorrect EG(fake_scope) value) 2019-11-25 14:05:43 +03:00
Nikita Popov 6d4965febd Fixed bug #78787
Not the first time inheritance of shadow properties causes an issue,
thankfully this whole concept is gone in PHP 7.4.
2019-11-06 12:52:34 +01:00
Nikita Popov 33dd25d21c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #78689
2019-10-29 15:06:52 +01:00
Nikita Popov f9895b4bf5 Fixed bug #78689 2019-10-29 15:06:16 +01:00
Nikita Popov b61b60d15b Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #78752
2019-10-28 10:28:04 +01:00
Nikita Popov 16c4910876 Fix bug #78752
NULL out the execute_data before destroying it, otherwise GC may
trigger while the execute_data is partially destroyed, resulting
in double-frees.

The handling of call stack unfreezing is a bit awkward because it's
a ZEND_API function, so we can't change the signature.
2019-10-28 10:27:32 +01:00
Nikita Popov 4ba8d78100 Merge branch 'PHP-7.2' into PHP-7.3 2019-10-10 11:41:29 +02:00
Nikita Popov 96c84b7bc1 Fix leak on static method call on non-existent class 2019-10-10 11:40:49 +02:00
Nikita Popov 6fd6ad8f53 Fixed bug #78658 2019-10-09 17:00:27 +02:00
Nikita Popov 3c42471ef8 Merge branch 'PHP-7.2' into PHP-7.3 2019-10-02 12:07:19 +02:00
Nikita Popov a5d3620d93 Fix segfault with __COMPILER_HALT_OFFSET__ and trailing {}
Fixes OSS-Fuzz #17895.
2019-10-02 12:07:15 +02:00
Nikita Popov 7df50ef147 Don't throw warnings during heredoc scan-ahead
Otherwise these warnings will turn up twice (or more...)
2019-09-28 17:15:36 +02:00
Nikita Popov 91c4abcfcc Merge branch 'PHP-7.2' into PHP-7.3 2019-09-26 13:47:19 +02:00
Nikita Popov ab938d7bbc Fix memory leak with ** on array operands 2019-09-26 13:45:45 +02:00
Nikita Popov 99c67804d5 Merge branch 'PHP-7.2' into PHP-7.3 2019-09-26 10:25:40 +02:00
Nikita Popov 8a9df88597 Fix null-pointer deref in if stmt printing
Fixes OSS-Fuzz #17721.
2019-09-26 10:24:49 +02:00
Nikita Popov 34edd4aa2a Merge branch 'PHP-7.2' into PHP-7.3 2019-08-29 12:33:04 +02:00
Nikita Popov ed749edd47 Fix use-after-free of immediately invoked closure with extra args 2019-08-29 12:32:03 +02:00
Nikita Popov 461db52400 Merge branch 'PHP-7.2' into PHP-7.3 2019-08-26 17:52:37 +02:00
Nikita Popov 589542f50c Remove properties HT from nested GC data
The properties HT may be a GC root itself, so we need to remove it.
I'm not sure this issue actually applies to PHP 7.2, but committing
it there to be safe. As seen from the test case, the handling here
is rather buggy on 7.2.
2019-08-26 17:49:37 +02:00
Christoph M. Becker 310708845f Fix #78441: Parse error due to heredoc identifier followed by digit
Since digits are allowed for identifiers, we have to cater to them as
well.
2019-08-21 22:51:51 +02:00
Nikita Popov be7e819068 Fixed bug #77922
In PHP 7.3 shadow properties are no longer duplicated. Make sure we
only release them if the property was defined on the parent class,
which means that it changed from private->shadow, which is where
duplication does happen.
2019-08-17 10:58:54 +02:00
Dmitry Stogov 722a44d515 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed handling of references in nested data of objects with destructor
2019-08-09 17:47:06 +03:00
Dmitry Stogov 9b43e29d9b Fixed handling of references in nested data of objects with destructor 2019-08-09 17:43:50 +03:00
Dmitry Stogov 22d23e08c9 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed second part of the bug #78379 (Cast to object confuses GC, causes crash)
2019-08-09 15:58:16 +03:00
Dmitry Stogov 6b1cc1252e Fixed second part of the bug #78379 (Cast to object confuses GC, causes crash) 2019-08-09 15:42:39 +03:00
Dmitry Stogov bff2743caf Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #78379 (Cast to object confuses GC, causes crash)
2019-08-08 10:05:59 +03:00
Dmitry Stogov 358379be22 Fixed bug #78379 (Cast to object confuses GC, causes crash) 2019-08-08 10:00:39 +03:00
Nikita Popov d89157cd67 Add test for bug #78363 2019-08-02 10:37:44 +02:00
George Peter Banyard e7e66d5275 Convert short tag to standard tag in Zend test file
Closes GH-4389.

(cherry picked from commit e6c2b28865)
2019-07-16 15:27:50 +02:00
Nikita Popov 193f28c7d5 Fixed bug #78010
Prevent the gc_info from becoming all zero for a registered root
by setting the top bit to one for compressed root addresses.
2019-07-15 12:00:30 +02:00
Nikita Popov e7a83ec8df Fix bug #78271
When cleaning nops in the dfa pass, we were always keeping the
smart branch inhibiting nop that occurs directly before the jump
instruction. However, as we skip unreachable blocks entirely, it
may happen that we need to keep a nop that occurs further back,
prior to the unreachable blocks. Account for that case now.

We should really do something about the smart branch situation,
this is very fragile...
2019-07-10 17:25:40 +02:00
Nikita Popov 825f47564a Merge branch 'PHP-7.2' into PHP-7.3 2019-07-09 11:05:18 +02:00
Nikita Popov 22ed362810 Revert "Fixed bug #76980"
This reverts commit 35353dc49a.

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.
2019-07-09 11:04:16 +02:00
Nikita Popov 19d0a51533 Merge branch 'PHP-7.2' into PHP-7.3 2019-06-28 16:09:09 +02:00
sunnyeo f7327b6244 Fix bugs in AST printer
Closes GH-4324.
2019-06-28 16:08:44 +02:00
Nikita Popov 5846119e50 Merge branch 'PHP-7.2' into PHP-7.3 2019-05-15 12:48:35 +02:00
Nikita Popov 35353dc49a Fixed bug #76980
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.
2019-05-15 12:46:23 +02:00
Christoph M. Becker 1a98878bfe Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix test case
2019-05-14 10:25:02 +02:00
Christoph M. Becker 704a0ab0c9 Fix test case
stderr is supposed to be redirected to NUL (which is roughly equivalent
to /dev/null on POSIX), but actually was redirected to a file.
2019-05-14 10:23:58 +02:00
Nikita Popov bec68d59a2 Merge branch 'PHP-7.2' into PHP-7.3 2019-05-13 11:06:14 +02:00
Theodore Brown b6b15fc65c Fix #77993: Wrong parse error for invalid hex literal on Windows
If a PHP file contains an invalid hex literal such as `0x_10`, the expected error
is `Parse error: syntax error, unexpected 'x_10' (T_STRING) in %s on line %d`.

This already worked correctly on Linux, but on Windows prior to this patch a different
error was produced: `Parse error: Invalid numeric literal in %s on line %d`.
2019-05-13 11:04:56 +02:00
Nikita Popov e2ef4e9e2f Merge branch 'PHP-7.2' into PHP-7.3 2019-05-08 11:37:49 +02:00
Nikita Popov d19b6aa5ba Fix resolution of "parent" during inheritance check
We can't assume that the method we're checking against is part of
the parent class...
2019-05-08 11:35:26 +02:00
Nikita Popov 9a9eed472b Fix second part of bug #77903
When a HT iterator is one past the end and we rehash, we need to make
sure that it is move to the new one past the end position, to make
sure that newly inserted elements are picked up.
2019-04-16 10:38:20 +02:00
Nikita Popov 61eebb559e Merge branch 'PHP-7.2' into PHP-7.3 2019-03-18 10:04:29 +01:00
twosee bd6eabd659 Don't disable object slot reuse while running shutdown functions
We only need to do this once we're running destructors. The current
approach interferes with some event loop code that runs everything
inside a shutdown function.
2019-03-18 10:02:31 +01:00
Xinchen Hui e3965913c4 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #77738 (Nullptr deref in zend_compile_expr)
2019-03-14 16:46:46 +08:00
Xinchen Hui c7920aba3e Fixed bug #77738 (Nullptr deref in zend_compile_expr) 2019-03-14 16:46:04 +08:00
Dmitry Stogov 5da591c529 Fixed bug #77345 (Stack Overflow caused by circular reference in garbage collection) 2019-03-07 13:33:19 +03:00