Dmitry Stogov
7e494d9225
Fixed bug #80861 (erronous array key overflow in 2D array with JIT)
2021-03-17 22:59:59 +03:00
Dmitry Stogov
faf1567212
Fixed bug #80839 (PHP problem with JIT)
2021-03-17 16:55:09 +03:00
Nikita Popov
82622d7583
Fix refcount inference for typed properties
...
We were not adding RC1/RCN if the MAY_BE_OBJECT came from a class
type and there was no other refcounted type in the union.
2021-03-16 11:17:18 +01:00
Michael Heimpold
eaf9421df6
ext/opcache: fix configure output while checking mmap MAP_ANON support
...
It seems that f3efb9e3fb introduced a "typo" which may result
in the following confusing message:
checking for mmap() using MAP_ANON shared memory support... no=yes
Let's fix this.
Signed-off-by: Michael Heimpold <mhei@heimpold.de >
Closes GH-6758.
2021-03-15 10:52:57 +01:00
Dmitry Stogov
3b377b51a2
Fixed bug #80814 (threaded mod_php won't load on FreeBSD: No space available for static Thread Local Storage)
2021-03-10 16:03:47 +03:00
David Carlier
ae23852e41
Add supports for FreeBSD's PROT_MAX to let mprotect knows X flag can be applied in addition.
...
Closes GH-6738.
2021-03-05 16:44:08 +01:00
Christoph M. Becker
1c16749eaa
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Print error code if CreateMutex() fails
2021-03-05 15:08:24 +01:00
Christoph M. Becker
e0e167e581
Print error code if CreateMutex() fails
...
This issue came up recently in a bug report[1]; without the error code,
users can barely guess why the function failed.
[1] <https://bugs.php.net/80812 >
Closes GH-6745.
2021-03-05 15:06:18 +01:00
Dmitry Stogov
957cb13a49
Fixed bug #80802 : (zend_jit_fetch_indirect_var assert failure with tracing JIT)
2021-03-01 23:57:20 +03:00
Nikita Popov
e857936518
Fixed bug #80805
...
Handle missing result_var in binary_op_result_type.
(cherry picked from commit 8446e28275 )
2021-03-01 15:13:15 +01:00
Dmitry Stogov
b7fa5268e4
Fixed bug #80782 (DASM_S_RANGE_VREG on PHP_INT_MIN-1)
2021-02-24 12:20:20 +03:00
Nikita Popov
79cf2c56d3
Fixed bug #80786
...
Don't use r0 as temporary register in math_double_long if it is
already used for a memory result.
This was already done in one branch, but not the other.
2021-02-23 10:22:00 +01:00
Dmitry Stogov
7f68a7afe6
Fixed bug #80745 (JIT produces Assert failure and UNKNOWN:0 var_dumps in code involving bitshifts)
2021-02-17 11:51:13 +03:00
Dmitry Stogov
fad87a24da
Fixed bug #80742 (Opcache JIT makes some boolean logic unexpectedly be true)
2021-02-16 20:02:12 +03:00
Nikita Popov
7215261349
Update func info after password_get_info() change
2021-02-11 11:44:14 +01:00
Nikita Popov
0c6ff5eafa
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Try SIGTERM before SIGKILL in opcache restart
2021-02-04 17:07:30 +01:00
Nikita Popov
8b7aaad7d6
Try SIGTERM before SIGKILL in opcache restart
...
SIGTERM is subject to HANDLE_BLOCK_INTERRUPTIONS(), which will
allow code to exit critical sections before it gets terminated.
Closes GH-6493.
2021-02-04 17:07:18 +01:00
Remi Collet
4a35f4a476
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
NEWS
Fix #80682 opcache doesn't honour pcre.jit option
2021-01-28 16:26:26 +01:00
Remi Collet
067f7e4150
Fix #80682 opcache doesn't honour pcre.jit option
2021-01-28 16:24:39 +01:00
Dmitry Stogov
64622979f9
Fixed observer API and JIT compatibility
2021-01-26 21:31:15 +03:00
Alex Samorukov
527bcb1e2e
Fix opcache phpize build on FreeBSD
...
Closes GH-6589.
2021-01-25 15:10:47 +01:00
Nikita Popov
286c13e1e6
Skip preloading test on windows
2021-01-20 10:09:31 +01:00
Dmitry Stogov
6288228b56
Fixed bug #80634 (write_property handler of internal classes is skipped on preloaded JITted code)
2021-01-20 11:03:37 +03:00
Dylan K. Taylor
872f302b8d
Keep JIT region executable under ZTS
...
When one thread tries to compile a script, another thread may
already be executing JITed code. In this case we can't make the
memory non-executable.
This violates the W^X principle, but doesn't seem to be avoidable
for ZTS builds for now. The same problem does not exist for NTS,
as it's a different process executing there, which has it's own
memory protection mapping.
Closes GH-6595.
2021-01-19 10:25:42 +01:00
Nikita Popov
fbd8e20ed5
Observe unused return values in JIT
...
Even if the return value is not used, it should still be available
to the observer.
2021-01-19 10:09:53 +01:00
Dmitry Stogov
3edf5c969a
Fixed bug #80422 (php_opcache.dll crashes when using Apache 2.4 with JIT)
2021-01-14 08:16:27 +03:00
Dmitry Stogov
35e0506a2e
Add guard if lvalue of assignment may be a reference, but wasn't a reference during recording
2021-01-11 15:12:27 +03:00
Dharman
44a311dbbe
Fix/improve mysqli stubs
...
* mysqli_commit $flags default value is 0, not -1.
* A number of functions cannot actually return null.
* mysqli_poll parameter names were incorrect, as this function
has a different signature from select.
* fetch functions apart from fetch_all can return false on failure.
2021-01-06 11:28:45 +01:00
Dmitry Stogov
da0ca53f39
Initialize EX(call)->func by single instruction
2020-12-29 13:20:10 +03:00
Dmitry Stogov
56fde2a381
Reuse value stored in %r0 instead of immediate operand
2020-12-29 13:18:56 +03:00
Dmitry Stogov
23bbff2b05
Eliminate redundand comparison insructions
2020-12-24 16:58:54 +03:00
Dmitry Stogov
de78786566
Optimize out result value of ASSIGN, ASSIGN_OP and INC/DEC opcodes, if possible.
2020-12-15 14:30:58 +03:00
Ayesh Karunaratne
724e241c9d
JIT: Update invalid opcache.jit INI value message to include "tracing" and "function" values
...
`opcache.jit` accepts `tracing` and `function` as aliases, but they were not mentioned in the start-up INI warning message.
This updates the error message to include all possible values.
Closes GH-6490.
2020-12-15 10:18:33 +01:00
David Carlier
1e6c7e776c
JIT disabled build fix.
...
Closes GH-6514.
2020-12-15 09:51:16 +01:00
Dmitry Stogov
b3377028dc
Remove unused flag
2020-12-14 15:29:21 +03:00
Dmitry Stogov
a12e7affd7
Fixed bug #80506 (Immediate SIGSEGV upon ini_set("opcache.jit_debug", 1))
2020-12-14 15:26:11 +03:00
Dmitry Stogov
dde5572937
Eliminate some repeatable IS_REFERENCE checks
2020-12-10 14:45:54 +03:00
Dmitry Stogov
e9f9e9f863
Perform early guard type check for result of FETCH_CONSTANT
2020-12-09 22:24:03 +03:00
Dmitry Stogov
8d268e8443
Fixed IS_32BIT/IS_SIGNED_32BIT mess
2020-12-09 17:16:54 +03:00
Dmitry Stogov
db34491a62
Avoid unnecessary checks
2020-12-08 13:10:35 +03:00
Dmitry Stogov
7971602574
Fixed bug #80480 (Segmentation fault with JIT enabled)
2020-12-07 13:28:37 +03:00
Christoph M. Becker
72cd5793be
Fix failing VirtualProtect() calls
...
Whenever JIT is disabled due to incompatibilities, we also need to set
`JIT_G(on)` to zero.
Closes GH-6470.
2020-12-02 16:51:50 +01:00
Dmitry Stogov
1674c96c0b
Bug #80447 (Strange out of memory error when running with JIT)
2020-12-01 16:43:05 +03:00
Dmitry Stogov
31eafedf2e
Skip test if JIT is not available
2020-12-01 09:58:33 +03:00
Dmitry Stogov
841b00f641
Preallocate stack space for JIT in execute_ex() to eliminate JIT prologue/epilogue.
2020-11-30 17:56:08 +03:00
Dmitry Stogov
5f36d0497f
Fixed "may be used uninitialized" compilation warnings
2020-11-30 17:46:43 +03:00
Dmitry Stogov
a0baa09b99
Hide phpdbg/JIT incompatibility macro (JIT is disabled for phpdbg)
2020-11-30 16:42:17 +03:00
Dmitry Stogov
d5a82e2c4e
Disable JIT with incompatible third-party extensions
2020-11-30 13:58:34 +03:00
Nikita Popov
fdb05b92bf
Only replace IN_ARRAY result type for JMPZ/JMPNZ
...
Replacing the result type in the general case is dangerous,
because not all opcodes support both VAR and TMP. One common case
is the in_array() result being passed to SEND_VAR, which would
have to be changed to SEND_VAL.
Rather than complicating this logic, reduce the scope to only
doing the type replacement for JMPZ and JMPNZ. The only reason
we're doing this in the first place is to enable the smart branch
optimization, so we can limit it to the relevant opcodes. Replacing
the result type may be marginally useful in other cases as well
(as it may avoid reference checks), but not worth the bother.
2020-11-30 11:18:21 +01:00
Nikita Popov
5b3809e942
Respect strict_types during sccp function call evaluation
...
Similar to what we do with attributes, add a dummy call frame
on which we can set the strict_types flag.
2020-11-27 20:24:00 +01:00