The string is converted twice for some reason.
This is pointless, and furthermore, this is observable in userspace code
when dealing with Stringable objects.
Closes GH-19713.
This one is not initialized. This is not hittable from userspace code
because all locations within first-party php-src code have a valid
`option` argument.
Closes GH-19714.
Use the PHP_STREAM_FLAG_NO_FCLOSE flag to prevent closing a stream while
a handler is running. We already do this in some other places as well.
Only handlers that do something with the stream afterwards need changes.
Closes GH-18797.
* fpm: Improve the error message when FPM is running as root
Co-authored-by: Jakub Zelenka <bukka@php.net>
* fpm: Disable `TEST_FPM_RUN_AS_ROOT` for proc-user-not-set-when-root.phpt
---------
Co-authored-by: Jakub Zelenka <bukka@php.net>
Range analysis may fail to converge (the process hangs) when the transfer
function zend_inference_calc_range produces a smaller range.
Fix by ensuring that the widening operator zend_inference_widening_meet
allows only widening. This matches the inference rules in figure 13 of the
paper.
Fixes GH-19679
Closes GH-19683
This code is very similar to code on PHP 8.4 and higher, but the
mitigation is extended to entity references and to attribute children.
Closes GH-19620.
The value is temporarily duplicated. While the value is allocated persistently,
it will be freed if the ini value can't be set. This is safe, given the value
has not actually been stored.
Exposed by GH-19619
Closes GH-19671
Moves the usage of `mb_internal_encoding()` to INI section for the tests not testing the encoding/function itself, but the other mbstring/iconv functions.
We need to emit the EXT_STMT opcode before we compile the call, so that we
attach the line number of where the right hand pipe operator starts.
We also do not need to reset the line number anymore.
The following code shows where these EXT_STMTs are introduced.
```
<?php
/* EXT_STMT */ $myString = "<Hello World>";
$result = /* EXT_STMT */ $myString
|> /* EXT_STMT(!0:$myString) */ \htmlentities(...)
|>
/* EXT_STMT($4) */ \str_split(...)
|> /* EXT_STMT($6) */ (fn($x) => array_map(strtoupper(...), $x))
|> /* EXT_STMT($9) */ (fn($x) => join( ', ', $x));
/* EXT_STMT */ echo $result, /* EXT_STMT */ "\n";
```
This seems like an issue that might be potentially causing issues like
GH-12901. The problem is that libs like libcurl, libldap and others use
the default OpenSSL version so this might result in linking issues.
The fact that OpenSSL 1.1.1 was actually good that we were able to have
it in the pipeline but this is just not right setup so we should find
another way how to test it at least in nightly.
Closes GH-19472
Building opcache into the main executable breaks opcache.huge_code_pages,
as we were relying on the fact that accel_remap_huge_pages() is not in the
same mapping as the main text segment.
Here I ensure that accel_remap_huge_pages() is placed out of the text
segment, and remap only the text segment. This approach is used in [1].
Closes GH-19388.
[1] 676bb7dec3/large_page-c/large_page.c (L260).
On aarch64 we must set IR_USE_FRAME_POINTER to ensure that LR/x30 is
saved. Also, fixed_stack_frame_size must be n*16, not n*16+8 like on x86.
Fixes GH-19601
Closes GH-19630