Skip to content

merge #2

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 107 commits into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
a07c1f5
Fix infinite loop on string offset during by-ref list assign
nikic Sep 2, 2020
605ee9c
Merge branch 'PHP-7.3' into PHP-7.4
nikic Sep 2, 2020
aedc7b0
Merge branch 'PHP-7.4'
nikic Sep 2, 2020
8b6b2bd
Fix by-ref list assign LIST_W+MAKE_REF separation
nikic Sep 2, 2020
c98e174
Minimal JIT support for JMP_NULL
dstogov Sep 2, 2020
2e9e706
Fix throwing of yield from related exceptions into generator
nikic Sep 2, 2020
c6fd37c
Merge branch 'PHP-7.3' into PHP-7.4
nikic Sep 2, 2020
ddc2a2d
Merge branch 'PHP-7.4'
nikic Sep 2, 2020
3e800e9
Move custom type checks to ZPP
kocsismate Aug 24, 2020
225cd9d
Improved JIT for VERIFY_RETURN_TYPE
dstogov Sep 2, 2020
4d97ab2
Added missing helper
dstogov Sep 2, 2020
cb284f6
Fix typo in test description
mvorisek Sep 2, 2020
c3299d7
X86: Fast CRC32 computation using PCLMULQDQ instruction
frankdjx Sep 2, 2020
0d157cf
Micro-optimization
dstogov Sep 2, 2020
54dbd3e
Fix binary-safety of parse_url
nikic Sep 2, 2020
81811db
Merge branch 'PHP-7.3' into PHP-7.4
nikic Sep 2, 2020
0bc2657
Merge branch 'PHP-7.4'
nikic Sep 2, 2020
05cd31e
Extend function blacklist in execute fuzzer
nikic Sep 2, 2020
3d1e7d3
hash: Fix warning in the bench script
weltling Sep 2, 2020
1d84a58
libmagic: Move the allocation on the stack
weltling Sep 2, 2020
8c31001
libmagic: Constify arg
weltling Sep 2, 2020
f3f5719
JIT for FE_FETCH_R
dstogov Sep 2, 2020
f2b4077
Revert "libmagic: Move the allocation on the stack"
weltling Sep 2, 2020
8b37c1e
Change Attribute Syntax from @@ to #[]
beberlei Aug 15, 2020
842be67
Update NEWS, UPGRADING
beberlei Sep 2, 2020
73dcfb6
Fix typos in mbstring tests
alexdowad Jul 30, 2020
e64c386
libmagic: Update patch
weltling Sep 2, 2020
508f828
Reorder switch cases for consistency between zend_jit() and zend_jit_…
dstogov Sep 2, 2020
91edb90
JIT for FETCH_CONSTANT
dstogov Sep 2, 2020
573ad18
Handle memory limit error during string reallocation correctly
nikic Sep 3, 2020
6b521a9
Fixed support for deprecated constants (Zend/tests/const_deprecation.…
dstogov Sep 3, 2020
0fc65ed
Merge branch 'PHP-7.3' into PHP-7.4
nikic Sep 3, 2020
daf222c
Merge branch 'PHP-7.4'
nikic Sep 3, 2020
3b853c9
Fixed bug #80045
nikic Sep 3, 2020
c70a938
Skip test if A: drive exists
cmb69 Sep 3, 2020
658ad4d
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Sep 3, 2020
7769ae1
Merge branch 'PHP-7.4' into master
cmb69 Sep 3, 2020
67e9b3b
JIT for FE_FETCH_R
dstogov Sep 3, 2020
04e77d2
Fixed bug #80046
nikic Sep 3, 2020
ce74ff2
Merge branch 'PHP-7.4'
nikic Sep 3, 2020
8516434
Fixed bug #80046
nikic Sep 3, 2020
397a692
Merge branch 'PHP-7.4'
nikic Sep 3, 2020
c4016ec
Remove CG(filenames_table)
nikic Sep 3, 2020
7620ea1
Don't intern compiled_filename
nikic Sep 3, 2020
9464576
Fix leaks in sapi tests
nikic Sep 3, 2020
7b3ac29
Fix mismatch between macro and struct definition
Girgias Sep 3, 2020
430b3ac
Refactor parts of SPL Dir/SplFileObject
Girgias Sep 3, 2020
94fd52d
Add Z_PARAM_ITERABLE and co
morrisonlevi Sep 3, 2020
42a6ff4
Try to fix windows build
nikic Sep 3, 2020
5fdabeb
Fix Windows build
cmb69 Sep 3, 2020
1848ccd
Fix #80048: Bug #69100 has not been fixed for Windows
cmb69 Sep 3, 2020
2f4a2a9
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Sep 3, 2020
c7cba01
Merge branch 'PHP-7.4' into master
cmb69 Sep 3, 2020
409aa20
Refactor mbfl_convert.c
alexdowad Jul 15, 2020
dcd6c60
Remove unneeded function mbfl_filt_conv_common_dtor
alexdowad Jul 16, 2020
a2b40ee
Remove unneeded function mbfl_filt_ident_common_dtor
alexdowad Jul 16, 2020
f699d65
Add comment to mbfilter_tl_jisx0201_jisx0208.h
alexdowad Jul 17, 2020
ec60991
Remove unused 'from' field from mbfl_buffer_converter struct
alexdowad Jul 28, 2020
a81061d
Use symbolic constants in Japanese kana conversion code (not magic nu…
alexdowad Aug 7, 2020
9dc9534
If we don't know the return address, just escape to VM, instead of ad…
dstogov Sep 3, 2020
46a49be
Fixed bug #80049
nikic Sep 3, 2020
2dabc4c
Merge branch 'PHP-7.3' into PHP-7.4
nikic Sep 3, 2020
cd1c36f
Merge branch 'PHP-7.4'
nikic Sep 3, 2020
4a438b4
Warning to Error promotion in ext/standard
Girgias Sep 3, 2020
61c299f
Error promotions in SPL
Girgias Sep 3, 2020
c58c4be
Reorder DynAsm macros (no other changes)
dstogov Sep 3, 2020
531d17f
Load EX(opline) in one instuction if possible
dstogov Sep 3, 2020
3f4a500
Cleanup macro/function names
dstogov Sep 3, 2020
56a9eed
Avoid unnecessary IP initiliaization on trace linking
dstogov Sep 4, 2020
e8d36ce
Avoid duplicate octal warning during heredoc scan ahead
nikic Sep 4, 2020
e0a14bc
Merge branch 'PHP-7.3' into PHP-7.4
nikic Sep 4, 2020
2f95af9
Disable InfiniteIterator class while fuzzing
nikic Sep 4, 2020
fc8cfb1
Merge branch 'PHP-7.4'
nikic Sep 4, 2020
67e1f23
Make gethostbyname() test more liberal
nikic Sep 4, 2020
c0d6b05
Update travis to bionic
nikic Sep 4, 2020
2e21818
Release call trampolines in zpp fcc
nikic Sep 4, 2020
7805b97
Extract common flock code
Girgias Sep 3, 2020
e50cb32
Add the Z_PARAM_ARRAY_HT_OR_NULL and Z_PARAM_OBJ macros
kocsismate Sep 4, 2020
e50449b
Use the canonical order of types in array|string ZPP error messages
kocsismate Sep 4, 2020
8107a1d
Use ZPP instead of custom type checks
kocsismate Sep 4, 2020
36cdbd0
Promote warnings to exceptions in ext/ldap
kocsismate Sep 3, 2020
2ee2335
Fixed bug #80057 (DateTimeImmutable::createFromFormat() does not popu…
derickr Sep 4, 2020
edc8dec
Reenable s390x on travis
nikic Sep 4, 2020
d57f9e5
Handle null encoding in mb_http_input()
nikic Sep 4, 2020
4ebc04c
Fix azure i386 build
nikic Sep 5, 2020
aa613f8
Merge branch 'PHP-7.4'
nikic Sep 5, 2020
9439ca5
Improve handling of `#[` in `php -a`
TysonAndre Sep 5, 2020
1fc961e
Improve handling of `#[` attributes in `php -a`
TysonAndre Sep 6, 2020
ace876c
Fix incorrect/unused macro
TysonAndre Sep 6, 2020
623bf96
Throw on invalid mb_http_input() type
nikic Sep 7, 2020
e0c9467
Add phpunit to community project tests
nikic Sep 4, 2020
8e05c44
Opcache JIT, code simplification for Haiku.
devnexen Sep 5, 2020
d1ac7e3
Remove some unnecessary HAVE_EXTNAME guards
nikic Sep 7, 2020
85b5dc4
Private/public split curl header
nikic Sep 7, 2020
f5dbebd
Accept zend_string instead of zval in zend_compile_string
nikic Sep 7, 2020
9475bcb
Avoid large eval inputs in fuzzer
nikic Sep 7, 2020
f4b2497
Allocate temporary PCRE match data using ZMM
nikic Sep 7, 2020
032f862
Drop support for crypt() without explicit salt
nikic Sep 7, 2020
2a334f1
Don't leave behind temporary file in bug70362.phpt
nikic Sep 7, 2020
a249980
Merge branch 'PHP-7.4'
nikic Sep 7, 2020
2c96780
Fix UNKNOWN default values in ext/standard
kocsismate Aug 20, 2020
628db3f
Fix UNKNOWN default values in various extensions
kocsismate Sep 4, 2020
174dadf
Don't allow dynamic properties on generators
nikic Sep 7, 2020
fd0b399
Promote warnings to exceptions in ext/intl
kocsismate Aug 10, 2020
4a2ae84
Add "const". Move constant strings to read-only memory.
dstogov Sep 7, 2020
af0ba0b
Reduce input size limit in execute fuzzer
nikic Sep 7, 2020
8a49310
Adjust assignment line number for match
iluuu1994 Sep 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Zend/tests/bug80046.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--TEST--
Bug #80046: FREE for SWITCH_STRING optimized away
--FILE--
<?php

function test($foo) {
switch ($foo . 'Bar') {
case 'A':
throw new Exception('A');
default:
throw new Exception('Default');
}
}
try {
test('Foo');
} catch (Exception $e) {
echo $e->getMessage(), "\n";
}

?>
--EXPECT--
Default
14 changes: 11 additions & 3 deletions ext/opcache/Optimizer/block_pass.c
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,15 @@ static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array, zend_op
if (b->len == 0) {
continue;
}
if (b->flags & ZEND_BB_REACHABLE) {
if (b->flags & (ZEND_BB_REACHABLE|ZEND_BB_UNREACHABLE_FREE)) {
if (b->flags & ZEND_BB_UNREACHABLE_FREE) {
/* Only keep the FREE for the loop var */
ZEND_ASSERT(op_array->opcodes[b->start].opcode == ZEND_FREE
|| op_array->opcodes[b->start].opcode == ZEND_FE_FREE);
len += b->len = 1;
continue;
}

opline = op_array->opcodes + b->start + b->len - 1;
if (opline->opcode == ZEND_JMP) {
zend_basic_block *next = b + 1;
Expand Down Expand Up @@ -1005,7 +1013,7 @@ static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array, zend_op

/* Copy code of reachable blocks into a single buffer */
for (b = blocks; b < end; b++) {
if (b->flags & ZEND_BB_REACHABLE) {
if (b->flags & (ZEND_BB_REACHABLE|ZEND_BB_UNREACHABLE_FREE)) {
memcpy(opline, op_array->opcodes + b->start, b->len * sizeof(zend_op));
b->start = opline - new_opcodes;
opline += b->len;
Expand Down Expand Up @@ -1131,7 +1139,7 @@ static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array, zend_op
/* rebuild map (just for printing) */
memset(cfg->map, -1, sizeof(int) * op_array->last);
for (n = 0; n < cfg->blocks_count; n++) {
if (cfg->blocks[n].flags & ZEND_BB_REACHABLE) {
if (cfg->blocks[n].flags & (ZEND_BB_REACHABLE|ZEND_BB_UNREACHABLE_FREE)) {
cfg->map[cfg->blocks[n].start] = n;
}
}
Expand Down
3 changes: 1 addition & 2 deletions ext/opcache/Optimizer/zend_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,8 @@ int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t b
}

/* Build CFG, Step 4, Mark Reachable Basic Blocks */
zend_mark_reachable_blocks(op_array, cfg, 0);

cfg->flags |= flags;
zend_mark_reachable_blocks(op_array, cfg, 0);

return SUCCESS;
}
Expand Down