]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.3' into PHP-7.4
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 1 Apr 2020 12:21:59 +0000 (14:21 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 1 Apr 2020 12:22:27 +0000 (14:22 +0200)
* PHP-7.3:
  Fix literal compaction collision between string and double

1  2 
ext/opcache/Optimizer/compact_literals.c

index f754dbaa448eb42b1527c50741481cd70143486d,e4dab13b9c26f4a1b38cdc4adfa42293f70549f6..1db8116596e7c002afa59a99a9d9f1d16cb6f2cc
@@@ -396,7 -418,7 +398,7 @@@ void zend_optimizer_compact_literals(ze
                                        } else {
                                                map[i] = j;
                                                ZVAL_LONG(&zv, j);
-                                               zend_hash_str_add(&hash, (char*)&Z_DVAL(op_array->literals[i]), sizeof(double), &zv);
 -                                              zend_hash_str_add(&double_hash, (char*)&Z_DVAL(op_array->literals[i]), sizeof(double), &zv);
++                                              zend_hash_str_add_new(&double_hash, (char*)&Z_DVAL(op_array->literals[i]), sizeof(double), &zv);
                                                if (i != j) {
                                                        op_array->literals[j] = op_array->literals[i];
                                                        info[j] = info[i];