Skip to content

merge #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 320 commits into from
May 16, 2022
Merged

merge #17

merged 320 commits into from
May 16, 2022

Conversation

chopins
Copy link
Owner

@chopins chopins commented May 16, 2022

No description provided.

nikic and others added 30 commits April 15, 2022 23:01
* PHP-8.1:
  Don't use CE for by-ref arguments
ZEND_ASSIGN is not the only place where this is relevant, so
handle it generically inside COPY_SSA_OBJ_TYPE instead.
* PHP-8.0:
  Move MAY_BE_REF check into COPY_SSA_OBJ_TYPE
* PHP-8.1:
  Move MAY_BE_REF check into COPY_SSA_OBJ_TYPE
For the case where we upgrade a prototype to a possible by-ref
return from an inheriting method.
* PHP-8.1:
  Don't set ce for by-ref return type
In 7502c86, I adjusted the number of error markers emitted on
invalid UTF-8 text to be more consistent with mbstring's behavior on
other text encodings (generally, it emits one error marker for one
unexpected byte). I didn't expect that anybody would actually care one
way or the other, but felt that it was better to be consistent than
not.

Later, Martin Auswöger kindly pointed out that the WHATWG encoding
specification, which governs how various text encodings are handled
by web browsers, does actually specify how many error markers should
be generated for any given piece of invalid UTF-8 text.

Until now, we have never really paid much attention to the WHATWG
specification, but we do want to comply with as many relevant
specifications as possible. And since PHP is commonly used for web
applications, compatibility with the behavior of web browsers is
obviously a good thing.
* PHP-8.1:
  Error handling for UTF-8 complies with WHATWG specification
We may sometimes create FETCH_*_R opcodes with VAR type (e.g. if a
FUNC_ARG opcode is converted to BP_VAR_R fetch kind). Make sure we
don't infer overly conservative types in that case.
Abstract functions are now handled in the INIT stage, they do not
affect DO opcodes anymore.

Also add a check for another precondition, namely that the function
is not a trampoline.
Make this robust against the case where NEW is terminated by
something other than DO_FCALL, e.g. DO_UCALL. This can't currently
happen.
Fixes oss-fuzz #46704
* PHP-8.1:
  JIT: Fixed incorrect guard
This is unlikely to matter in practice (due to the short lifetime),
but we should not specify a CE for a potential ref result.

Fixes oss-fuzz #46810.
* PHP-8.1:
  Don't optimize trailing args for prototype fbc
I don't think this is strictly necessary, but I think it makes
sense to check this before interpreting opline->op2.num as an
argument number.

This also adds one more has_known_send_mode() check that I had
missed before.
* PHP-8.1:
  Move check for named params in fcall optimization earlier
Even if we can't optimize the SEND_VAL_EX, there is no reason to
skip the INIT_FCALL/DO_FCALL optimizations, those should be entirely
orthogonal.
* PHP-8.0:
  Fix GH-8408: bug68547.phpt fails without multibyte support
* PHP-8.1:
  Fix GH-8408: bug68547.phpt fails without multibyte support
dstogov and others added 29 commits May 11, 2022 12:39
This fizes oss-fuzz #47044
* PHP-8.1:
  Fix type inference
We use the snmpd which is now bundled with the net-snmp dependency, and
the MIBS which are also shipped with it.

We also fix the tests/snmpd.conf, and mark two failing tests as XFAIL.

Closes GH-8503.
)

Fixes -Wstrict-prototypes warning introduced by commit 04a4864
The new php-src bugtracker is on Github.

Closes GH-8277.
We setup the currently latest version of hMailServer[1] as mail server,
and configure according to imap_include.inc.  To not require further
configuration, we adapt mail_skipif.inc and mail_include.inc to match
that configuration.  However, we also change the default domain to the
reserved `example.com`.

We also update the standard mail tests to use the `--EXTENSIONS--`
section (instead of skipping the tests if ext/imap is not available).

Finally, we fix bug80751.phpt to expect the configured To and Cc mail
addresses.

[1] <https://www.hmailserver.com/>

Closes GH-8357.
…modified

For methods we reuse mechanism of polymorphic calls.
For regular function we invalidate the whole root trace.

This fixes #8461
* PHP-8.1:
  Add JIT guards for INIT_FCALL instructions and functions that may be modified
Ideally, these methods should have been declared with a static return type, so let's add a PHPDoc type hint + a TODO for fixing the issue in the future.
…mpilation (#8507)

The entry may exist later if dl is enabled

Fixes GH-8466
…mpilation (#8507)

The entry may exist later if dl is enabled

Fixes GH-8466
The old archive is no longer available.
* PHP-8.1:
  Update libmysqlclient to 5.7.38
The unexpected EOF failure was introduced in OpenSSL 3.0 to prevent
truncation attack. However there are many non complaint servers and
it is causing break for many users including potential majority
of those where the truncation attack is not applicable. For that reason
we try to keep behavior consitent with older OpenSSL versions which is
also the path chosen by some other languages and web servers.

Closes GH-8369
)

This is a stepping stone in converting more pairs of ``char*`` and ``size_t`` to ``zend_string*`` across the CLI SAPI.

Also amend the CLI SAPI test setup to output it's content when it crashes/errors so that one can debug ASAN/UBSAN/MSAN violations.

Drive-by MSAN fix.

Co-authored-by: Arnaud Le Blanc <arnaud.lb@gmail.com>
@chopins chopins merged commit bda9813 into chopins:master May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.