1
0
mirror of https://github.com/php/php-src.git synced 2026-04-03 14:12:38 +02:00
Commit Graph

59913 Commits

Author SHA1 Message Date
Dmitry Stogov
0424ce0c15 Avoid redundand repeatable VM stack overflow checks 2021-08-26 16:50:29 +03:00
Máté Kocsis
5e424d2884 Fix a few ext/date return types 2021-08-26 15:26:13 +02:00
Máté Kocsis
267c24e9ee Update property read handler comments for DOMEntity 2021-08-26 13:15:24 +02:00
Nikita Popov
6434c93a27 Explicitly store real map ptr base
If we only store the biased pointer, the map ptr region will not
be recognized as reachable memory by leak checkers. This is
primarily problematic for fuzzing, because this is persistent
memory that may be reallocated during the request, without being
an actual leak.

Avoid this by simply storing both the real base pointer of the
allocation, as well as the biased base pointer used for accesses.
2021-08-26 12:29:44 +02:00
Máté Kocsis
765aec8623 Generate optimizer func info from stubs for ext/sodium (#7404) 2021-08-26 10:44:38 +02:00
Máté Kocsis
25cbd08470 Make a few unuseful DOMEntity properties readonly (#7406) 2021-08-26 10:37:45 +02:00
Máté Kocsis
2d248c80b9 Generate optimizer func info from stubs for ext/date (#7403) 2021-08-25 21:29:46 +02:00
Máté Kocsis
50f31829b1 Generate optimizer func info from stubs for a few extensions - part 2 (#7401)
ext/bcmath, ext/fileinfo, ext/filter, ext/gettext, ext/session
2021-08-25 15:29:46 +02:00
Dmitry Stogov
1c9f8eb7b9 JIT/x86: Merge load and test of EX_CALL_INFO() into single instruction 2021-08-25 14:36:06 +03:00
K
e89048aea7 Use FastZPP for SQLite3Stmt/SQLite3Result (#7392) 2021-08-25 10:44:25 +02:00
Máté Kocsis
d379044066 Generate a few missing optimizer function entries from stubs 2021-08-25 10:37:43 +02:00
Máté Kocsis
bdfe0ab505 Generate Zend, ext/spl and ext/json optimizer func info from stubs
Closes GH-7397
2021-08-25 10:37:27 +02:00
Ikko Ashimine
6e5771148d Fix typo in file.c
apostrohpe -> apostrophe
2021-08-25 09:51:32 +02:00
Máté Kocsis
cdf2f3eb16 DOMCharacterData::$data and DOMAttr::$value are writable 2021-08-25 09:25:22 +02:00
Nikita Popov
2dafb0e30f Add comments to grouped character properties
[ci skip]
2021-08-24 22:09:26 +02:00
Dmitry Stogov
c5ded13614 JIT: Code generation for ROPE_INIT, ROPE_ADD and ROPE_END with STRING operands 2021-08-24 21:45:14 +03:00
Nikita Popov
425c2e3ba1 Combine control into one character group
Same as with punct, we're currently not interested in distinguishing
between Cc and Cf, so only store their union.
2021-08-24 20:39:16 +02:00
Nikita Popov
f458b16041 Combine punctuation into one character group
We're not currently interested in distinguishing between
individual punctuation types, so just merge everything into one
general category to make the property lookup more efficient.
2021-08-24 19:21:21 +02:00
Nikita Popov
d2073179e3 Return bool from php_unicode_is_prop() 2021-08-24 19:21:21 +02:00
Máté Kocsis
b1822899fc Add support for generating optimizer function info from stubs (#7367) 2021-08-24 16:35:33 +02:00
Nikita Popov
3be94217f4 Don't use sentinel value for unicode property lookup
0xffff was used to mark character properties without any members.
This made the code unnecessarily complicated, because we need to
check for 0xffff values when looking up the property ranges. We
can simply encode this as an empty set of ranges.
2021-08-24 15:53:43 +02:00
Máté Kocsis
b4b980e6ad Merge branch 'PHP-8.0'
* PHP-8.0:
  Declare a few missing function return types
2021-08-24 11:43:31 +02:00
Máté Kocsis
c58a9f2a57 Declare a few missing function return types
Closes GH-7395
2021-08-24 11:38:50 +02:00
Stanislav Malyshev
1fefd482f4 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix test
2021-08-23 23:44:06 -07:00
Stanislav Malyshev
ffcf5ba4ae Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix test
2021-08-23 23:43:58 -07:00
Stanislav Malyshev
c1f427b506 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix test
2021-08-23 23:43:51 -07:00
Stanislav Malyshev
b815645aac Fix test 2021-08-23 23:43:32 -07:00
Stanislav Malyshev
18ebe1588d Merge branch 'PHP-8.0'
* PHP-8.0:
  Update NEWS
  Fix #81211: Symlinks are followed when creating PHAR archive
2021-08-23 23:31:00 -07:00
Stanislav Malyshev
33e4174d1c Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Update NEWS
  Fix #81211: Symlinks are followed when creating PHAR archive
2021-08-23 23:30:34 -07:00
Stanislav Malyshev
40db8947e2 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Update NEWS
  Fix #81211: Symlinks are followed when creating PHAR archive
2021-08-23 23:29:01 -07:00
Christoph M. Becker
2ff853aa11 Fix #81211: Symlinks are followed when creating PHAR archive
It is insufficient to check whether the `base` is contained in `fname`;
we also need to ensure that `fname` is properly separated.  And of
course, `fname` has to start with `base`.
2021-08-23 23:25:16 -07:00
DmitryMaksimov
bdf53cc91f Dispatch using LANG_NEUTRAL instead of LOCALE_SYSTEM_DEFAULT
This is relevant wrt. case insensitive identifiers.

Closes GH-7391.
2021-08-23 14:07:23 +02:00
Dmitry Stogov
116fa65482 Fixed ZEND_MAP_PTR_KIND_PTR (it is not used) 2021-08-23 14:04:02 +03:00
Dmitry Stogov
476c333a8e Reorder updates to avoid race conditions 2021-08-23 11:47:30 +03:00
Nikita Popov
6385006102 Merge branch 'PHP-8.0'
* PHP-8.0:
  Mark PDO::setAttribute() $value as mixed
2021-08-20 16:53:25 +02:00
Nikita Popov
2e343fcb42 Mark PDO::setAttribute() $value as mixed
For consistency with PDOStatement::setAttribute(). Attribute values
can for example also be bool.

This is backwards-compatible, as mixed is the same as no type for
parameter variance.
2021-08-20 16:51:52 +02:00
Nikita Popov
05a217927a Declare php_user_filter::$stream property
This property is temporarily set during the filter() call. I have
no idea why this wasn't added as an argument to filter() instead.
2021-08-20 14:50:25 +02:00
Nikita Popov
7f7a90b2bc Remove php_user_filter::$filter property
This property was formerly used to hold the php_stream_filter
pointer for destruction purposes. However, this is no longer used,
and we don't need to create this resource at all.
2021-08-20 14:39:53 +02:00
Nikita Popov
841d0b30eb Slightly clean up cookies handling
Make the property always an array with an empty array default.
Properly separate the array on modification to compensate.
2021-08-20 14:27:24 +02:00
Nikita Popov
de6cf68ac4 Fix missing string copy
I changed this to a zend_string_copy, but that's not correct in
this case, as we still append to the string below.

Also fix a test on 32-bit.
2021-08-20 14:15:23 +02:00
Nikita Popov
50484b59cd Move derefs into accessor macros
These derefs are mostly there to be defensive, but clutter the
code somewhat. Move them directly into the access macros.
2021-08-20 14:15:23 +02:00
Kamil Tekiela
a893a4901f Implement mysqlnd_set_persistent_string (#7371) 2021-08-20 12:03:46 +01:00
Nikita Popov
6b05d958aa Make internal SoapServer/SoapClient state private
This was previously implicitly public due to the use of dynamic
properties. Make this internal state private.

If someone complains, we can consider relaxing this to protected
or public on a case-by-case basis.
2021-08-20 12:54:39 +02:00
Nikita Popov
e6c6abf6b4 Declare remaining SoapClient properties 2021-08-20 12:50:19 +02:00
Nikita Popov
b3b1658492 Remove dead code
This was checking for the headerfault property, but not actually
doing anything with it.
2021-08-20 12:28:58 +02:00
Nikita Popov
aa4898ef2e Use separate property to request digit auth
Currently, _digest is used both to request that digest auth be
used (_digest == null) and to later store the _digest parameters.

This relies on the ability to distinguish between _digest being
null and it being not set, which is not present with declared
properties. (Well, technically it is, we could just leave it
uninitialized, but that would be non-idiomatic.)

Resolve this by splitting into separate _use_digest and _digest
properties.
2021-08-20 10:41:36 +02:00
Nikita Popov
32d663e198 Declare SoapFault properties 2021-08-20 10:08:22 +02:00
Nikita Popov
44befbdc01 Don't convert Error exception to SoapFault
Error exceptions should generally not be converted into domain-
specific exception types. They indicate programming errors that
should not be handled locally.
2021-08-20 10:06:11 +02:00
Nikita Popov
018cb891cf Declare some SoapClient properties
This is only a subset of all properties for now (those without
underscore).
2021-08-19 16:15:41 +02:00
Nikita Popov
e861cb5c31 Simplify some strtolower operations in ext/soap 2021-08-19 16:10:30 +02:00