. Refactored the fix for bug #66084 (simplexml_load_string() mangles empty
node name). (Christoph Michael Becker)
+- SPL:
+ . Fixed bug #69737 (Segfault when SplMinHeap::compare produces fatal error).
+ (Stas)
+
14 May 2015, PHP 5.5.25
- Core:
heap->ctor(elem TSRMLS_CC);
/* sifting up */
- 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 TSRMLS_CC) < 0; i = (i-1)/2) {
heap->elements[i] = heap->elements[(i-1)/2];
}
+ heap->count++;
if (EG(exception)) {
/* exception thrown during comparison */
--- /dev/null
+--TEST--
+Bug #69737 (Segfault when SplMinHeap::compare produces fatal error)
+--FILE--
+<?php
+class SplMinHeap1 extends SplMinHeap {
+ public function compare($a, $b) {
+ return -parent::notexist($a, $b);
+ }
+}
+$h = new SplMinHeap1();
+$h->insert(1);
+$h->insert(6);
+?>
+===DONE===
+--EXPECTF--
+Fatal error: Call to undefined method SplMinHeap::notexist() in %s/bug69737.php on line %d