Nikita Popov
f1ceec5533
Fixed bug #77058
...
Account for the fact that undef must be interpreted as null for
the purposes of INC/DEC inference.
2018-10-25 16:37:41 +02:00
Nikita Popov
e7153e8a2f
Improve "narrowing" error message
...
By including the opcode name.
2018-10-25 16:36:23 +02:00
Peter Kokot
7f6387b59a
Trim trailing whitespace in source code files
2018-10-13 14:12:55 +02:00
Nikita Popov
2eb6a541a9
Fix typo in compound dim assign op inference
...
Thankfully a harmless one, just makes inference results worse.
2018-06-30 19:50:07 +02:00
Nikita Popov
6738d19fb8
Fix bug #76281
...
Make sure we keep the smart-branch inhibiting NOP even if there
are multiple NOPs in sequence.
2018-04-27 22:21:59 +02:00
Nikita Popov
279ba58edb
Fixed bug #76275
...
* Adjust IS_SERIALIZED() check to account for potential empty
allocations at the end of the memory region.
* Deallocate empty allocation if all try/catch elements have been
removed in the block pass (similar to what we do if all live
ranges have been eliminated).
2018-04-27 17:01:35 +02:00
Dmitry Stogov
0643c7ab4d
Revert "More accurate symbolic constraints oferflow/unserflow handling (better fix for bug #76074 )."
...
This reverts commit 44ba557de5 .
2018-03-13 11:03:45 +03:00
Dmitry Stogov
44ba557de5
More accurate symbolic constraints oferflow/unserflow handling (better fix for bug #76074 ).
2018-03-13 10:44:53 +03:00
Bob Weinand
9c6df8a238
Fix bug #76074 (opcache corrupts variable in for-loop)
2018-03-10 15:20:45 +01:00
Nikita Popov
372bf8a923
Fixed bug #75969
...
Move NOP stripping out of zend_optimize_block: NOP stripping may
move instructions, which may invalidate a Tsource shared across
an extended basic block.
2018-02-16 20:30:03 +01:00
Nikita Popov
f208187773
Backport narrowing fix to 7.1
...
This is a cherry-pick of 8a4532319d .
2018-01-09 18:41:46 +01:00
Xinchen Hui
ccd4716ec7
year++
2018-01-02 12:53:31 +08:00
Dmitry Stogov
5934bff913
Fixed bug #75608 ("Narrowing occurred during type inference" error)
2017-12-04 17:22:06 +03:00
Dmitry Stogov
776bef8447
Fixed bug in type inference
2017-11-27 10:16:16 +03:00
MITSUNARI Shigeo
21dbd2ffcd
fix wrong check of definition_phi->constraint.range.max_ssa_var
2017-11-03 17:49:42 +00:00
Xinchen Hui
d9de0f8683
Use abbrev
2017-10-30 16:26:59 +08:00
Dmitry Stogov
230e505fd8
Fixed type inference
2017-10-30 10:41:27 +03:00
Dmitry Stogov
b6e34eaf04
Fixed rarely possible use-after-free
2017-10-04 16:38:55 +03:00
Xinchen Hui
9fd33c1f20
Fixed bug #75267 (possible &/&& mixup)
2017-09-29 11:16:32 +08:00
Dmitry Stogov
1c68d63f35
Fixed bug #75255 (Request hangs and not finish)
2017-09-27 17:16:24 +03:00
Dmitry Stogov
550595c085
Added missed ~
2017-09-25 12:22:35 +03:00
Dmitry Stogov
d526ddec85
Fixed type inference
2017-09-25 12:03:47 +03:00
Xinchen Hui
3df47c12f7
Fixed bug #74980 (Narrowing occurred during type inference)
2017-07-26 12:06:33 +08:00
Nikita Popov
69ec51eb02
Fix DFG construction for VERIFY_RETURN
...
`use` only contains uses prior to definition. This was not
honoured for VERIFY_RETURN with a temporary operand.
The test case only breaks on PHP 7.2.
2017-07-21 23:20:56 +02:00
Bob Weinand
af7bfc71fd
Merge branch 'PHP-7.0' into PHP-7.1
2017-07-01 11:52:41 +02:00
Bob Weinand
e3cc15daf2
Fixed bug #74840 (Opcache overwrites argument of GENERATOR_RETURN within finally)
2017-07-01 11:52:03 +02:00
Nikita Popov
5b5a92b8b6
Fixed bug #74623
2017-06-23 17:32:45 +02:00
Nikita Popov
4948da178a
Make inference robust against infinite loop
...
Right now, if narrowing occurs on non-debug builds, inference can
easily go into an infinite loop. Prevent this, and add a pointer
that this should be reported as a bug.
2017-06-23 17:07:44 +02:00
Dmitry Stogov
316aaca155
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed wrong condition
2017-05-31 00:40:57 +03:00
Dmitry Stogov
77cbf8a657
Fixed wrong condition
2017-05-31 00:40:33 +03:00
Xinchen Hui
0a27a5ba8c
Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
...
* 'PHP-7.1' of git.php.net:/php-src:
Fix loop identification
2017-04-17 20:27:07 +08:00
Xinchen Hui
d6315c2fbb
Fixed bug #74456 (Segmentation error while running a script in CLI mode)
...
Instead of make update_op1_by_const supports FETCH_LIST(CASE), I think
disable it is more safe for 7.1
2017-04-17 20:24:39 +08:00
Nikita Popov
abf16c18c7
Fix loop identification
...
When assigning loop headers, we should treat already detected
loops as collapsed to their loop header, instead of ignoring them.
This fixes the loop header of BB2 in mandel2 if live-range CFG
splitting is enabled.
2017-04-17 12:17:32 +02:00
Nikita Popov
00c6ce0e00
Merge branch 'PHP-7.0' into PHP-7.1
2017-04-15 12:35:53 +02:00
Nikita Popov
0beccc51f1
Fix compact_literals of INIT_METHOD_CALL with CONST op1
2017-04-15 12:35:09 +02:00
Nikita Popov
6c2222796b
Improve fix for bug #74442
...
Make the check less conservative to be consistent with the other
cases.
2017-04-15 01:39:33 +02:00
Nikita Popov
2f22dffd1a
Fixed bug #74442
2017-04-14 22:20:32 +02:00
Nikita Popov
3ffe2cd251
Fixed bug #74431
...
If the last instruction in a block is a NOP, then `new_opline`
here won't be a copy of `opline`, it will be a copy of the last
non-NOP opline. Avoid performing a spurious update by explicitly
checking for NOP.
2017-04-14 22:03:06 +02:00
Nikita Popov
1df3099f2f
Merge branch 'PHP-7.0' into PHP-7.1
2017-04-10 22:11:47 +02:00
Nikita Popov
6f950e83eb
Fix JMPZ+JMP => NOP+JMP optimization
2017-04-10 22:09:34 +02:00
Xinchen Hui
e656455eae
Remove unused var
2017-04-07 15:21:19 +08:00
Nikita Popov
d6f70f0ee3
Disable block pass for large functions
...
(Backport of 7ea261685f to 7.0.)
2017-03-28 22:07:37 +02:00
Nikita Popov
7ea261685f
Disable block pass for large functions
...
This is the last fix for bug #74250 .
2017-03-17 12:49:20 +01:00
Sebastian Bergmann
ccc35d1903
Fugbix typo
2017-03-16 19:10:07 +01:00
Nikita Popov
052aa466e1
Further optimize worklist management
...
Instead of always popping the first elements, do multiple complete
iterations of the worklist until it is empty.
2017-03-16 18:11:27 +01:00
Nikita Popov
e60515f3b8
Slightly optimize worklist management
...
Avoid scanning the worklist twice on every iteration.
2017-03-16 17:32:27 +01:00
Nikita Popov
f1f68b60f5
Optimize DJ spanning tree back-edge check
...
Instead of walking the DJ spanning tree upwards, record entry and
exit times during the DFS and use these to determine whether CJ
edges are sp-back edges.
2017-03-16 17:26:20 +01:00
Nikita Popov
6633e8492e
Sort blocks in loop identification
...
The previous implementation was doing O(blocks*levels) iterations,
which for a linear-ish domtree is O(blocks^2). Avoid this by sorting
the blocks by decreasing level upfront.
2017-03-16 16:49:36 +01:00
Nikita Popov
9331be7d6a
Use call_map to avoid linear call lookup
2017-03-16 12:33:57 +01:00
Dmitry Stogov
d9231b1667
Fixed pointer allignment
2017-03-07 10:18:34 +03:00