]> granicus.if.org Git - php/log
php
8 years agoMerge branch 'PHP-7.1'
Anatol Belski [Wed, 3 Aug 2016 10:20:52 +0000 (12:20 +0200)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  fix ts build

8 years agoMerge branch 'PHP-7.0' into PHP-7.1
Anatol Belski [Wed, 3 Aug 2016 10:20:23 +0000 (12:20 +0200)]
Merge branch 'PHP-7.0' into PHP-7.1

* PHP-7.0:
  fix ts build

8 years agoMerge branch 'PHP-5.6' into PHP-7.0
Anatol Belski [Wed, 3 Aug 2016 10:19:29 +0000 (12:19 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0

* PHP-5.6:
  fix ts build

8 years agofix ts build
Anatol Belski [Wed, 3 Aug 2016 10:16:42 +0000 (12:16 +0200)]
fix ts build

8 years agoMerge branch 'master' of git.php.net:php-src
Kalle Sommer Nielsen [Wed, 3 Aug 2016 09:59:58 +0000 (11:59 +0200)]
Merge branch 'master' of git.php.net:php-src

8 years agoFixed Redhat bug #1362571 (PHP not returning full results for exif_read_data function)
Kalle Sommer Nielsen [Wed, 3 Aug 2016 09:59:30 +0000 (11:59 +0200)]
Fixed Redhat bug #1362571 (PHP not returning full results for exif_read_data function)

There are two factors for this bug fix:
 - First of all, the maximum nesting level has been increased to 150 (previously 100), I'm not sure how much an impact this will have, but increasing this value also seems to resolve PHP bug #66443 (Corrupt EXIF header: maximum directory nesting level reached for some cameras.)
  - Second, this adds support for most common Panasonic EXIF tags, again this list is based off the Exiv2 website

Note about Panasonic's format:
From what I could find, then the offset was always 12 bytes for such, the signature always had the 'P' capitalized, and the rest lower cased, followed by 3 NULL bytes

@Remi, can you review this? I'm gonna look into Sony (which is huge btw!) and your patch next

8 years agoMerge branch 'PHP-7.1'
Remi Collet [Wed, 3 Aug 2016 09:03:35 +0000 (11:03 +0200)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  add skipif (needs json)

8 years agoadd skipif (needs json)
Remi Collet [Wed, 3 Aug 2016 09:03:22 +0000 (11:03 +0200)]
add skipif (needs json)

8 years agoNEWS
Kalle Sommer Nielsen [Wed, 3 Aug 2016 08:05:33 +0000 (10:05 +0200)]
NEWS

8 years agoMerge branch 'master' of git.php.net:php-src
Kalle Sommer Nielsen [Wed, 3 Aug 2016 08:02:54 +0000 (10:02 +0200)]
Merge branch 'master' of git.php.net:php-src

8 years agoFixed bug #72735 (Samsung picture thumb not read (zero size))
Kalle Sommer Nielsen [Wed, 3 Aug 2016 08:02:22 +0000 (10:02 +0200)]
Fixed bug #72735 (Samsung picture thumb not read (zero size))

It seems like there is no maker data for "Samsung", this causes the IDF tag parsing to fail, and it bails early on, despite there still is valid remaining data in image, such as the thumbnail data as reported in the bug.

I used the Exiv2 website as a reference guide for tags that's specific to Samsung's EXIF data, which should also mean that we will be able to name some of those tags more specifically now.

I have chosen again not to commit this to other branches, simply because I'm not 100% sure on the byte order and offsets for Samsung, I did some research and it seems like there are many variants, but this (very copy/pasted), entry works for this particular image and does not break any other tests. This does add a new feature I suppose, while also fixing a bug, but I will leave it to the other branch RMs to decide on how far down they will want to merge this.

8 years agoMerge branch 'PHP-7.1'
Xinchen Hui [Wed, 3 Aug 2016 04:37:42 +0000 (12:37 +0800)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  It's packed array

8 years agoIt's packed array
Xinchen Hui [Wed, 3 Aug 2016 04:37:14 +0000 (12:37 +0800)]
It's packed array

8 years agoMerge branch 'master' of git.php.net:/php-src
Xinchen Hui [Wed, 3 Aug 2016 04:17:35 +0000 (12:17 +0800)]
Merge branch 'master' of git.php.net:/php-src

* 'master' of git.php.net:/php-src:
  Fixed compiler warning (Sorry Anatol, but this one was killing me)
  Revert "Fixed bug #72735 (Samsung picture thumb not read (zero size))"
  Fixed bug #72735 (Samsung picture thumb not read (zero size))
  Minor touches to the exif build script on Windows; ADD_EXTENSION_DEP() will already ERROR() out, so the WARNING() statement would never be returned anyway.

8 years agoFixed compiler warning (Sorry Anatol, but this one was killing me)
Kalle Sommer Nielsen [Wed, 3 Aug 2016 04:16:48 +0000 (06:16 +0200)]
Fixed compiler warning (Sorry Anatol, but this one was killing me)

8 years agoRevert "Fixed bug #72735 (Samsung picture thumb not read (zero size))"
Kalle Sommer Nielsen [Wed, 3 Aug 2016 04:10:56 +0000 (06:10 +0200)]
Revert "Fixed bug #72735 (Samsung picture thumb not read (zero size))"

This reverts commit 406dff2a02ff1cfac89942ce5e991d88d3b6cb50.

This seems to break more than expected and other tests seems to fail:
 - bug60150.phpt
 - bug62523_2.phpt
 - bug72603.phpt
 - bug72618.phpt

I'm gonna go do around of thinking and see if I can come up with a better fix

8 years agoMerge branch 'PHP-7.1'
Xinchen Hui [Wed, 3 Aug 2016 04:06:38 +0000 (12:06 +0800)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  Optmized array_rand
  Optimized array_pad
  Update NEWS for 7.1.0beta3

8 years agoOptmized array_rand
Xinchen Hui [Wed, 3 Aug 2016 04:06:04 +0000 (12:06 +0800)]
Optmized array_rand

8 years agoFixed bug #72735 (Samsung picture thumb not read (zero size))
Kalle Sommer Nielsen [Wed, 3 Aug 2016 03:39:39 +0000 (05:39 +0200)]
Fixed bug #72735 (Samsung picture thumb not read (zero size))

This fix is only committed to master for now. I'm no exif expert on this matter, so someone else might want to take a look over this and merge as wanted in case this will break something.

In exif_process_IFD_in_JPEG() we loop over the tag entries and try to process the IFD tag, this is fine and all, however in case one fail to process correctly, the entire routine is aborted, which means that other possible data, such as the thumbnail data as reported in #72735 may not be read, despite it is there, perfectly valid.

Also, big props to whoever added EXIF_DEBUG, this rocks!

8 years agoOptimized array_pad
Xinchen Hui [Wed, 3 Aug 2016 03:24:31 +0000 (11:24 +0800)]
Optimized array_pad

8 years agoMinor touches to the exif build script on Windows; ADD_EXTENSION_DEP() will already...
Kalle Sommer Nielsen [Wed, 3 Aug 2016 02:24:17 +0000 (04:24 +0200)]
Minor touches to the exif build script on Windows; ADD_EXTENSION_DEP() will already ERROR() out, so the WARNING() statement would never be returned anyway.

There are probably other similar cases around ext/, however the main reason for fixing this was for the typo (libxml > mbstring).

8 years agoUpdate NEWS for 7.1.0beta3
Davey Shafik [Tue, 2 Aug 2016 23:40:07 +0000 (16:40 -0700)]
Update NEWS for 7.1.0beta3

8 years agoMerge branch 'PHP-7.1'
Nikita Popov [Tue, 2 Aug 2016 22:35:16 +0000 (00:35 +0200)]
Merge branch 'PHP-7.1'

8 years agoMerge branch 'PHP-7.0' into PHP-7.1
Nikita Popov [Tue, 2 Aug 2016 22:35:00 +0000 (00:35 +0200)]
Merge branch 'PHP-7.0' into PHP-7.1

8 years agoFix bug #72724
Nikita Popov [Tue, 2 Aug 2016 22:33:32 +0000 (00:33 +0200)]
Fix bug #72724

8 years agoMerge branch 'PHP-7.1'
Christoph M. Becker [Tue, 2 Aug 2016 16:59:48 +0000 (18:59 +0200)]
Merge branch 'PHP-7.1'

8 years agoMerge branch 'PHP-7.0' into PHP-7.1
Christoph M. Becker [Tue, 2 Aug 2016 16:53:54 +0000 (18:53 +0200)]
Merge branch 'PHP-7.0' into PHP-7.1

8 years agoMerge branch 'PHP-5.6' into PHP-7.0
Christoph M. Becker [Tue, 2 Aug 2016 16:47:36 +0000 (18:47 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0

8 years agoFix #72709: imagesetstyle() causes OOB read for empty $styles
Christoph M. Becker [Tue, 2 Aug 2016 16:41:20 +0000 (18:41 +0200)]
Fix #72709: imagesetstyle() causes OOB read for empty $styles

Calling imagesetstyle() with an empty $styles array caused gdImageSetStyle()
to be called with `noOfPixels==0`, what could have lead to OOB reads.
Actually, this issue will be fixed in libgd, but to avoid issues when older
libgd is in use, we simply disallow passing an empty $styles array to
imagesetstyle(), what wouldn't serve a useful purpose anyway.

8 years agoMerge branch 'PHP-7.1'
Anatol Belski [Tue, 2 Aug 2016 12:43:44 +0000 (14:43 +0200)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  update NEWS
  cleanup table after test
  - lastInsertId using Postgres Lastval() function

8 years agoMerge branch 'PHP-7.0' into PHP-7.1
Anatol Belski [Tue, 2 Aug 2016 12:42:55 +0000 (14:42 +0200)]
Merge branch 'PHP-7.0' into PHP-7.1

* PHP-7.0:
  update NEWS
  cleanup table after test
  - lastInsertId using Postgres Lastval() function

8 years agoMerge branch 'PHP-5.6' into PHP-7.0
Anatol Belski [Tue, 2 Aug 2016 12:40:31 +0000 (14:40 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0

* PHP-5.6:
  update NEWS
  cleanup table after test
  - lastInsertId using Postgres Lastval() function

8 years agoupdate NEWS
Anatol Belski [Tue, 2 Aug 2016 12:36:56 +0000 (14:36 +0200)]
update NEWS

8 years agocleanup table after test
Anatol Belski [Tue, 2 Aug 2016 12:35:24 +0000 (14:35 +0200)]
cleanup table after test

8 years ago- lastInsertId using Postgres Lastval() function
Pablo Santiago Sánchez [Thu, 28 Jul 2016 01:12:56 +0000 (22:12 -0300)]
- lastInsertId using Postgres Lastval() function

8 years agoMerge branch 'PHP-7.1'
Xinchen Hui [Tue, 2 Aug 2016 12:29:05 +0000 (20:29 +0800)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  Fixed warning: "operation on ‘s’ may be undefined"

8 years agoFixed warning: "operation on ‘s’ may be undefined"
Xinchen Hui [Tue, 2 Aug 2016 12:28:42 +0000 (20:28 +0800)]
Fixed warning: "operation on ‘s’ may be undefined"

8 years agoMerge branch 'PHP-7.1'
Xinchen Hui [Tue, 2 Aug 2016 12:08:25 +0000 (20:08 +0800)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  Folder marks

8 years agoFolder marks
Xinchen Hui [Tue, 2 Aug 2016 12:08:15 +0000 (20:08 +0800)]
Folder marks

8 years agoMerge branch 'PHP-7.1'
Xinchen Hui [Tue, 2 Aug 2016 12:02:49 +0000 (20:02 +0800)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  Optimized array_merge and cleanup

8 years agoOptimized array_merge and cleanup
Xinchen Hui [Tue, 2 Aug 2016 12:02:23 +0000 (20:02 +0800)]
Optimized array_merge and cleanup

8 years agoMerge branch 'master' of git.php.net:/php-src
Xinchen Hui [Tue, 2 Aug 2016 09:45:22 +0000 (17:45 +0800)]
Merge branch 'master' of git.php.net:/php-src

* 'master' of git.php.net:/php-src:
  increase versions for 7.2

8 years agoMerge branch 'PHP-7.1'
Xinchen Hui [Tue, 2 Aug 2016 09:40:47 +0000 (17:40 +0800)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  Optimized array_merge
  prepare next
  fix php_version.h

8 years agoMerge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
Xinchen Hui [Tue, 2 Aug 2016 09:40:37 +0000 (17:40 +0800)]
Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1

* 'PHP-7.1' of git.php.net:/php-src:
  prepare next
  fix php_version.h

8 years agoOptimized array_merge
Xinchen Hui [Tue, 2 Aug 2016 09:39:53 +0000 (17:39 +0800)]
Optimized array_merge

8 years agoMerge branch 'PHP-7.1'
Anatol Belski [Tue, 2 Aug 2016 09:15:28 +0000 (11:15 +0200)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  prepare next

8 years agoMerge branch 'PHP-7.0' into PHP-7.1
Anatol Belski [Tue, 2 Aug 2016 09:15:07 +0000 (11:15 +0200)]
Merge branch 'PHP-7.0' into PHP-7.1

* PHP-7.0:
  prepare next

8 years agoprepare next
Anatol Belski [Tue, 2 Aug 2016 09:13:20 +0000 (11:13 +0200)]
prepare next

8 years agoMerge branch 'PHP-7.1'
Anatol Belski [Tue, 2 Aug 2016 09:08:51 +0000 (11:08 +0200)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  fix php_version.h

8 years agoMerge branch 'PHP-7.0' into PHP-7.1
Anatol Belski [Tue, 2 Aug 2016 09:08:21 +0000 (11:08 +0200)]
Merge branch 'PHP-7.0' into PHP-7.1

* PHP-7.0:
  fix php_version.h

8 years agofix php_version.h
Anatol Belski [Tue, 2 Aug 2016 09:06:33 +0000 (11:06 +0200)]
fix php_version.h

8 years agoincrease versions for 7.2
Anatol Belski [Tue, 2 Aug 2016 09:00:54 +0000 (11:00 +0200)]
increase versions for 7.2

8 years agoMerge branch 'PHP-7.1'
Xinchen Hui [Tue, 2 Aug 2016 04:42:06 +0000 (12:42 +0800)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  Optimized array_column (thanks to Benjamin Coutu)

8 years agoOptimized array_column (thanks to Benjamin Coutu)
Xinchen Hui [Tue, 2 Aug 2016 04:40:46 +0000 (12:40 +0800)]
Optimized array_column (thanks to Benjamin Coutu)

8 years agoMerge branch 'PHP-7.1'
Xinchen Hui [Tue, 2 Aug 2016 03:05:59 +0000 (11:05 +0800)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  fixed IS_REFERENCE handling

8 years agofixed IS_REFERENCE handling
Xinchen Hui [Tue, 2 Aug 2016 03:04:52 +0000 (11:04 +0800)]
fixed IS_REFERENCE handling

8 years agoMerge branch 'PHP-7.1'
Xinchen Hui [Mon, 1 Aug 2016 12:20:27 +0000 (20:20 +0800)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  Make the expression more reasonble (by nikic)

8 years agoMake the expression more reasonble (by nikic)
Xinchen Hui [Mon, 1 Aug 2016 12:20:01 +0000 (20:20 +0800)]
Make the expression more reasonble (by nikic)

8 years agoMerge branch 'PHP-7.1'
Xinchen Hui [Mon, 1 Aug 2016 12:11:28 +0000 (20:11 +0800)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  Optimized array_reverse

8 years agoOptimized array_reverse
Xinchen Hui [Mon, 1 Aug 2016 12:11:08 +0000 (20:11 +0800)]
Optimized array_reverse

8 years agoMerge branch 'PHP-7.1'
Anatol Belski [Sun, 31 Jul 2016 13:02:44 +0000 (15:02 +0200)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  update NEWS
  update NEWS
  Revert "upgraded to PCRE 8.39"

8 years agoupdate NEWS
Anatol Belski [Sun, 31 Jul 2016 13:01:45 +0000 (15:01 +0200)]
update NEWS

8 years agoMerge branch 'PHP-7.0' into PHP-7.1
Anatol Belski [Sun, 31 Jul 2016 13:00:18 +0000 (15:00 +0200)]
Merge branch 'PHP-7.0' into PHP-7.1

* PHP-7.0:
  update NEWS
  Revert "upgraded to PCRE 8.39"

8 years agoupdate NEWS
Anatol Belski [Sun, 31 Jul 2016 12:58:46 +0000 (14:58 +0200)]
update NEWS

8 years agoRevert "upgraded to PCRE 8.39"
Anatol Belski [Sun, 31 Jul 2016 12:55:17 +0000 (14:55 +0200)]
Revert "upgraded to PCRE 8.39"

This reverts commit 2fba6468374a15efc82aaac8cbfc600b29c5404f.

PCRE-8.39 throws weird valgrind backtraces on some systems, see
http://news.php.net/php.cvs/93494 . Those could be false positives
due to some changes in JIT, still i couldn't 100% ensure this.
Thus, better we continue to ship 8.38 bundled for now, and apply
patches, if needed.

8 years agoMerge branch 'PHP-7.1'
Nikita Popov [Sat, 30 Jul 2016 16:36:15 +0000 (18:36 +0200)]
Merge branch 'PHP-7.1'

8 years agoMerge branch 'PHP-7.0' into PHP-7.1
Nikita Popov [Sat, 30 Jul 2016 16:36:09 +0000 (18:36 +0200)]
Merge branch 'PHP-7.0' into PHP-7.1

8 years agoMerge branch 'PHP-5.6' into PHP-7.0
Nikita Popov [Sat, 30 Jul 2016 16:35:41 +0000 (18:35 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0

8 years agoRevert "Fixed bug #71219"
Nikita Popov [Sat, 30 Jul 2016 16:34:34 +0000 (18:34 +0200)]
Revert "Fixed bug #71219"

This reverts commit 14d674442ef86ad4e862228a1ff5ecd322ae7759.

I misread the discussion on the bug -- this is not the correct
fix. However the other proposed fix does not work either, so just
reverting for now.

8 years agoMerge branch 'PHP-7.1'
Nikita Popov [Sat, 30 Jul 2016 16:25:09 +0000 (18:25 +0200)]
Merge branch 'PHP-7.1'

8 years agoMerge branch 'PHP-7.0' into PHP-7.1
Nikita Popov [Sat, 30 Jul 2016 16:24:59 +0000 (18:24 +0200)]
Merge branch 'PHP-7.0' into PHP-7.1

8 years agoMerge branch 'PHP-5.6' into PHP-7.0
Nikita Popov [Sat, 30 Jul 2016 16:22:07 +0000 (18:22 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0

8 years agoFixed bug #71219
Nikita Popov [Sat, 30 Jul 2016 16:21:19 +0000 (18:21 +0200)]
Fixed bug #71219

8 years agoFix opcache build
Kalle Sommer Nielsen [Sat, 30 Jul 2016 15:55:20 +0000 (17:55 +0200)]
Fix opcache build

8 years agoFix ext/standard build with the recent fixes to array.c
Kalle Sommer Nielsen [Sat, 30 Jul 2016 15:52:57 +0000 (17:52 +0200)]
Fix ext/standard build with the recent fixes to array.c

This solution might not be canon, but it works by re-using _php_math_round() from math.c, since round() is not available
in the C++98 Standard Library on Windows at least. At the same
time it seems like the symbol export for it was missing from
php_math.h.

8 years agoAlso fix TSRM on Windows
Kalle Sommer Nielsen [Sat, 30 Jul 2016 15:32:53 +0000 (17:32 +0200)]
Also fix TSRM on Windows

8 years agoFix build on Windows
Kalle Sommer Nielsen [Sat, 30 Jul 2016 15:30:49 +0000 (17:30 +0200)]
Fix build on Windows

8 years agoMerge branch 'PHP-7.1'
Nikita Popov [Sat, 30 Jul 2016 14:29:41 +0000 (16:29 +0200)]
Merge branch 'PHP-7.1'

8 years agoMerge branch 'PHP-7.0' into PHP-7.1
Nikita Popov [Sat, 30 Jul 2016 14:29:33 +0000 (16:29 +0200)]
Merge branch 'PHP-7.0' into PHP-7.1

8 years agoMerge branch 'PHP-5.6' into PHP-7.0
Nikita Popov [Sat, 30 Jul 2016 14:29:10 +0000 (16:29 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0

Conflicts:
ext/wddx/wddx.c

8 years agoAdd missing TSRMLS_FETCH()
Nikita Popov [Sat, 30 Jul 2016 14:28:42 +0000 (16:28 +0200)]
Add missing TSRMLS_FETCH()

8 years agoMerge branch 'PHP-7.1'
Nikita Popov [Sat, 30 Jul 2016 14:08:44 +0000 (16:08 +0200)]
Merge branch 'PHP-7.1'

8 years agoMerge branch 'PHP-7.0' into PHP-7.1
Nikita Popov [Sat, 30 Jul 2016 14:08:30 +0000 (16:08 +0200)]
Merge branch 'PHP-7.0' into PHP-7.1

8 years agoFix incorrect merge
Nikita Popov [Sat, 30 Jul 2016 14:07:54 +0000 (16:07 +0200)]
Fix incorrect merge

Forgot to amend the merge fixes...

8 years agoMerge branch 'PHP-7.1'
Nikita Popov [Sat, 30 Jul 2016 13:55:10 +0000 (15:55 +0200)]
Merge branch 'PHP-7.1'

8 years agoMerge branch 'PHP-7.0' into PHP-7.1
Nikita Popov [Sat, 30 Jul 2016 13:54:20 +0000 (15:54 +0200)]
Merge branch 'PHP-7.0' into PHP-7.1

8 years agoMerge branch 'PHP-5.6' into PHP-7.0
Nikita Popov [Sat, 30 Jul 2016 13:51:23 +0000 (15:51 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0

8 years agoFixed bug #72142
Nikita Popov [Sat, 30 Jul 2016 13:10:54 +0000 (15:10 +0200)]
Fixed bug #72142

8 years agoMerge branch 'PHP-7.1'
Christoph M. Becker [Sat, 30 Jul 2016 10:16:49 +0000 (12:16 +0200)]
Merge branch 'PHP-7.1'

8 years agoMerge branch 'PHP-7.0' into PHP-7.1
Christoph M. Becker [Sat, 30 Jul 2016 10:02:56 +0000 (12:02 +0200)]
Merge branch 'PHP-7.0' into PHP-7.1

8 years agoMerge branch 'PHP-5.6' into PHP-7.0
Christoph M. Becker [Sat, 30 Jul 2016 09:49:19 +0000 (11:49 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0

8 years agofixes bad address given to onig_error_code_to_str
ju1ius [Sat, 30 Jul 2016 04:08:25 +0000 (06:08 +0200)]
fixes bad address given to onig_error_code_to_str

Closes bug #72710

(cherry picked from commit 0fb7eb6723bcc6fd98053911543e801edb5ab763)

8 years agoMerge branch 'PHP-7.1'
Nikita Popov [Fri, 29 Jul 2016 22:38:10 +0000 (00:38 +0200)]
Merge branch 'PHP-7.1'

8 years agoFix invalid free on undef const in update_const()
Nikita Popov [Fri, 29 Jul 2016 22:36:06 +0000 (00:36 +0200)]
Fix invalid free on undef const in update_const()

Also clean up the control flow a bit -- move all unqualified
constant handling in one branch.

8 years agoMerge branch 'PHP-7.1'
Nikita Popov [Fri, 29 Jul 2016 22:15:50 +0000 (00:15 +0200)]
Merge branch 'PHP-7.1'

8 years agoFix memory unsafety in array_walk()
Nikita Popov [Fri, 29 Jul 2016 16:51:06 +0000 (18:51 +0200)]
Fix memory unsafety in array_walk()

Fixes bugs #61967, #62607, #69068, #70713.

The primary changes are:
a) Use the ht_iterator mechanism to ensure safety not only if the
   iterated array itself changes, but also if it is replaced (and
   potentially destroyed) entirely. We use the same semantics for
   behavior under modification as foreach-by-reference. In
   particular, we advance to the next element before processing it.
   If the iterated entity is exchanged we iterate the new one from
   the start. If it is not an array/object we warn and abort.
b) Always create a reference to the current value. Previously the
   code kept the value as a non-reference and updated it to the
   reference value produced by the user callback. However this is
   unsafe, as the array may have been reallocated in the meantime,
   so the previous value pointer is no longer value.
c) Around a recursive walk, incref the reference containing the
   array. This ensures that the location where the currently
   iterated value is stored cannot be freed.

One problem I was not able to solve is that we cannot decrement
the apply count if the array is exchanged during a recursive walk.

8 years agoMerge branch 'PHP-7.1'
Nikita Popov [Fri, 29 Jul 2016 17:08:23 +0000 (19:08 +0200)]
Merge branch 'PHP-7.1'

8 years agoMerge branch 'PHP-7.0' into PHP-7.1
Nikita Popov [Fri, 29 Jul 2016 17:08:15 +0000 (19:08 +0200)]
Merge branch 'PHP-7.0' into PHP-7.1

8 years agoFix ref handling in array_merge/replace_recursive()
Nikita Popov [Fri, 29 Jul 2016 17:07:04 +0000 (19:07 +0200)]
Fix ref handling in array_merge/replace_recursive()

As usual, if the reference has rc=1 it really isn't a reference.

8 years agoMerge branch 'PHP-7.1'
Anatol Belski [Fri, 29 Jul 2016 15:34:20 +0000 (17:34 +0200)]
Merge branch 'PHP-7.1'

* PHP-7.1:
  update NEWS
  add test for bug #72701