com php-src: Merge branch 'PHP-5.6': ext/spl/spl_heap.c
| From: | Stanislav Malyshev | Date: | Tue, 02 Jun 2015 05:55:16 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.6': ext/spl/spl_heap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-87042@lists.php.net to get a copy of this message | ||
Commit: 75d16a4564d4bdb2991094d06b0529c47bd30ac3
Author: Stanislav Malyshev <stas@php.net> Mon, 1 Jun 2015 22:55:16 -0700
Parents: ce862a25d52850d93e16f784c1953f9a4c50fadc e96c64ed5e0786c067259ad8728ded0085762632
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=75d16a4564d4bdb2991094d06b0529c47bd30ac3
Log:
Merge branch 'PHP-5.6'
* PHP-5.6:
Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error
Conflicts:
ext/spl/spl_heap.c
Bugs:
https://bugs.php.net/69737
Changed paths:
MM ext/spl/spl_heap.c
Diff:
diff --cc ext/spl/spl_heap.c
index a92707b,3ff503a..c485766
--- a/ext/spl/spl_heap.c
+++ b/ext/spl/spl_heap.c
@@@ -248,10 -246,13 +248,11 @@@ static void spl_ptr_heap_insert(spl_ptr
heap->max_size *= 2;
}
- heap->ctor(elem TSRMLS_CC);
-
/* sifting up */
- for (i = heap->count++; i > 0 && heap->cmp(&heap->elements[(i-1)/2],
elem, cmp_userdata) < 0; i = (i-1)/2) {
- for(i = heap->count; i > 0 && heap->cmp(heap->elements[(i-1)/2], elem,
cmp_userdata TSRMLS_CC) < 0; i = (i-1)/2) {
++ for (i = heap->count; i > 0 && heap->cmp(&heap->elements[(i-1)/2], elem,
cmp_userdata) < 0; i = (i-1)/2) {
heap->elements[i] = heap->elements[(i-1)/2];
}
+ heap->count++;
if (EG(exception)) {
/* exception thrown during comparison */