Skip to content

Instantly share code, notes, and snippets.

View nielsdos's full-sized avatar

Niels Dossche nielsdos

  • Belgium
View GitHub Profile
diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c
index b036beca7ac..4adcac42641 100644
--- a/sapi/phpdbg/phpdbg_watch.c
+++ b/sapi/phpdbg/phpdbg_watch.c
@@ -141,10 +141,24 @@ bool phpdbg_check_watch_diff(phpdbg_watchtype type, void *oldPtr, void *newPtr)
if (memcmp(&((Bucket *) oldPtr)->h, &((Bucket *) newPtr)->h, sizeof(Bucket) - sizeof(zval) /* key/val comparison */) != 0) {
return 2;
}
- /* TODO: Is this intentional? */
ZEND_FALLTHROUGH;
==558700== Conditional jump or move depends on uninitialised value(s)
==558700== at 0x484F3BE: bcmp (vg_replace_strmem.c:1233)
==558700== by 0xA1C185: phpdbg_check_watch_diff (phpdbg_watch.c:141)
==558700== by 0xA1F4EA: phpdbg_check_watchpoint (phpdbg_watch.c:1062)
==558700== by 0xA1FBE4: phpdbg_print_changed_zvals (phpdbg_watch.c:1177)
==558700== by 0xA06C32: phpdbg_execute_ex (phpdbg_prompt.c:1781)
==558700== by 0x95EF56: zend_execute (zend_vm_execute.h:63019)
==558700== by 0xA03F00: phpdbg_do_run (phpdbg_prompt.c:884)
==558700== by 0xA193E7: phpdbg_internal_stack_execute (phpdbg_cmd.c:702)
==558700== by 0xA194C1: phpdbg_stack_execute (phpdbg_cmd.c:732)
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c
index 5148668d945..e670ebeeb6e 100644
--- a/Zend/zend_interfaces.c
+++ b/Zend/zend_interfaces.c
@@ -493,6 +493,15 @@ static zend_object *zend_internal_iterator_create(zend_class_entry *ce) {
return &intern->std;
}
+static zend_object *zend_internal_iterator_clone(zend_object *original_object) {
+ zend_internal_iterator *original_iterator = (zend_internal_iterator *) original_object;
diff --git a/main/streams/cast.c b/main/streams/cast.c
index 238212c745..e9b5152f97 100644
--- a/main/streams/cast.c
+++ b/main/streams/cast.c
@@ -46,7 +46,11 @@ typedef struct {
FILE *fopencookie(void *cookie, const char *mode, cookie_io_functions_t *funcs)
{
- return funopen(cookie, funcs->reader, funcs->writer, funcs->seeker, funcs->closer);
+ FILE *file = funopen(cookie, funcs->reader, funcs->writer, funcs->seeker, funcs->closer);
diff --git a/main/streams/cast.c b/main/streams/cast.c
index 238212c745..b93db2f6d3 100644
--- a/main/streams/cast.c
+++ b/main/streams/cast.c
@@ -61,8 +61,12 @@ FILE *fopencookie(void *cookie, const char *mode, cookie_io_functions_t *funcs)
static int stream_cookie_reader(void *cookie, char *buffer, int size)
{
int ret;
-
- ret = php_stream_read((php_stream*)cookie, buffer, size);
--TEST--
Test CURL_READFUNC_PAUSE and curl_pause()
--EXTENSIONS--
curl
--FILE--
<?php
include 'server.inc';
$host = curl_cli_server_start();
class CrashingFifo {
diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c
index 7ba9abd193..c779f0351e 100644
--- a/ext/zend_test/test.c
+++ b/ext/zend_test/test.c
@@ -1057,26 +1057,14 @@ static ZEND_METHOD(_ZendTestClass, returnByRefIntProp)
ZEND_ASSERT(int_prop);
ZEND_ASSERT(!Z_ISERROR_P(int_prop));
- /* Copied from zend_assign_to_variable_reference() */
- zend_reference *ref;
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c
index 838a237ca8..9987f871a7 100644
--- a/main/streams/xp_socket.c
+++ b/main/streams/xp_socket.c
@@ -564,18 +564,23 @@ static inline int parse_unix_address(php_stream_xport_param *xparam, struct sock
memset(unix_addr, 0, sizeof(*unix_addr));
unix_addr->sun_family = AF_UNIX;
+ /* Abstract namespace does not need to be NUL-terminated, while path-based
+ * sockets should be. */
diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c
index 560338e71f3..8b0b58105d3 100644
--- a/ext/ffi/ffi.c
+++ b/ext/ffi/ffi.c
@@ -3544,7 +3544,7 @@ ZEND_METHOD(FFI, scope) /* {{{ */
}
/* }}} */
-static void zend_ffi_cleanup_dcl(zend_ffi_dcl *dcl) /* {{{ */
+void zend_ffi_cleanup_dcl(zend_ffi_dcl *dcl) /* {{{ */
.file "doaddsub.c"
.text
.Ltext0:
.file 0 "/run/media/niels/MoreData/php-src-multitasking" "/run/media/niels/MoreData/php-src-multitasking/ext/bcmath/libbcmath/src/doaddsub.c"
.p2align 4
.globl _bc_do_add
.hidden _bc_do_add
.type _bc_do_add, @function
_bc_do_add:
.LVL0: