1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 15:38:49 +02:00
Commit Graph

556 Commits

Author SHA1 Message Date
George Peter Banyard a1fee87c9a Drop useless zend_accel_script_persistable() function 2020-07-17 17:00:42 +02:00
Nikita Popov 27800441b5 Reduce scope of preload compiler_options
Only set preloading compiler_options while executing the preload
file, not when performing linking afterwards. Otherwise options
like IGNORE_INTERNAL_CLASSES will hide classes from inheritance
verification.
2020-07-14 16:10:04 +02:00
Nikita Popov 06162194d6 Fix preloading property type resolution
This was causing many failures under --preload...
2020-07-14 12:59:04 +02:00
Christoph M. Becker 1a00d015be Remove out-dated comment
ZTS support has been added around ~7.2.
2020-07-13 19:14:59 +02:00
Christoph M. Becker 11a628d96c Fix typos 2020-07-13 19:13:45 +02:00
Dmitry Stogov a75cf0c7e1 JIT support for opcache restart 2020-07-08 18:14:11 +03:00
Nikita Popov 75a04eac97 Make exit() unwind properly
exit() is now internally implemented by throwing an exception,
performing a normal stack unwind and a clean shutdown. This ensures
that no persistent resource leaks occur.

The exception is internal, cannot be caught and does not result in
the execution of finally blocks. This may be relaxed in the future.

Closes GH-5768.
2020-06-29 15:50:12 +02:00
Dmitry Stogov bb3d4456ee Change GC_COLLECTABLE flag into GC_NOT_COLLECTABLE to simplify GC_MAY_LEAK() check 2020-06-15 14:26:22 +03:00
twosee 88355dd338 Constify char * arguments of APIs
Closes GH-5676.
2020-06-08 10:38:45 +02:00
Nikita Popov 975acfe71e Pass zend_string message to zend_error_cb
This makes the zend_error_cb API simpler, and avoid formatting
the same message in multiple places.

It should be noted that the passed zend_string is always
non-persistent, so if you want to store it persistently somewhere,
you may still need to duplicate it.

The last_error_message is cleared a bit more aggressive, to make
sure it doesn't hang around across allocator life-cycles.

Closes GH-5639.
2020-06-05 09:54:02 +02:00
Dmitry Stogov 95248491af Prefer already cached version of the script 2020-05-20 23:04:34 +03:00
Nikita Popov 0a74da385d Add support for replaying warnings in opcache
If opcache.record_warnings is enabled, opcache will record
compilation warnings and replay them when the file is included
again. The primary use case I have in mind for this is automated
testing of the opcache file cache.

This resolves bug #76535.
2020-05-20 11:20:21 +02:00
Dmitry Stogov 0695048e20 JIT refactoring to allow run-time changes of JIT options (triggers, optimization_level, debug flags, etc) 2020-05-18 10:23:06 +03:00
Dmitry Stogov 78b64bd4ed Merge branch 'PHP-7.4'
* PHP-7.4:
  Check asserts early
  identation fix
  Call global code of preloaded script in global context
  Avoid "Anonymous class wasn't preloaded" error by lazely loading of not preloaded part of a preloaded script
2020-03-13 11:42:07 +03:00
Dmitry Stogov b6492b4453 identation fix 2020-03-12 22:26:16 +03:00
Dmitry Stogov 3c6e9bed1a Call global code of preloaded script in global context 2020-03-12 22:19:47 +03:00
Dmitry Stogov 2dddab01ae Avoid "Anonymous class wasn't preloaded" error by lazely loading of not preloaded part of a preloaded script 2020-03-12 16:31:24 +03:00
Nikita Popov bb85478bcc Merge branch 'PHP-7.4'
* PHP-7.4:
  Try to fix msvc build
2020-02-28 14:49:03 +01:00
Nikita Popov a7de98fb12 Try to fix msvc build 2020-02-28 14:48:02 +01:00
Nikita Popov 519a72e0b4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79252
2020-02-28 12:49:45 +01:00
Nikita Popov 30ee3f48d4 Fixed bug #79252 2020-02-28 12:47:56 +01:00
Nikita Popov f57f0920fd Remove ZEND_ACC_IMPLEMENTS_TRAITS flag
This is equivalent to checking ce->num_traits.
2020-02-06 10:45:49 +01:00
Nikita Popov ebd00c5b65 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79128
2020-01-24 16:20:30 +01:00
Nikita Popov 3291891408 Fixed bug #79128
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.
2020-01-24 16:18:48 +01:00
Xinchen Hui ce5d722a6d Merge branch 'PHP-7.4'
* PHP-7.4:
  Let's make this safer from maliciously crafted filename
2020-01-20 12:35:08 +08:00
Xinchen Hui 2958cdc0b5 Let's make this safer from maliciously crafted filename 2020-01-20 12:33:37 +08:00
Xinchen Hui 5aa12d2e32 Merge branch 'PHP-7.4'
* PHP-7.4:
  minor cleanup
2020-01-20 12:29:23 +08:00
Xinchen Hui dda2addab2 minor cleanup 2020-01-20 12:28:57 +08:00
Xinchen Hui 31dd635eb3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79114 (Eval class during preload causes class to be only half available)
2020-01-20 12:25:10 +08:00
Xinchen Hui 9c2fd55d01 Fixed bug #79114 (Eval class during preload causes class to be only half available) 2020-01-20 12:24:49 +08:00
Nikita Popov bd1977282c Use zend_type inside type lists
Instead of having a completely independent encoding for type list
entries. This is going to use more memory, but I'm not particularly
concerned about that, as type unions that contain multiple classes
should be uncommon. On the other hand, this allows us to treat
top-level types and types inside lists mostly the same.

A new ZEND_TYPE_FOREACH macros allows to transparently treat list
and non-list types the same way. I'm not using it everywhere it could be
used for now, just the places that seemed most obvious.

Of course, this will make any future type system changes much simpler,
as it will not be necessary to duplicate all logic two times.
2020-01-17 09:37:54 +01:00
Máté Kocsis 0b4778c377 Fix #78880: Another bunch of spelling errors 2020-01-16 09:46:47 +01:00
Dmitry Stogov 8ee04946f0 typo 2020-01-13 16:25:42 +03:00
Nikita Popov 862a4f3a5e Fix build 2020-01-13 12:42:51 +01:00
Dmitry Stogov 27815959e1 Improve access to zend_map_ptr data 2020-01-13 14:27:35 +03:00
Nikita Popov 9b6c0bdcd6 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove support for preloading on Windows
2020-01-06 22:42:31 +01:00
Nikita Popov 59c3ddab13 Remove support for preloading on Windows
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.
2020-01-06 22:41:55 +01:00
Nikita Popov 3262c28d5c Merge branch 'PHP-7.4'
* PHP-7.4:
  Also propagate include exceptions in opcache
  Make url_stats in resolve_path quiet
2019-12-30 23:22:39 +01:00
Nikita Popov 22e9f9fe4d Also propagate include exceptions in opcache 2019-12-30 23:22:26 +01:00
Dmitry Stogov 1e53769d82 Set opcode handler 2019-12-23 14:14:47 +03:00
Dmitry Stogov ee45dbab37 Merge branch 'PHP-7.4'
* PHP-7.4:
  Addirional fix for bug #78918
2019-12-11 12:29:10 +03:00
Dmitry Stogov 3280209c03 Addirional fix for bug #78918 2019-12-11 12:21:49 +03:00
Dmitry Stogov 764c8159b7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix error message
2019-12-10 22:17:42 +03:00
Dmitry Stogov 518a8f89c1 Fix error message 2019-12-10 22:17:10 +03:00
Nikita Popov c2d92ad971 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix incorrect zend_try usage
2019-12-10 15:22:46 +01:00
Nikita Popov 5ddcacac2e Fix incorrect zend_try usage 2019-12-10 15:22:31 +01:00
Nikita Popov fa18c115be Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix release build failure
2019-12-10 13:53:19 +01:00
Nikita Popov d6f86caa11 Fix release build failure
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?
2019-12-10 13:51:09 +01:00
Christoph M. Becker f2dbe4297b Merge branch 'PHP-7.4'
* PHP-7.4:
  Improve error message
2019-12-10 13:20:55 +01:00
Christoph M. Becker 9e22c3d4d9 Improve error message
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
2019-12-10 13:19:58 +01:00