Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Keep JIT region executable under ZTS | Dylan K. Taylor | 2021-01-19 | 1 | -4/+13 |
| | | | | | | | | | | | | | 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. | ||||
* | Observe unused return values in JIT | Nikita Popov | 2021-01-19 | 1 | -12/+7 |
| | | | | | Even if the return value is not used, it should still be available to the observer. | ||||
* | Fixed bug #80422 (php_opcache.dll crashes when using Apache 2.4 with JIT) | Dmitry Stogov | 2021-01-14 | 1 | -0/+5 |
| | |||||
* | Add guard if lvalue of assignment may be a reference, but wasn't a reference ↵ | Dmitry Stogov | 2021-01-11 | 1 | -0/+5 |
| | | | | during recording | ||||
* | Fix/improve mysqli stubs | Dharman | 2021-01-06 | 1 | -6/+6 |
| | | | | | | | | * 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. | ||||
* | Initialize EX(call)->func by single instruction | Dmitry Stogov | 2020-12-29 | 1 | -7/+17 |
| | |||||
* | Reuse value stored in %r0 instead of immediate operand | Dmitry Stogov | 2020-12-29 | 1 | -2/+2 |
| | |||||
* | Eliminate redundand comparison insructions | Dmitry Stogov | 2020-12-24 | 3 | -14/+117 |
| | |||||
* | Optimize out result value of ASSIGN, ASSIGN_OP and INC/DEC opcodes, if possible. | Dmitry Stogov | 2020-12-15 | 1 | -1/+109 |
| | |||||
* | JIT: Update invalid opcache.jit INI value message to include "tracing" and ↵ | Ayesh Karunaratne | 2020-12-15 | 1 | -1/+1 |
| | | | | | | | | | "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. | ||||
* | JIT disabled build fix. | David Carlier | 2020-12-15 | 1 | -0/+2 |
| | | | | Closes GH-6514. | ||||
* | Remove unused flag | Dmitry Stogov | 2020-12-14 | 2 | -6/+1 |
| | |||||
* | Fixed bug #80506 (Immediate SIGSEGV upon ini_set("opcache.jit_debug", 1)) | Dmitry Stogov | 2020-12-14 | 1 | -0/+2 |
| | |||||
* | Eliminate some repeatable IS_REFERENCE checks | Dmitry Stogov | 2020-12-10 | 1 | -15/+47 |
| | |||||
* | Perform early guard type check for result of FETCH_CONSTANT | Dmitry Stogov | 2020-12-09 | 5 | -26/+65 |
| | |||||
* | Fixed IS_32BIT/IS_SIGNED_32BIT mess | Dmitry Stogov | 2020-12-09 | 1 | -17/+17 |
| | |||||
* | Avoid unnecessary checks | Dmitry Stogov | 2020-12-08 | 1 | -2/+6 |
| | |||||
* | Fixed bug #80480 (Segmentation fault with JIT enabled) | Dmitry Stogov | 2020-12-07 | 1 | -21/+37 |
| | |||||
* | Fix failing VirtualProtect() calls | Christoph M. Becker | 2020-12-02 | 1 | -0/+3 |
| | | | | | | | Whenever JIT is disabled due to incompatibilities, we also need to set `JIT_G(on)` to zero. Closes GH-6470. | ||||
* | Bug #80447 (Strange out of memory error when running with JIT) | Dmitry Stogov | 2020-12-01 | 2 | -1/+35 |
| | |||||
* | Skip test if JIT is not available | Dmitry Stogov | 2020-12-01 | 1 | -0/+1 |
| | |||||
* | Preallocate stack space for JIT in execute_ex() to eliminate JIT ↵ | Dmitry Stogov | 2020-11-30 | 1 | -16/+36 |
| | | | | prologue/epilogue. | ||||
* | Fixed "may be used uninitialized" compilation warnings | Dmitry Stogov | 2020-11-30 | 1 | -0/+3 |
| | |||||
* | Hide phpdbg/JIT incompatibility macro (JIT is disabled for phpdbg) | Dmitry Stogov | 2020-11-30 | 1 | -1/+5 |
| | |||||
* | Disable JIT with incompatible third-party extensions | Dmitry Stogov | 2020-11-30 | 4 | -4/+55 |
| | |||||
* | Only replace IN_ARRAY result type for JMPZ/JMPNZ | Nikita Popov | 2020-11-30 | 2 | -10/+24 |
| | | | | | | | | | | | | | | 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. | ||||
* | Respect strict_types during sccp function call evaluation | Nikita Popov | 2020-11-27 | 3 | -6/+30 |
| | | | | | Similar to what we do with attributes, add a dummy call frame on which we can set the strict_types flag. | ||||
* | Don't check for throwing calls in sccp function evaluation | Nikita Popov | 2020-11-27 | 1 | -200/+121 |
| | | | | | | We only need to reject functions that could warn (or have runtime dependent behavior). If a function can throw in some cases, just let it and discard the result. | ||||
* | Fix handling of sccp exceptions | Nikita Popov | 2020-11-27 | 3 | -4/+20 |
| | | | | | | We should clear the exception *before* we destroy the execute_data. Add a variation of the test that indirects through another file, and would crash otherwise. | ||||
* | Handle exceptions during SCCP function evaluation | Nikita Popov | 2020-11-27 | 2 | -0/+21 |
| | | | | | Easier to handle them than to ensure they can't happen in the first place. | ||||
* | Avoid direct calls to zend_cpu_supports() | Nikita Popov | 2020-11-27 | 1 | -2/+2 |
| | | | | | | While the use of zend_cpu_supports_*() is only strictly necessary inside ifunc resolvers, where the cpu state has not been initialized yet, we should prefer the compiler builtins in all cases. | ||||
* | Move avx check into a macro | Nikita Popov | 2020-11-27 | 1 | -17/+19 |
| | |||||
* | Fixed bug #80433 | Nikita Popov | 2020-11-27 | 2 | -4/+16 |
| | | | | Use ZEND_STRTOL to allow leading zeros in opcache.jit option. | ||||
* | Eliminate deafd stores | Dmitry Stogov | 2020-11-26 | 1 | -4/+28 |
| | |||||
* | Fixed bug #80377 | Nikita Popov | 2020-11-25 | 1 | -1/+1 |
| | | | | | | | | | | | Make sure the $PHP_THREAD_SAFETY variable is always available when configuring extensions. It was previously available for phpized extensions, but for in-tree builds it was being set too late. Then, use $PHP_THREAD_SAFETY instead of $enable_zts to check for ZTS in bundled extensions, which makes sure these checks also work for phpize builds. | ||||
* | Use diferent temporary register (%r0 may keep a method address) | Dmitry Stogov | 2020-11-25 | 1 | -3/+3 |
| | |||||
* | Revert "Fixed bug #80377" | Dmitry Stogov | 2020-11-25 | 1 | -1/+1 |
| | | | | This reverts commit fc26ad9b1220fdfd7db15ecaff5e7c38283c55b6. | ||||
* | Fixed bug #80377 | Nikita Popov | 2020-11-24 | 1 | -1/+1 |
| | | | | | | Use $PHP_THREAD_SAFETY instead of $enable_zts to check for ZTS. This variable is also available for phpize builds, while enable_zts is only present for in-tree builds. | ||||
* | Fixed bug #80404 | Nikita Popov | 2020-11-24 | 1 | -12/+29 |
| | | | | | | | | | | For a division like [1..1]/[2..2] produce [0..1] as a result, which would be the integer envelope of the floating-point result. The implementation is pretty ugly (we're now taking min/max across eight values...) but I couldn't come up with a more elegant way to handle this that doesn't make things a lot more complex (the division sign handling is the annoying issue here). | ||||
* | zend_jit_trace_stack_frame.stack can't be NULL | Dmitry Stogov | 2020-11-23 | 1 | -1/+0 |
| | |||||
* | Fixed use-after-free in PHPUnit tests | Dmitry Stogov | 2020-11-23 | 1 | -0/+3 |
| | |||||
* | Keep value of register before possible side exit | Dmitry Stogov | 2020-11-23 | 1 | -1/+27 |
| | |||||
* | Use MIN/MAX when dumping RANGE[] | Nikita Popov | 2020-11-20 | 1 | -0/+4 |
| | | | | | | It's very common that one of the bounds is LONG_MIN or LONG_MAX. Dump them as MIN/MAX instead of the int representation in that case, as it makes the dump less noisy. | ||||
* | Fixed incorrect TRACE_FRAME_MASK_NESTED flag setting | Dmitry Stogov | 2020-11-20 | 1 | -1/+7 |
| | |||||
* | Fixed 32-bit JIT | Dmitry Stogov | 2020-11-20 | 3 | -3/+3 |
| | |||||
* | Added missing deoptimization code for trampoline handling | Dmitry Stogov | 2020-11-19 | 4 | -1/+26 |
| | |||||
* | Fixed register clobbering | Dmitry Stogov | 2020-11-18 | 1 | -0/+4 |
| | |||||
* | Fixed trampoline handling | Dmitry Stogov | 2020-11-17 | 5 | -105/+161 |
| | |||||
* | Fixed allocated register clobbering | Dmitry Stogov | 2020-11-17 | 1 | -22/+47 |
| | |||||
* | Fixed false pasitive ASAN NULL pointer dereference warning | Dmitry Stogov | 2020-11-17 | 1 | -1/+1 |
| |