summaryrefslogtreecommitdiffstats
path: root/pthreads-upstream.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-12-02 10:15:06 +0100
committerRemi Collet <fedora@famillecollet.com>2015-12-02 10:15:06 +0100
commit365913a04302f6fb65bc6ebe02058573c1d81f3e (patch)
tree536427427d64dfe2093c75d9a9f2cdf7526609fd /pthreads-upstream.patch
parente68a2007bc300b9152f40519d48b8c0dfe3cc187 (diff)
add upstream patch for i386
Diffstat (limited to 'pthreads-upstream.patch')
-rw-r--r--pthreads-upstream.patch137
1 files changed, 137 insertions, 0 deletions
diff --git a/pthreads-upstream.patch b/pthreads-upstream.patch
new file mode 100644
index 0000000..74826fb
--- /dev/null
+++ b/pthreads-upstream.patch
@@ -0,0 +1,137 @@
+From 703e8968a30b11fa87161f69058b13bdfc3eebbb Mon Sep 17 00:00:00 2001
+From: Joe Watkins <krakjoe@php.net>
+Date: Wed, 2 Dec 2015 08:21:32 +0000
+Subject: [PATCH] fix #523
+
+---
+ php_pthreads.c | 22 ++++++++++++++++++----
+ 1 file changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/php_pthreads.c b/php_pthreads.c
+index 0f11eeb..e39fe4c 100644
+--- a/php_pthreads.c
++++ b/php_pthreads.c
+@@ -192,15 +192,22 @@ static inline zend_bool pthreads_verify_type(zend_execute_data *execute_data, zv
+ static inline int php_pthreads_recv(ZEND_OPCODE_HANDLER_ARGS) {
+ if (Z_TYPE(PTHREADS_ZG(this)) != IS_UNDEF) {
+ zend_execute_data *execute_data = EG(current_execute_data);
+- uint32_t arg_num = EX(opline)->op1.num;
++ uint32_t arg_num = EX(opline)->op1.num;
++ zval *var = NULL;
+
+ if (UNEXPECTED(arg_num > EX_NUM_ARGS())) {
+ return ZEND_USER_OPCODE_DISPATCH;
+ }
+
++#if ZEND_USE_ABS_CONST_ADDR
++ var = EX(opline)->result.var;
++#else
++ var = EX_VAR(EX(opline)->result.num);
++#endif
++
+ if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
+ if (pthreads_verify_type(execute_data,
+- EX_VAR(EX(opline)->result.var),
++ var,
+ &EX(func)->common.arg_info[arg_num-1])) {
+ EX(opline)++;
+ return ZEND_USER_OPCODE_CONTINUE;
+@@ -214,13 +221,20 @@ static inline int php_pthreads_recv(ZEND_OPCODE_HANDLER_ARGS) {
+ static inline int php_pthreads_verify_return_type(ZEND_OPCODE_HANDLER_ARGS) {
+ if (Z_TYPE(PTHREADS_ZG(this)) != IS_UNDEF) {
+ zend_execute_data *execute_data = EG(current_execute_data);
+-
++ zval *var = NULL;
++
+ if (EX(opline)->op1_type == IS_UNUSED) {
+ return ZEND_USER_OPCODE_DISPATCH;
+ }
+
++#if ZEND_USE_ABS_CONST_ADDR
++ var = EX(opline)->op1.var;
++#else
++ var = EX_VAR(EX(opline)->op1.num);
++#endif
++
+ if (pthreads_verify_type(execute_data,
+- EX_VAR(EX(opline)->op1.num),
++ var,
+ EX(func)->common.arg_info - 1)) {
+ EX(opline)++;
+ return ZEND_USER_OPCODE_CONTINUE;
+From 7a86467968143eb3bf04eec1b9f1987f586cd0c3 Mon Sep 17 00:00:00 2001
+From: Joe Watkins <krakjoe@php.net>
+Date: Wed, 2 Dec 2015 08:27:12 +0000
+Subject: [PATCH] fix for #523 was obviously wrong ... mornings ...
+
+---
+ php_pthreads.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/php_pthreads.c b/php_pthreads.c
+index e39fe4c..4c984ae 100644
+--- a/php_pthreads.c
++++ b/php_pthreads.c
+@@ -200,7 +200,9 @@ static inline int php_pthreads_recv(ZEND_OPCODE_HANDLER_ARGS) {
+ }
+
+ #if ZEND_USE_ABS_CONST_ADDR
+- var = EX(opline)->result.var;
++ if (EX(opline)->result_type == IS_CONST) {
++ var = EX(opline)->result.var;
++ } else var = EX_VAR(EX(opline)->result.num);
+ #else
+ var = EX_VAR(EX(opline)->result.num);
+ #endif
+@@ -228,7 +230,9 @@ static inline int php_pthreads_verify_return_type(ZEND_OPCODE_HANDLER_ARGS) {
+ }
+
+ #if ZEND_USE_ABS_CONST_ADDR
+- var = EX(opline)->op1.var;
++ if (EX(opline)->op1_type == IS_CONST) {
++ var = EX(opline)->op1.var;
++ } else EX_VAR(EX(opline)->op1.num);
+ #else
+ var = EX_VAR(EX(opline)->op1.num);
+ #endif
+From c4fe122188c6ecb4b71060fb191d4b1258691af0 Mon Sep 17 00:00:00 2001
+From: Joe Watkins <krakjoe@php.net>
+Date: Wed, 2 Dec 2015 09:03:40 +0000
+Subject: [PATCH] I miss the good old days, when things were simple ... #523
+
+---
+ php_pthreads.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/php_pthreads.c b/php_pthreads.c
+index 4c984ae..e24d5e8 100644
+--- a/php_pthreads.c
++++ b/php_pthreads.c
+@@ -201,7 +201,7 @@ static inline int php_pthreads_recv(ZEND_OPCODE_HANDLER_ARGS) {
+
+ #if ZEND_USE_ABS_CONST_ADDR
+ if (EX(opline)->result_type == IS_CONST) {
+- var = EX(opline)->result.var;
++ var = (zval*) EX(opline)->result.var;
+ } else var = EX_VAR(EX(opline)->result.num);
+ #else
+ var = EX_VAR(EX(opline)->result.num);
+@@ -225,14 +225,14 @@ static inline int php_pthreads_verify_return_type(ZEND_OPCODE_HANDLER_ARGS) {
+ zend_execute_data *execute_data = EG(current_execute_data);
+ zval *var = NULL;
+
+- if (EX(opline)->op1_type == IS_UNUSED) {
++ if (EX(opline)->op1_type == IS_UNUSED) {
+ return ZEND_USER_OPCODE_DISPATCH;
+ }
+
+ #if ZEND_USE_ABS_CONST_ADDR
+- if (EX(opline)->op1_type == IS_CONST) {
+- var = EX(opline)->op1.var;
+- } else EX_VAR(EX(opline)->op1.num);
++ if (EX(opline)->op1_type & IS_CONST) {
++ var = (zval*) EX(opline)->op1.var;
++ } else var = EX_VAR(EX(opline)->op1.num);
+ #else
+ var = EX_VAR(EX(opline)->op1.num);
+ #endif