[PHP-CVS] com php-src: fix assembly of safe_address() for x86 and x86_64: Zend/zend_alloc.c

2013-07-03 Thread Nuno Lopes
Commit:97e9d01dc78b6cec8eb014484935c2d1ab8293fc
Author:Nuno Lopes nlop...@php.net Wed, 3 Jul 2013 17:53:46 -0400
Parents:   675beb06a6ed8040303f21f55e4ce6d350f75a1a
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=97e9d01dc78b6cec8eb014484935c2d1ab8293fc

Log:
fix assembly of safe_address() for x86 and x86_64

Changed paths:
  M  Zend/zend_alloc.c


Diff:
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index c6aee57..383a1df 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -2465,7 +2465,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
size_t res = nmemb;
unsigned long overflow = 0;
 
-   __asm__ (mull %3\n\taddl %4,%0\n\tadcl %1,%1
+   __asm__ (mull %3\n\taddl %4,%0\n\tadcl $0,%1
 : =a(res), =d (overflow)
 : %0(res),
   rm(size),
@@ -2493,7 +2493,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
 
 __asm__ (mul LP_SUFF   %3\n\t
  add %4,%0\n\t
- adc %1,%1
+ adc $0,%1
  : =a(res), =d (overflow)
  : %0(res),
rm(size),


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix assembly of safe_address() for x86 and x86_64: Zend/zend_alloc.c

2013-07-03 Thread Nuno Lopes
Commit:40cbceaf71f3431b43c245704d82f06c8bb4c2de
Author:Nuno Lopes nlop...@php.net Wed, 3 Jul 2013 17:53:46 -0400
Parents:   332e46b3aa00c1d5a8cfb4e9a42f2d1dfbe3603d
Branches:  PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=40cbceaf71f3431b43c245704d82f06c8bb4c2de

Log:
fix assembly of safe_address() for x86 and x86_64

Changed paths:
  M  Zend/zend_alloc.c


Diff:
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index c6aee57..383a1df 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -2465,7 +2465,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
size_t res = nmemb;
unsigned long overflow = 0;
 
-   __asm__ (mull %3\n\taddl %4,%0\n\tadcl %1,%1
+   __asm__ (mull %3\n\taddl %4,%0\n\tadcl $0,%1
 : =a(res), =d (overflow)
 : %0(res),
   rm(size),
@@ -2493,7 +2493,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
 
 __asm__ (mul LP_SUFF   %3\n\t
  add %4,%0\n\t
- adc %1,%1
+ adc $0,%1
  : =a(res), =d (overflow)
  : %0(res),
rm(size),


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix assembly of safe_address() for x86 and x86_64: Zend/zend_alloc.c

2013-07-03 Thread Nuno Lopes
Commit:c652cc93ec5ce8f1833d023159804ebd56e1a94e
Author:Nuno Lopes nlop...@php.net Wed, 3 Jul 2013 17:53:46 -0400
Parents:   7549beb1022c6821a279df03e0dfcbf0df5eef97
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=c652cc93ec5ce8f1833d023159804ebd56e1a94e

Log:
fix assembly of safe_address() for x86 and x86_64

Changed paths:
  M  Zend/zend_alloc.c


Diff:
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 0bbd59a..596c249 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -2461,7 +2461,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
size_t res = nmemb;
unsigned long overflow = 0;
 
-   __asm__ (mull %3\n\taddl %4,%0\n\tadcl %1,%1
+   __asm__ (mull %3\n\taddl %4,%0\n\tadcl $0,%1
 : =a(res), =d (overflow)
 : %0(res),
   rm(size),
@@ -2489,7 +2489,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
 
 __asm__ (mul LP_SUFF   %3\n\t
  add %4,%0\n\t
- adc %1,%1
+ adc $0,%1
  : =a(res), =d (overflow)
  : %0(res),
rm(size),


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix assembly of safe_address() for x86 and x86_64: Zend/zend_alloc.c

2013-07-03 Thread Nuno Lopes
Commit:e964817b244d091dc38f59f5d7f1735110b698af
Author:Nuno Lopes nlop...@php.net Wed, 3 Jul 2013 18:02:28 -0400
Parents:   50ac53e1b109795e3abb92735a3a35cebcdd47a7
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e964817b244d091dc38f59f5d7f1735110b698af

Log:
fix assembly of safe_address() for x86 and x86_64

Changed paths:
  M  Zend/zend_alloc.c


Diff:
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 02e84ee..e86b3e7 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -2386,7 +2386,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
size_t res = nmemb;
unsigned long overflow = 0;
 
-   __asm__ (mull %3\n\taddl %4,%0\n\tadcl %1,%1
+   __asm__ (mull %3\n\taddl %4,%0\n\tadcl $0,%1
 : =a(res), =d (overflow)
 : %0(res),
   rm(size),
@@ -2406,7 +2406,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
 size_t res = nmemb;
 unsigned long overflow = 0;
 
-__asm__ (mulq %3\n\taddq %4,%0\n\tadcq %1,%1
+__asm__ (mulq %3\n\taddq %4,%0\n\tadcq $0,%1
  : =a(res), =d (overflow)
  : %0(res),
rm(size),


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fix conversion from unsigned char to char: sapi/cgi/cgi_main.c

2013-04-27 Thread Nuno Lopes

Are you sure about this change?
Because this actually changes the semantics of the code. The following piece 
of code will now evaluate differently than before:

*p = ' '

Nuno


-Original Message- 
From: David Soria Parra

Sent: Friday, April 26, 2013 9:55 AM
To: php-cvs@lists.php.net
Subject: [PHP-CVS] com php-src: Fix conversion from unsigned char to char: 
sapi/cgi/cgi_main.c


Commit:bc50ba4bf971c62a1ff5b915a0c9f890b04c1087
Author:David Soria Parra d...@php.net Fri, 26 Apr 2013 10:55:52 
+0200

Parents:   75cec90d8cc2ea34ab9e5e7146cb6b3bf29430a9
Branches:  PHP-5.5 master

Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=bc50ba4bf971c62a1ff5b915a0c9f890b04c1087


Log:
Fix conversion from unsigned char to char

Changed paths:
 M  sapi/cgi/cgi_main.c


Diff:
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 9e6b74a..abe5e6b 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -1818,7 +1818,7 @@ int main(int argc, char *argv[])

 if((query_string = getenv(QUERY_STRING)) != NULL  strchr(query_string, 
'=') == NULL) {
 /* we've got query string that has no = - apache CGI will pass it to 
command line */

- unsigned char *p;
+ char *p;
 decoded_query_string = strdup(query_string);
 php_url_decode(decoded_query_string, strlen(decoded_query_string));
 for (p = decoded_query_string; *p   *p = ' '; p++) {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: allow lcov 1.10: configure.in

2013-04-13 Thread Nuno Lopes
Commit:dacbf70f922f9cf831b6908841f6bce5a323bbeb
Author:Nuno Lopes nlop...@php.net Sat, 13 Apr 2013 16:51:58 -0400
Parents:   a0e3ca1c986681d0136ce4550359ecee2826a80c
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=dacbf70f922f9cf831b6908841f6bce5a323bbeb

Log:
allow lcov 1.10

Changed paths:
  M  configure.in


Diff:
diff --git a/configure.in b/configure.in
index 9811236..260b982 100644
--- a/configure.in
+++ b/configure.in
@@ -784,7 +784,7 @@ if test $PHP_GCOV = yes; then
 AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. 
You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
   fi
   
-  ltp_version_list=1.5 1.6 1.7 1.9
+  ltp_version_list=1.5 1.6 1.7 1.9 1.10
 
   AC_CHECK_PROG(LTP, lcov, lcov)
   AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: allow lcov 1.10: configure.in

2013-04-13 Thread Nuno Lopes
Commit:adc17bff57e36312d707641428f32ef53070dc5b
Author:Nuno Lopes nlop...@php.net Sat, 13 Apr 2013 16:51:58 -0400
Parents:   a5cfe57e08f3d3e48276f535d12ce6e6758451bf
Branches:  PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=adc17bff57e36312d707641428f32ef53070dc5b

Log:
allow lcov 1.10

Changed paths:
  M  configure.in


Diff:
diff --git a/configure.in b/configure.in
index 704801e..f531beb 100644
--- a/configure.in
+++ b/configure.in
@@ -784,7 +784,7 @@ if test $PHP_GCOV = yes; then
 AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. 
You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
   fi
   
-  ltp_version_list=1.5 1.6 1.7 1.9
+  ltp_version_list=1.5 1.6 1.7 1.9 1.10
 
   AC_CHECK_PROG(LTP, lcov, lcov)
   AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: allow lcov 1.10: configure.in

2013-04-13 Thread Nuno Lopes
Commit:e694d409631d20ed9c8a8fb6f61ea1d9df1d7001
Author:Nuno Lopes nlop...@php.net Sat, 13 Apr 2013 16:56:30 -0400
Parents:   ba292b037f58c6cb0ef090936811cc658eadd26f
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e694d409631d20ed9c8a8fb6f61ea1d9df1d7001

Log:
allow lcov 1.10

Changed paths:
  M  configure.in


Diff:
diff --git a/configure.in b/configure.in
index 12f5bc2..61d6970 100644
--- a/configure.in
+++ b/configure.in
@@ -784,7 +784,7 @@ if test $PHP_GCOV = yes; then
 AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. 
You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
   fi
   
-  ltp_version_list=1.5 1.6 1.7
+  ltp_version_list=1.5 1.6 1.7 1.9 1.10
 
   AC_CHECK_PROG(LTP, lcov, lcov)
   AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: allow lcov 1.10: configure.in

2013-04-13 Thread Nuno Lopes
Commit:a9271a8b0dd60c6e602e9f4e6fdfcd6fb0b66dc4
Author:Nuno Lopes nlop...@php.net Sat, 13 Apr 2013 16:56:30 -0400
Parents:   56b028e5905c87d4f91e3264561603485ee55e46
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=a9271a8b0dd60c6e602e9f4e6fdfcd6fb0b66dc4

Log:
allow lcov 1.10

Changed paths:
  M  configure.in


Diff:
diff --git a/configure.in b/configure.in
index ea57f74..f4cbab3 100644
--- a/configure.in
+++ b/configure.in
@@ -712,7 +712,7 @@ if test $PHP_GCOV = yes; then
 AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. 
You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
   fi
   
-  ltp_version_list=1.5 1.6 1.7
+  ltp_version_list=1.5 1.6 1.7 1.9 1.10
 
   AC_CHECK_PROG(LTP, lcov, lcov)
   AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: leave a sane environment behind (even if empty) when exiting some OS atexit() handlers call getenv(): sapi/cli/ps_title.c

2013-04-07 Thread Nuno Lopes
Commit:1a71bf646e799851dacb2fbe1a439f21543ca590
Author:Nuno Lopes nlop...@php.net Sun, 7 Apr 2013 02:32:20 -0400
Parents:   bd96813042c7aecde34e65d0e1f96ce7e8214da7
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=1a71bf646e799851dacb2fbe1a439f21543ca590

Log:
leave a sane environment behind (even if empty) when exiting
some OS atexit() handlers call getenv()

Changed paths:
  M  sapi/cli/ps_title.c


Diff:
diff --git a/sapi/cli/ps_title.c b/sapi/cli/ps_title.c
index 8dc4609..6f3bdb8 100644
--- a/sapi/cli/ps_title.c
+++ b/sapi/cli/ps_title.c
@@ -112,6 +112,7 @@ static const size_t ps_buffer_size = MAX_PATH;
 #elif defined(PS_USE_CLOBBER_ARGV)
 static char *ps_buffer; /* will point to argv area */
 static size_t ps_buffer_size;   /* space determined at run time */
+static char *empty_environ[] = {0}; /* empty environment */
 #else
 #define PS_BUFFER_SIZE 256
 static char ps_buffer[PS_BUFFER_SIZE];
@@ -415,6 +416,9 @@ void cleanup_ps_args(char **argv)
 free(frozen_environ[i]);
 free(frozen_environ);
 free(new_environ);
+/* leave a sane environment behind since some atexit() handlers
+call getenv(). */
+environ = empty_environ;
 }
 #endif /* PS_USE_CLOBBER_ARGV */


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: leave a sane environment behind (even if empty) when exiting some OS atexit() handlers call getenv(): sapi/cli/ps_title.c

2013-04-07 Thread Nuno Lopes
Commit:e769025791e1696dcb6bc09c9b066844df4ce763
Author:Nuno Lopes nlop...@php.net Sun, 7 Apr 2013 02:32:20 -0400
Parents:   5ac8084e5f339132e7aa94b83bddfcd16641e9be
Branches:  PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e769025791e1696dcb6bc09c9b066844df4ce763

Log:
leave a sane environment behind (even if empty) when exiting
some OS atexit() handlers call getenv()

Changed paths:
  M  sapi/cli/ps_title.c


Diff:
diff --git a/sapi/cli/ps_title.c b/sapi/cli/ps_title.c
index 8dc4609..6f3bdb8 100644
--- a/sapi/cli/ps_title.c
+++ b/sapi/cli/ps_title.c
@@ -112,6 +112,7 @@ static const size_t ps_buffer_size = MAX_PATH;
 #elif defined(PS_USE_CLOBBER_ARGV)
 static char *ps_buffer; /* will point to argv area */
 static size_t ps_buffer_size;   /* space determined at run time */
+static char *empty_environ[] = {0}; /* empty environment */
 #else
 #define PS_BUFFER_SIZE 256
 static char ps_buffer[PS_BUFFER_SIZE];
@@ -415,6 +416,9 @@ void cleanup_ps_args(char **argv)
 free(frozen_environ[i]);
 free(frozen_environ);
 free(new_environ);
+/* leave a sane environment behind since some atexit() handlers
+call getenv(). */
+environ = empty_environ;
 }
 #endif /* PS_USE_CLOBBER_ARGV */


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix coverage data for the opcache optimizer: Makefile.gcov

2013-03-31 Thread Nuno Lopes
Commit:ed54776960414167f4b388597b20461539939a0d
Author:Nuno Lopes nlop...@php.net Sun, 31 Mar 2013 15:43:08 -0400
Parents:   971676e859c8d36859cd1b4d7b87d5e32ff9c72a
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=ed54776960414167f4b388597b20461539939a0d

Log:
fix coverage data for the opcache optimizer

Changed paths:
  M  Makefile.gcov


Diff:
diff --git a/Makefile.gcov b/Makefile.gcov
index 79d7a6d..37c1b4b 100644
--- a/Makefile.gcov
+++ b/Makefile.gcov
@@ -14,7 +14,7 @@ php_lcov.info: lcov-test
@rm -rf lcov_data/
@$(mkinstalldirs) lcov_data/
@echo
-   -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name 
\*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 
's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
+   -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name 
\*.c -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' 
-e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
for x in $$files; do \
echo -n . ;\
y=`echo $$x | sed -e 's!\.libs/!!'`; \


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix coverage data for the opcache optimizer: Makefile.gcov

2013-03-31 Thread Nuno Lopes
Commit:586dc07a8a3ea0a1769dc83189a3d2d9a6b77b4a
Author:Nuno Lopes nlop...@php.net Sun, 31 Mar 2013 15:43:08 -0400
Parents:   ad7c0b19286a4dfa53d03a525ffee77c9ca92e04
Branches:  PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=586dc07a8a3ea0a1769dc83189a3d2d9a6b77b4a

Log:
fix coverage data for the opcache optimizer

Changed paths:
  M  Makefile.gcov


Diff:
diff --git a/Makefile.gcov b/Makefile.gcov
index 79d7a6d..37c1b4b 100644
--- a/Makefile.gcov
+++ b/Makefile.gcov
@@ -14,7 +14,7 @@ php_lcov.info: lcov-test
@rm -rf lcov_data/
@$(mkinstalldirs) lcov_data/
@echo
-   -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name 
\*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 
's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
+   -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name 
\*.c -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' 
-e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
for x in $$files; do \
echo -n . ;\
y=`echo $$x | sed -e 's!\.libs/!!'`; \


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Merge fix of #62836 to ?.re, and regenerate ?.c: ext/standard/var_unserializer.c ext/standard/var_unserializer.re

2013-01-21 Thread Nuno Lopes

Test case?


Quoting Xinchen Hui larue...@php.net:


Commit:86c1a26169ce44c9ea48e424b62128ee62f31d59
Author:Xinchen Hui larue...@php.net Mon, 21 Jan 2013  
11:35:22 +0800

Parents:   9e7c2e5906d1ec943afe7f6a0daf613a36ba2137
Branches:  PHP-5.4

Link:
http://git.php.net/?p=php-src.git;a=commitdiff;h=86c1a26169ce44c9ea48e424b62128ee62f31d59


Log:
Merge fix of #62836 to ?.re, and regenerate ?.c

Bugs:
https://bugs.php.net/62836

Changed paths:
  M  ext/standard/var_unserializer.c
  M  ext/standard/var_unserializer.re


Diff:
diff --git a/ext/standard/var_unserializer.c  
b/ext/standard/var_unserializer.c

index 1e896d2..bd0b2f6 100644
--- a/ext/standard/var_unserializer.c
+++ b/ext/standard/var_unserializer.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Wed Nov  9 19:37:48 2011 */
+/* Generated by re2c 0.13.5 on Mon Jan 21 11:34:03 2013 */
 #line 1 ext/standard/var_unserializer.re
 /*
   +--+
@@ -427,7 +427,7 @@ PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER)



-#line 425 ext/standard/var_unserializer.c
+#line 431 ext/standard/var_unserializer.c
 {
YYCTYPE yych;
static const unsigned char yybm[] = {
@@ -487,9 +487,9 @@ yy2:
yych = *(YYMARKER = ++YYCURSOR);
if (yych == ':') goto yy95;
 yy3:
-#line 747 ext/standard/var_unserializer.re
+#line 759 ext/standard/var_unserializer.re
{ return 0; }
-#line 487 ext/standard/var_unserializer.c
+#line 493 ext/standard/var_unserializer.c
 yy4:
yych = *(YYMARKER = ++YYCURSOR);
if (yych == ':') goto yy89;
@@ -532,13 +532,13 @@ yy13:
goto yy3;
 yy14:
++YYCURSOR;
-#line 741 ext/standard/var_unserializer.re
+#line 753 ext/standard/var_unserializer.re
{
/* this is the case where we have less data than planned */
 	php_error_docref(NULL TSRMLS_CC, E_NOTICE, Unexpected end of  
serialized data);

return 0; /* not sure if it should be 0 or 1 here? */
 }
-#line 536 ext/standard/var_unserializer.c
+#line 542 ext/standard/var_unserializer.c
 yy16:
yych = *++YYCURSOR;
goto yy3;
@@ -568,7 +568,7 @@ yy20:
yych = *++YYCURSOR;
if (yych != '') goto yy18;
++YYCURSOR;
-#line 624 ext/standard/var_unserializer.re
+#line 630 ext/standard/var_unserializer.re
{
size_t len, len2, len3, maxlen;
long elements;
@@ -691,7 +691,7 @@ yy20:

return object_common2(UNSERIALIZE_PASSTHRU, elements);
 }
-#line 683 ext/standard/var_unserializer.c
+#line 695 ext/standard/var_unserializer.c
 yy25:
yych = *++YYCURSOR;
if (yych = ',') {
@@ -716,7 +716,7 @@ yy27:
yych = *++YYCURSOR;
if (yych != '') goto yy18;
++YYCURSOR;
-#line 616 ext/standard/var_unserializer.re
+#line 622 ext/standard/var_unserializer.re
{

INIT_PZVAL(*rval);
@@ -724,7 +724,7 @@ yy27:
return object_common2(UNSERIALIZE_PASSTHRU,
object_common1(UNSERIALIZE_PASSTHRU, 
ZEND_STANDARD_CLASS_DEF_PTR));
 }
-#line 716 ext/standard/var_unserializer.c
+#line 728 ext/standard/var_unserializer.c
 yy32:
yych = *++YYCURSOR;
if (yych == '+') goto yy33;
@@ -745,7 +745,7 @@ yy34:
yych = *++YYCURSOR;
if (yych != '{') goto yy18;
++YYCURSOR;
-#line 596 ext/standard/var_unserializer.re
+#line 602 ext/standard/var_unserializer.re
{
long elements = parse_iv(start + 2);
/* use iv() not uiv() in order to check data range */
@@ -765,7 +765,7 @@ yy34:

return finish_nested_data(UNSERIALIZE_PASSTHRU);
 }
-#line 757 ext/standard/var_unserializer.c
+#line 769 ext/standard/var_unserializer.c
 yy39:
yych = *++YYCURSOR;
if (yych == '+') goto yy40;
@@ -786,7 +786,7 @@ yy41:
yych = *++YYCURSOR;
if (yych != '') goto yy18;
++YYCURSOR;
-#line 567 ext/standard/var_unserializer.re
+#line 573 ext/standard/var_unserializer.re
{
size_t len, maxlen;
char *str;
@@ -815,7 +815,7 @@ yy41:
ZVAL_STRINGL(*rval, str, len, 0);
return 1;
 }
-#line 807 ext/standard/var_unserializer.c
+#line 819 ext/standard/var_unserializer.c
 yy46:
yych = *++YYCURSOR;
if (yych == '+') goto yy47;
@@ -836,7 +836,7 @@ yy48:
yych = *++YYCURSOR;
if (yych != '') goto yy18;
++YYCURSOR;
-#line 539 ext/standard/var_unserializer.re
+#line 545 ext/standard/var_unserializer.re
{
size_t len, maxlen;
char *str;
@@ -864,7 +864,7 @@ yy48:
ZVAL_STRINGL(*rval, str, len, 1);
return 1;
 }
-#line 856 ext/standard/var_unserializer.c
+#line 868 ext/standard/var_unserializer.c
 yy53:
yych = *++YYCURSOR;
if (yych = '/') {
@@ -952,7 +952,7 @@ yy61:
}
 yy63:
++YYCURSOR;
-#line 529 ext/standard/var_unserializer.re
+#line 535 ext/standard/var_unserializer.re
{
 #if SIZEOF_LONG == 4
 use_double:
@@ -962,7 +962,7 @@ 

Re: [PHP-CVS] com php-src: Merge fix of #62836 to ?.re, and regenerate ?.c: ext/standard/var_unserializer.c ext/standard/var_unserializer.re

2013-01-21 Thread Nuno Lopes

Ok, thank you for the explanation! :)
Nuno

- Original Message -

hey:

this is not a new fix, just merge the fix into *.re

the original fix is here (with test scripts):
http://git.php.net/?p=php-src.git;a=commit;h=0b23da1c74c52a819b728c78c66c182511223355


thanks
On Mon, Jan 21, 2013 at 5:11 PM, Nuno Lopes nlop...@php.net wrote:

Test case?



Quoting Xinchen Hui larue...@php.net:


Commit:86c1a26169ce44c9ea48e424b62128ee62f31d59
Author:Xinchen Hui larue...@php.net Mon, 21 Jan 2013
11:35:22 +0800
Parents:   9e7c2e5906d1ec943afe7f6a0daf613a36ba2137
Branches:  PHP-5.4

Link:
http://git.php.net/?p=php-src.git;a=commitdiff;h=86c1a26169ce44c9ea48e424b62128ee62f31d59

Log:
Merge fix of #62836 to ?.re, and regenerate ?.c

Bugs:
https://bugs.php.net/62836

Changed paths:
  M  ext/standard/var_unserializer.c
  M  ext/standard/var_unserializer.re


Diff:
diff --git a/ext/standard/var_unserializer.c
b/ext/standard/var_unserializer.c
index 1e896d2..bd0b2f6 100644
--- a/ext/standard/var_unserializer.c
+++ b/ext/standard/var_unserializer.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Wed Nov  9 19:37:48 2011 */
+/* Generated by re2c 0.13.5 on Mon Jan 21 11:34:03 2013 */
 #line 1 ext/standard/var_unserializer.re
 /*

+--+
@@ -427,7 +427,7 @@ PHPAPI int 
php_var_unserialize(UNSERIALIZE_PARAMETER)




-#line 425 ext/standard/var_unserializer.c
+#line 431 ext/standard/var_unserializer.c
 {
YYCTYPE yych;
static const unsigned char yybm[] = {
@@ -487,9 +487,9 @@ yy2:
yych = *(YYMARKER = ++YYCURSOR);
if (yych == ':') goto yy95;
 yy3:
-#line 747 ext/standard/var_unserializer.re
+#line 759 ext/standard/var_unserializer.re
{ return 0; }
-#line 487 ext/standard/var_unserializer.c
+#line 493 ext/standard/var_unserializer.c
 yy4:
yych = *(YYMARKER = ++YYCURSOR);
if (yych == ':') goto yy89;
@@ -532,13 +532,13 @@ yy13:
goto yy3;
 yy14:
++YYCURSOR;
-#line 741 ext/standard/var_unserializer.re
+#line 753 ext/standard/var_unserializer.re
{
/* this is the case where we have less data than planned */
php_error_docref(NULL TSRMLS_CC, E_NOTICE, Unexpected end of
serialized data);
return 0; /* not sure if it should be 0 or 1 here? */
 }
-#line 536 ext/standard/var_unserializer.c
+#line 542 ext/standard/var_unserializer.c
 yy16:
yych = *++YYCURSOR;
goto yy3;
@@ -568,7 +568,7 @@ yy20:
yych = *++YYCURSOR;
if (yych != '') goto yy18;
++YYCURSOR;
-#line 624 ext/standard/var_unserializer.re
+#line 630 ext/standard/var_unserializer.re
{
size_t len, len2, len3, maxlen;
long elements;
@@ -691,7 +691,7 @@ yy20:

return object_common2(UNSERIALIZE_PASSTHRU, elements);
 }
-#line 683 ext/standard/var_unserializer.c
+#line 695 ext/standard/var_unserializer.c
 yy25:
yych = *++YYCURSOR;
if (yych = ',') {
@@ -716,7 +716,7 @@ yy27:
yych = *++YYCURSOR;
if (yych != '') goto yy18;
++YYCURSOR;
-#line 616 ext/standard/var_unserializer.re
+#line 622 ext/standard/var_unserializer.re
{

INIT_PZVAL(*rval);
@@ -724,7 +724,7 @@ yy27:
return object_common2(UNSERIALIZE_PASSTHRU,
object_common1(UNSERIALIZE_PASSTHRU,
ZEND_STANDARD_CLASS_DEF_PTR));
 }
-#line 716 ext/standard/var_unserializer.c
+#line 728 ext/standard/var_unserializer.c
 yy32:
yych = *++YYCURSOR;
if (yych == '+') goto yy33;
@@ -745,7 +745,7 @@ yy34:
yych = *++YYCURSOR;
if (yych != '{') goto yy18;
++YYCURSOR;
-#line 596 ext/standard/var_unserializer.re
+#line 602 ext/standard/var_unserializer.re
{
long elements = parse_iv(start + 2);
/* use iv() not uiv() in order to check data range */
@@ -765,7 +765,7 @@ yy34:

return finish_nested_data(UNSERIALIZE_PASSTHRU);
 }
-#line 757 ext/standard/var_unserializer.c
+#line 769 ext/standard/var_unserializer.c
 yy39:
yych = *++YYCURSOR;
if (yych == '+') goto yy40;
@@ -786,7 +786,7 @@ yy41:
yych = *++YYCURSOR;
if (yych != '') goto yy18;
++YYCURSOR;
-#line 567 ext/standard/var_unserializer.re
+#line 573 ext/standard/var_unserializer.re
{
size_t len, maxlen;
char *str;
@@ -815,7 +815,7 @@ yy41:
ZVAL_STRINGL(*rval, str, len, 0);
return 1;
 }
-#line 807 ext/standard/var_unserializer.c
+#line 819 ext/standard/var_unserializer.c
 yy46:
yych = *++YYCURSOR;
if (yych == '+') goto yy47;
@@ -836,7 +836,7 @@ yy48:
yych = *++YYCURSOR;
if (yych != '') goto yy18;
++YYCURSOR;
-#line 539 ext/standard/var_unserializer.re
+#line 545 ext/standard/var_unserializer.re
{
size_t len, maxlen;
char *str;
@@ -864,7 +864,7 @@ yy48:
ZVAL_STRINGL(*rval, str, len, 1);
return 1;
 }
-#line 856 ext/standard/var_unserializer.c

Re: [PHP-CVS] com php-src: Bug #63699: performance improvements for varios ext/date functions: NEWS ext/date/php_date.c ext/date/php_date.h

2013-01-06 Thread Nuno Lopes

Nice!
I have another suggestion to further improve the performance: make 
OnUpdate_date_timezone() update both 'timezone' and 'default_timezone'. The 
variable 'timezone_valid' can then be removed altogether.


Thanks,
Nuno

P.S.: I know it was already there but while at it, can you please change 
'strlen(DATEG(timezone))  0' to '*DATEG(timezone)'.



- Original Message - 
From: Lars Strojny lstro...@php.net

To: php-cvs@lists.php.net
Sent: Sunday, January 06, 2013 2:06 AM
Subject: [PHP-CVS] com php-src: Bug #63699: performance improvements for 
varios ext/date functions: NEWS ext/date/php_date.c ext/date/php_date.h



Commit:67557fcfcea2c22e9b8d9f0ba86f461c02002cb7
Author:Lars Strojny lstro...@php.net Sun, 6 Jan 2013 03:06:09 
+0100

Parents:   2feea39a3320d100bae8a1193aba9022726a24ea
Branches:  PHP-5.4

Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=67557fcfcea2c22e9b8d9f0ba86f461c02002cb7


Log:
Bug #63699: performance improvements for varios ext/date functions

Bugs:
https://bugs.php.net/63699

Changed paths:
 M  NEWS
 M  ext/date/php_date.c
 M  ext/date/php_date.h


Diff:
diff --git a/NEWS b/NEWS
index 91b7b46..75c9816 100644
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,10 @@ PHP 
NEWS

  . Fixed bug #55438 (Curlwapper is not sending http header randomly).
(php...@lostreality.org, Pierrick)

+- Date:
+  . Fixed bug #63699 (Performance improvements for various ext/date 
functions).

+(Lars, original patch by njaguar at gmail dot com)
+
20 Dec 2012, PHP 5.4.10

- Core:
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index ac119a3..1837f94 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -495,9 +495,11 @@ int php_date_global_timezone_db_enabled;
/* on 90'35; common sunrise declaration (sun body disappeared) */
#define DATE_SUNRISE_ZENITH 90.58

+static PHP_INI_MH(OnUpdate_date_timezone);
+
/* {{{ INI Settings */
PHP_INI_BEGIN()
- STD_PHP_INI_ENTRY(date.timezone, , PHP_INI_ALL, OnUpdateString, 
default_timezone, zend_date_globals, date_globals)
+ STD_PHP_INI_ENTRY(date.timezone, , PHP_INI_ALL, 
OnUpdate_date_timezone, default_timezone, zend_date_globals, date_globals)
 PHP_INI_ENTRY(date.default_latitude,   DATE_DEFAULT_LATITUDE, 
PHP_INI_ALL, NULL)
 PHP_INI_ENTRY(date.default_longitude,  DATE_DEFAULT_LONGITUDE, 
PHP_INI_ALL, NULL)
 PHP_INI_ENTRY(date.sunset_zenith,  DATE_SUNSET_ZENITH, 
PHP_INI_ALL, NULL)

@@ -599,6 +601,7 @@ static PHP_GINIT_FUNCTION(date)
 date_globals-default_timezone = NULL;
 date_globals-timezone = NULL;
 date_globals-tzcache = NULL;
+ date_globals-timezone_valid = 0;
}
/* }}} */

@@ -844,25 +847,53 @@ timelib_tzinfo *php_date_parse_tzfile_wrapper(char 
*formal_tzname, const timelib

}
/* }}} */

+// created this callback method to check the date.timezone only when 
changed, to increase performance and error on an ini_set line

+/* {{{ static PHP_INI_MH(OnUpdate_date_timezone) */
+static PHP_INI_MH(OnUpdate_date_timezone)
+{
+ if (OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, 
mh_arg3, stage TSRMLS_CC) == FAILURE) {

+ return FAILURE;
+ }
+
+ DATEG(timezone_valid) = 0;
+ if (stage == PHP_INI_STAGE_RUNTIME) {
+ if (!timelib_timezone_id_is_valid(DATEG(default_timezone), 
DATE_TIMEZONEDB)) {

+ php_error_docref(NULL TSRMLS_CC, E_WARNING, DATE_TZ_ERRMSG);
+ } else {
+ DATEG(timezone_valid) = 1;
+ }
+ }
+
+ return SUCCESS;
+}
+/* }}} */
+
/* {{{ Helper functions */
static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC)
{
 /* Checking configure timezone */
- if (DATEG(timezone)  (strlen(DATEG(timezone))  0)) {
+ if (DATEG(timezone)  strlen(DATEG(timezone))  0) {
 return DATEG(timezone);
 }
 /* Check config setting for default timezone */
 if (!DATEG(default_timezone)) {
 /* Special case: ext/date wasn't initialized yet */
 zval ztz;
-
- if (SUCCESS == zend_get_configuration_directive(date.timezone, 
sizeof(date.timezone), ztz) 

- Z_TYPE(ztz) == IS_STRING 
- Z_STRLEN(ztz)  0 
- timelib_timezone_id_is_valid(Z_STRVAL(ztz), tzdb)) {
+
+ if (SUCCESS == zend_get_configuration_directive(date.timezone, 
sizeof(date.timezone), ztz)  Z_TYPE(ztz) == IS_STRING  Z_STRLEN(ztz) 
 0  timelib_timezone_id_is_valid(Z_STRVAL(ztz), tzdb)) {

 return Z_STRVAL(ztz);
 }
- } else if (*DATEG(default_timezone)  
timelib_timezone_id_is_valid(DATEG(default_timezone), tzdb)) {

+ } else if (*DATEG(default_timezone)) {
+ if (DATEG(timezone_valid) == 1) { // timezone already checked and 
validated

+ return DATEG(default_timezone);
+ }
+
+ if (!timelib_timezone_id_is_valid(DATEG(default_timezone), tzdb)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid date.timezone value 
'%s', we selected the timezone 'UTC' for now., DATEG(default_timezone));

+ return UTC;
+ }
+
+ DATEG(timezone_valid) = 1;
 return DATEG(default_timezone);
 }
 /* Fallback to UTC */
diff --git a/ext/date/php_date.h b/ext/date/php_date.h
index c9c1650..f0b662b 100644
--- a/ext/date/php_date.h
+++ b/ext/date/php_date.h

Re: [PHP-CVS] com php-src: These need to be volatile in order to prevent leaking after the longjmp in the error handler: ext/gd/libgd/gd_png.c

2012-11-06 Thread Nuno Lopes
While I won't oppose this patch since it has no performance impact, I 
believe this is a bug in the compiler and not in the code below.
The compiler should know about setjmp(). glibc, for example, marks that 
function with __attribute__((returns_twice)).


Nuno

- Original Message - 
From: Rasmus Lerdorf ras...@php.net

To: php-cvs@lists.php.net
Sent: Tuesday, November 06, 2012 4:57 AM


Commit:f452b9056e89aa1bf18d6c0828ba709c0f8df854
Author:Rasmus Lerdorf ras...@php.net Mon, 5 Nov 2012 
20:56:19 -0800

Parents:   153bfada90b0733943c31e9d7e2bee57c5e7bcac
Branches:  PHP-5.4

Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=f452b9056e89aa1bf18d6c0828ba709c0f8df854


Log:
These need to be volatile in order to prevent leaking after the
longjmp in the error handler

Changed paths:
 M  ext/gd/libgd/gd_png.c


Diff:
diff --git a/ext/gd/libgd/gd_png.c b/ext/gd/libgd/gd_png.c
index 49f7cb0..bdbb7ee 100644
--- a/ext/gd/libgd/gd_png.c
+++ b/ext/gd/libgd/gd_png.c
@@ -127,8 +127,8 @@ gdImagePtr gdImageCreateFromPngCtx (gdIOCtx * infile)
 png_color_16p trans_gray_rgb;
 png_color_16p trans_color_rgb;
 png_bytep trans;
- png_bytep image_data = NULL;
- png_bytepp row_pointers = NULL;
+ volatile png_bytep image_data = NULL;
+ volatile png_bytepp row_pointers = NULL;
 gdImagePtr im = NULL;
 int i, j, *open = NULL;
 volatile int transparent = -1;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Really fix leaks, add test cases to prove it...: ext/standard/password.c ext/standard/tests/password/password_bcrypt_errors.phpt ext/standard/tests/password/password_hash_er

2012-10-16 Thread Nuno Lopes

Hi,


+ case IS_BOOL:
+ case IS_NULL:
  case IS_RESOURCE:
  case IS_ARRAY:
  default:


it doesn't make sense to have those cases and the default. Please remove all 
those useless cases.


Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Refactor to using a stack based zval instead of dynamic allocation: ext/standard/password.c

2012-10-16 Thread Nuno Lopes

Hi,

I gave a quick review to the overal implementation of this feature.
A few comments:

- php_password_make_salt() shouldn't allocate memory + do memcpy, but it 
should fill in 'ret' directly instead. Both mallocs can go away.
- in PHP_FUNCTION(password_get_info) you assume that sscanf always 
succeeds. That's not the case if I pass a mis-encoded string.
- in PHP_FUNCTION(password_hash) you don't need to estrndup the salt, since 
you're just reading it.
- Similarly, no needs to emallocs and sprintf. You should write directly to 
the final string to avoid the copies.
- The sprintf() there is probably not ok if the salt includes a \0 in the 
middle.


In summary, there should be few or no mallocs in this file, since most 
buffers have a maximum (small) size that can be determined statically.


Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: make default_exception_ce and error_exception_ce static: Zend/zend_exceptions.c

2012-08-02 Thread Nuno Lopes
Commit:aa8eabddd662fe286c08af014384692e03c093a9
Author:Nuno Lopes nlop...@php.net Thu, 2 Aug 2012 11:44:15 +0100
Parents:   53c8612fe780a80fde64da118587e6096b16b595
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=aa8eabddd662fe286c08af014384692e03c093a9

Log:
make default_exception_ce and error_exception_ce static

Changed paths:
  M  Zend/zend_exceptions.c


Diff:
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 7bb7792..787e66b 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -29,8 +29,8 @@
 #include zend_vm.h
 #include zend_dtrace.h
 
-zend_class_entry *default_exception_ce;
-zend_class_entry *error_exception_ce;
+static zend_class_entry *default_exception_ce;
+static zend_class_entry *error_exception_ce;
 static zend_object_handlers default_exception_handlers;
 ZEND_API void (*zend_throw_exception_hook)(zval *ex TSRMLS_DC);


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: make default_exception_ce and error_exception_ce static: Zend/zend_exceptions.c

2012-08-02 Thread Nuno Lopes
Commit:81369bcc2027f455d3ff8ead6d884159f2194cfd
Author:Nuno Lopes nlop...@php.net Thu, 2 Aug 2012 11:44:15 +0100
Parents:   3ac50cfe3f6fb825298e3d81ec1a527d9e2a3e5d
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=81369bcc2027f455d3ff8ead6d884159f2194cfd

Log:
make default_exception_ce and error_exception_ce static

Changed paths:
  M  Zend/zend_exceptions.c


Diff:
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 7bb7792..787e66b 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -29,8 +29,8 @@
 #include zend_vm.h
 #include zend_dtrace.h
 
-zend_class_entry *default_exception_ce;
-zend_class_entry *error_exception_ce;
+static zend_class_entry *default_exception_ce;
+static zend_class_entry *error_exception_ce;
 static zend_object_handlers default_exception_handlers;
 ZEND_API void (*zend_throw_exception_hook)(zval *ex TSRMLS_DC);


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed invalid read in CONST_STRING dereference, reported by Nikic: Zend/zend_language_parser.y

2012-07-25 Thread Nuno Lopes

test case?
merge to other branches?


Quoting Xinchen Hui larue...@php.net:


Commit:ba568aaebb3f3c788a5551c016c0afafd7a5502e
Author:Xinchen Hui larue...@php.net Thu, 26 Jul 2012  
00:29:39 +0800

Parents:   0fbc8561e687689f796d95584cea1fa959eee83b
Branches:  master

Link:
http://git.php.net/?p=php-src.git;a=commitdiff;h=ba568aaebb3f3c788a5551c016c0afafd7a5502e


Log:
Fixed invalid read in CONST_STRING dereference, reported by Nikic

Changed paths:
  M  Zend/zend_language_parser.y


Diff:
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index e397fe1..c88e9a7 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -802,7 +802,7 @@ expr_without_variable:
 combined_scalar_offset:
 	  combined_scalar '[' dim_offset ']' {  
zend_do_begin_variable_parse(TSRMLS_C); fetch_array_dim($$, $1,  
$3 TSRMLS_CC); }
 	| combined_scalar_offset '[' dim_offset ']' { fetch_array_dim($$,  
$1, $3 TSRMLS_CC); }
-| T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' {  
zend_do_begin_variable_parse(TSRMLS_C); fetch_array_dim($$, $1,  
$3 TSRMLS_CC); }
+| T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' { $1.EA = 0;  
zend_do_begin_variable_parse(TSRMLS_C); fetch_array_dim($$, $1,  
$3 TSRMLS_CC); }


 combined_scalar:
   T_ARRAY '(' array_pair_list ')' { $$ = $3; }



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed invalid read in CONST_STRING dereference, reported by Nikic: Zend/zend_language_parser.y

2012-07-25 Thread Nuno Lopes

Quoting Nikita Popov nikita@gmail.com:


On Wed, Jul 25, 2012 at 7:22 PM, Nuno Lopes nlop...@php.net wrote:

test case?


The test for this was already in the code base. It was just failing in
some situations and was generating valgrind warnings when run with -m.


merge to other branches?


Constant dereferencing is only available on master, so it doesn't
apply to other branches :)


Ok!
But, did we have a report about this on http://gcov.php.net ?

Nuno

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed invalid read in CONST_STRING dereference, reported by Nikic: Zend/zend_language_parser.y

2012-07-25 Thread Nuno Lopes

Quoting Nikita Popov nikita@gmail.com:


On Wed, Jul 25, 2012 at 7:32 PM, Nuno Lopes nlop...@php.net wrote:

Ok!
But, did we have a report about this on http://gcov.php.net ?


Yep, the valgrind report is also on gcov:
http://gcov.php.net/viewer.php?version=PHP_HEADfunc=valgrindfile=Zend%2Ftests%2Fconst_dereference_002.phpt

Nikita :)


cool!
Next time please provide more information on the commit message so  
that I don't have to bug you :)


Thanks,
Nuno

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: fix for bug#18556 - use simple tolower() function for internal things: Zend/zend_operators.c ext/standard/string.c

2012-07-14 Thread Nuno Lopes

Hi,

Just a few minor nitpicks:


+static unsigned char tolower_map[256] = {


This should be const.



+#define zend_tolower_ascii(c) (tolower_map[(c)])


I suggest casting to unsigned char to prevent overflows and negative chars 
problems (128-255):

#define zend_tolower_ascii(c) (tolower_map[(unsigned char)(c)])



+ *result++ = zend_tolower_ascii((int)*str++);


The cast to int is not necessary. Same comment applies for most other calls.

And thanks for fixing this ancient bug :)

Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Fixed bug #62477 LimitIterator int overflow: ext/spl/spl_iterators.c ext/spl/spl_iterators.h ext/spl/tests/bug62477_1.phpt ext/spl/tests/bug62477_2.phpt

2012-07-14 Thread Nuno Lopes
Truncating the number is the right way to do it (as far as PHP semantics 
goes). It's consistent across all PHP functions that take integers as input.

Nuno

-Original Message- 
From: Anatoliy Belsky

Sent: Thursday, July 12, 2012 8:50 AM
To: Nikita Popov ; Stas Malyshev
Cc: php-cvs@lists.php.net
Subject: Re: [PHP-CVS] com php-src: Fixed bug #62477 LimitIterator int 
overflow: ext/spl/spl_iterators.c ext/spl/spl_iterators.h 
ext/spl/tests/bug62477_1.phpt ext/spl/tests/bug62477_2.phpt


Hi guys,

as it stands the ticket, the user has implemented an iterator which easily
accepts floats for seek and other iterator methods. Normal iterator can
only work with integers as all the storage for positions is long or int.
As result a statement like this

new LimitIterator(new ArrayIterator(array(42)), 1000);

will just convert that big float to some integer, so the original iterator
wouldn't work properly.

This is of course not the case with iterators implemented internally in
SPL as they only work with long (ulong for instance with the
ArrayIterator). But any user space iterators might break this. Just like
in the ticket the iterator itself works as expected and gives

100
101
102

Where passing it to the LimitIterator gives back

1410065408
1410065409
1410065410

Also please consider the fact that the documentation states both start and
offset params of the LimitIterator as int.

I'm on the way to revert this, but the issue stays. May be the patch
should be just extended to check if it's a numeric string and try to
convert it. The same for a float - check if it overflows the integer
range.

Or how would you solve this?

Regards

Anatoliy

Am Mi, 11.07.2012, 23:25 schrieb Nikita Popov:

Hi Anatoliy!

I'm not sure that this change is right. As it is now one could no
longer pass in 123 (as a string) or 123.0 (as a float) as
limit/offset. This goes against usual PHP semantics.

Also I'm not exactly sure what the problem was in the first place.

Nikita

On Wed, Jul 11, 2012 at 10:25 PM, Anatoliy Belsky a...@php.net wrote:

Commit:b383ddf1e5175abf1d000e887961fdcebae646a0
Author:Anatoliy Belsky a...@php.net Wed, 11 Jul 2012
22:25:31 +0200
Parents:   bcf5853eaa8b8be793d4a1bd325eaea68cfe57bb
Branches:  PHP-5.3 PHP-5.4 master

Link:
http://git.php.net/?p=php-src.git;a=commitdiff;h=b383ddf1e5175abf1d000e887961fdcebae646a0

Log:
Fixed bug #62477 LimitIterator int overflow

Bugs:
https://bugs.php.net/62477

Changed paths:
  M  ext/spl/spl_iterators.c
  M  ext/spl/spl_iterators.h
  A  ext/spl/tests/bug62477_1.phpt
  A  ext/spl/tests/bug62477_2.phpt


Diff:
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index eecd483..1cbb2e4 100755
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -1380,12 +1380,31 @@ static spl_dual_it_object*
spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z
intern-dit_type = dit_type;
switch (dit_type) {
case DIT_LimitIterator: {
+   zval *tmp_offset, *tmp_count;
intern-u.limit.offset = 0; /* start at
beginning */
intern-u.limit.count = -1; /* get all */
-   if (zend_parse_parameters(ZEND_NUM_ARGS()
TSRMLS_CC, O|ll, zobject, ce_inner, intern-u.limit.offset,
intern-u.limit.count) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS()
TSRMLS_CC, O|zz, zobject, ce_inner, tmp_offset, tmp_count) ==
FAILURE) {

zend_restore_error_handling(error_handling
TSRMLS_CC);
return NULL;
}
+   if (tmp_offset  Z_TYPE_P(tmp_offset) !=
IS_NULL) {
+   if (Z_TYPE_P(tmp_offset) != IS_LONG) {
+
zend_throw_exception(spl_ce_OutOfRangeException, offset param must be
of type int, 0 TSRMLS_CC);
+
zend_restore_error_handling(error_handling TSRMLS_CC);
+   return NULL;
+   } else {
+   intern-u.limit.offset =
Z_LVAL_P(tmp_offset);
+   }
+   }
+   if (tmp_count  Z_TYPE_P(tmp_count) != IS_NULL)
{
+   if (Z_TYPE_P(tmp_count) != IS_LONG) {
+
zend_throw_exception(spl_ce_OutOfRangeException, count param must be of
type int, 0 TSRMLS_CC);
+
zend_restore_error_handling(error_handling TSRMLS_CC);
+   return NULL;
+   } else {
+   intern-u.limit.count =
Z_LVAL_P(tmp_count);
+   }
+   }
if (intern-u.limit.offset  0) {

zend_throw_exception(spl_ce_OutOfRangeException,
Parameter offset must be = 0, 0
TSRMLS_CC);

zend_restore_error_handling(error_handling
TSRMLS_CC);
diff --git a/ext/spl/spl_iterators.h b/ext/spl/spl_iterators.h
index 

Re: [PHP-CVS] com php-src: improve code in zend_operators: Zend/zend_operators.c

2012-07-14 Thread Nuno Lopes

Thanks :)
Nuno

-Original Message- 
From: Stanislav Malyshev

Sent: Sunday, July 15, 2012 5:06 AM
To: php-cvs@lists.php.net
Subject: [PHP-CVS] com php-src: improve code in zend_operators: 
Zend/zend_operators.c


Commit:efdb7ce4b01c71f2de1a0de13ffe1a112c7449b0
Author:Stanislav Malyshev s...@php.net Sat, 14 Jul 2012 
21:06:40 -0700

Parents:   455f3de80267b68fc4d319275c3ca1cc46a44bb3
Branches:  master

Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=efdb7ce4b01c71f2de1a0de13ffe1a112c7449b0


Log:
improve code in zend_operators

Changed paths:
 M  Zend/zend_operators.c


Diff:
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 8805eb2..93dca94 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -42,7 +42,7 @@ static _locale_t current_locale = NULL;

#define TYPE_PAIR(t1,t2) (((t1)  4) | (t2))

-static unsigned char tolower_map[256] = {
+static const unsigned char tolower_map[256] = {
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,
0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
@@ -61,7 +61,7 @@ static unsigned char tolower_map[256] = {
0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff
};

-#define zend_tolower_ascii(c) (tolower_map[(c)])
+#define zend_tolower_ascii(c) (tolower_map[(unsigned char)(c)])

/**
 * Functions using locale lowercase:
@@ -1945,7 +1945,7 @@ ZEND_API char *zend_str_tolower_copy(char *dest, const 
char *source, unsigned in

 register unsigned char *end = str + length;

 while (str  end) {
- *result++ = zend_tolower_ascii((int)*str++);
+ *result++ = zend_tolower_ascii(*str++);
 }
 *result = '\0';

@@ -1965,7 +1965,7 @@ ZEND_API void zend_str_tolower(char *str, unsigned int 
length) /* {{{ */

 register unsigned char *end = p + length;

 while (p  end) {
- *p = zend_tolower_ascii((int)*p);
+ *p = zend_tolower_ascii(*p);
 p++;
 }
}
@@ -2014,8 +2014,8 @@ ZEND_API int zend_binary_strcasecmp(const char *s1, 
uint len1, const char *s2, u


 len = MIN(len1, len2);
 while (len--) {
- c1 = zend_tolower_ascii((int)*(unsigned char *)s1++);
- c2 = zend_tolower_ascii((int)*(unsigned char *)s2++);
+ c1 = zend_tolower_ascii(*(unsigned char *)s1++);
+ c2 = zend_tolower_ascii(*(unsigned char *)s2++);
 if (c1 != c2) {
 return c1 - c2;
 }
@@ -2035,8 +2035,8 @@ ZEND_API int zend_binary_strncasecmp(const char *s1, 
uint len1, const char *s2,

 }
 len = MIN(length, MIN(len1, len2));
 while (len--) {
- c1 = zend_tolower_ascii((int)*(unsigned char *)s1++);
- c2 = zend_tolower_ascii((int)*(unsigned char *)s2++);
+ c1 = zend_tolower_ascii(*(unsigned char *)s1++);
+ c2 = zend_tolower_ascii(*(unsigned char *)s2++);
 if (c1 != c2) {
 return c1 - c2;
 } 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: appease MSVC (doesnt like unary minus of unsigned ints): Zend/zend_hash.h

2012-07-08 Thread Nuno Lopes
Commit:e6d9cd983b3503d38389d0c67267c773a98af174
Author:Nuno Lopes nlop...@php.net Sun, 8 Jul 2012 15:19:41 -0400
Parents:   a76878cd594e5b8160800abb9e21cc25cb264d7f
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e6d9cd983b3503d38389d0c67267c773a98af174

Log:
appease MSVC (doesnt like unary minus of unsigned ints)

Changed paths:
  M  Zend/zend_hash.h


Diff:
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
index 5c3b1cd..1bd6439 100644
--- a/Zend/zend_hash.h
+++ b/Zend/zend_hash.h
@@ -330,7 +330,7 @@ END_EXTERN_C()
if (idx-1  LONG_MAX) { /* overflow */  
\
break;  
\
}   
\
-   idx = -idx; 
\
+   idx = 0 - idx;  
\
} else if (idx  LONG_MAX) { /* overflow */ 
\
break;  
\
}   
\


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: appease MSVC (doesnt like unary minus of unsigned ints): Zend/zend_hash.h

2012-07-08 Thread Nuno Lopes
Commit:5910d8d4f499bf84bcaa1161bd0b89c15a19a304
Author:Nuno Lopes nlop...@php.net Sun, 8 Jul 2012 15:19:41 -0400
Parents:   2019062cfc6e4b4832aaca3b73891d93adc115a8
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=5910d8d4f499bf84bcaa1161bd0b89c15a19a304

Log:
appease MSVC (doesnt like unary minus of unsigned ints)

Changed paths:
  M  Zend/zend_hash.h


Diff:
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
index 5c3b1cd..1bd6439 100644
--- a/Zend/zend_hash.h
+++ b/Zend/zend_hash.h
@@ -330,7 +330,7 @@ END_EXTERN_C()
if (idx-1  LONG_MAX) { /* overflow */  
\
break;  
\
}   
\
-   idx = -idx; 
\
+   idx = 0 - idx;  
\
} else if (idx  LONG_MAX) { /* overflow */ 
\
break;  
\
}   
\


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: appease MSVC (doesnt like unary minus of unsigned ints): Zend/zend_hash.h

2012-07-08 Thread Nuno Lopes
Commit:b2b018d5f7d0d7a0bc88e6a95fe804c39bd65b9a
Author:Nuno Lopes nlop...@php.net Sun, 8 Jul 2012 15:19:41 -0400
Parents:   26b37f1792dfaf9b0b30f81e492c8f68b9ece571
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=b2b018d5f7d0d7a0bc88e6a95fe804c39bd65b9a

Log:
appease MSVC (doesnt like unary minus of unsigned ints)

Changed paths:
  M  Zend/zend_hash.h


Diff:
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
index a763fc7..81146e9 100644
--- a/Zend/zend_hash.h
+++ b/Zend/zend_hash.h
@@ -331,7 +331,7 @@ END_EXTERN_C()
if (idx-1  LONG_MAX) { /* overflow */  
\
break;  
\
}   
\
-   idx = -idx; 
\
+   idx = 0 - idx;  
\
} else if (idx  LONG_MAX) { /* overflow */ 
\
break;  
\
}   
\


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-08 Thread Nuno Lopes
Ok. I don 't have a MSVC setup handy. Can you please test if replacing 
that

line with 'idx = 0 - idx;' fixes the warnings for you?


Seems to do the trick. Is 0- same as - for unsigned on all compilers (I
know common sense says it should be but when compilers are concerned
it's better to be sure :)


Yes, it's equivalent. For subtle reasons which I'll save you from, but it is 
:)

I've committed the fix. Thanks for your help!

Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-04 Thread Nuno Lopes

Hi!


Commit:91ce8041a3e85594e81466a528f8d55cdc164c1f
Author:Nuno Lopes nlop...@php.net Mon, 2 Jul 2012 
01:31:40 -0400

Parents:   be4053cea0462c9de5396641f4e4fa2f56f5a675
Branches:  PHP-5.4

Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=91ce8041a3e85594e81466a528f8d55cdc164c1f


Log:
fix (signed) integer overflow (part of bug #52550


BTW, this generates huge amount of unary minus applied to unsigned
warnings on Windows, may be a good idea to fix that.


Ok. I don 't have a MSVC setup handy. Can you please test if replacing that 
line with 'idx = 0 - idx;' fixes the warnings for you?


Thanks,
Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-02 Thread Nuno Lopes
In that code path, it's possible that idx == LONG_MAX+1. Casting that value 
to a signed long is undefined behavior (since it overflows), which means 
that the compiler can do bad things with that.
With this patch we will basically do the same operation, but over an 
unsigned long, thus avoiding the undefined behavior of signed integers.

This patch prevents miscompilations by more aggressive compilers.

Nuno


-Original Message-
Hi!

Could you please explain this commit? idx is ulong, why this change
improves anything?


Commit:91ce8041a3e85594e81466a528f8d55cdc164c1f
Author:Nuno Lopes nlop...@php.net Mon, 2 Jul 2012 
01:31:40 -0400

Parents:   be4053cea0462c9de5396641f4e4fa2f56f5a675
Branches:  PHP-5.4

Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=91ce8041a3e85594e81466a528f8d55cdc164c1f


Log:
fix (signed) integer overflow (part of bug #52550

Bugs:
https://bugs.php.net/52550

Changed paths:
  M  Zend/zend_hash.h


Diff:
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
index 84ca1de..5c3b1cd 100644
--- a/Zend/zend_hash.h
+++ b/Zend/zend_hash.h
@@ -330,7 +330,7 @@ END_EXTERN_C()
 if (idx-1  LONG_MAX) { /* overflow */ \
 break; \
 } \
- idx = (ulong)(-(long)idx); \
+ idx = -idx;   \
 } else if (idx  LONG_MAX) { /* overflow */ \
 break; \
 } \



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-01 Thread Nuno Lopes
Commit:f2bf98a589b63ea6e604036eb6ab02aba5fce5ef
Author:Nuno Lopes nlop...@php.net Mon, 2 Jul 2012 01:31:40 -0400
Parents:   8d81a03e434e5476c4c7832b8bcafcaa31fb474e
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=f2bf98a589b63ea6e604036eb6ab02aba5fce5ef

Log:
fix (signed) integer overflow (part of bug #52550

Bugs:
https://bugs.php.net/52550

Changed paths:
  M  Zend/zend_hash.h


Diff:
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
index 84ca1de..5c3b1cd 100644
--- a/Zend/zend_hash.h
+++ b/Zend/zend_hash.h
@@ -330,7 +330,7 @@ END_EXTERN_C()
if (idx-1  LONG_MAX) { /* overflow */  
\
break;  
\
}   
\
-   idx = (ulong)(-(long)idx);  
\
+   idx = -idx; 
\
} else if (idx  LONG_MAX) { /* overflow */ 
\
break;  
\
}   
\


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-01 Thread Nuno Lopes
Commit:d80ff391899f7aead3b9b9c6c084adba8a8203ba
Author:Nuno Lopes nlop...@php.net Mon, 2 Jul 2012 01:31:40 -0400
Parents:   250393f92523fffe643df06a1de2101fd50a327e
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=d80ff391899f7aead3b9b9c6c084adba8a8203ba

Log:
fix (signed) integer overflow (part of bug #52550

Bugs:
https://bugs.php.net/52550

Changed paths:
  M  Zend/zend_hash.h


Diff:
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
index ad0f9f7..a763fc7 100644
--- a/Zend/zend_hash.h
+++ b/Zend/zend_hash.h
@@ -331,7 +331,7 @@ END_EXTERN_C()
if (idx-1  LONG_MAX) { /* overflow */  
\
break;  
\
}   
\
-   idx = (ulong)(-(long)idx);  
\
+   idx = -idx; 
\
} else if (idx  LONG_MAX) { /* overflow */ 
\
break;  
\
}   
\


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-01 Thread Nuno Lopes
Commit:91ce8041a3e85594e81466a528f8d55cdc164c1f
Author:Nuno Lopes nlop...@php.net Mon, 2 Jul 2012 01:31:40 -0400
Parents:   be4053cea0462c9de5396641f4e4fa2f56f5a675
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=91ce8041a3e85594e81466a528f8d55cdc164c1f

Log:
fix (signed) integer overflow (part of bug #52550

Bugs:
https://bugs.php.net/52550

Changed paths:
  M  Zend/zend_hash.h


Diff:
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
index 84ca1de..5c3b1cd 100644
--- a/Zend/zend_hash.h
+++ b/Zend/zend_hash.h
@@ -330,7 +330,7 @@ END_EXTERN_C()
if (idx-1  LONG_MAX) { /* overflow */  
\
break;  
\
}   
\
-   idx = (ulong)(-(long)idx);  
\
+   idx = -idx; 
\
} else if (idx  LONG_MAX) { /* overflow */ 
\
break;  
\
}   
\


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: remove remaining traces of unicode.* ini settings: ext/soap/tests/bugs/bug47273.phpt ext/standard/tests/array/compact.phpt ext/standard/tests/array/locale_sort.phpt run-tests.ph

2012-05-27 Thread Nuno Lopes
Commit:af2d6a63bf6a187a68164a3cc3384539357ac7b8
Author:Nuno Lopes nlop...@php.net Sun, 27 May 2012 19:57:34 -0400
Parents:   61a13773bcbf761ecc03faa99877d3cac90529a0
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=af2d6a63bf6a187a68164a3cc3384539357ac7b8

Log:
remove remaining traces of unicode.* ini settings

Changed paths:
  M  ext/soap/tests/bugs/bug47273.phpt
  M  ext/standard/tests/array/compact.phpt
  M  ext/standard/tests/array/locale_sort.phpt
  M  run-tests.php


Diff:
diff --git a/ext/soap/tests/bugs/bug47273.phpt 
b/ext/soap/tests/bugs/bug47273.phpt
index 174948f..1cfb0f3 100644
--- a/ext/soap/tests/bugs/bug47273.phpt
+++ b/ext/soap/tests/bugs/bug47273.phpt
@@ -2,9 +2,6 @@
 Bug #47273 (Encoding bug in SoapServer-fault)
 --SKIPIF--
 ?php require_once('skipif.inc'); ?
---INI--
-unicode.script_encoding=ISO-8859-1
-unicode.output_encoding=ISO-8859-1
 --FILE--
 ?php
 $request1 = EOF
diff --git a/ext/standard/tests/array/compact.phpt 
b/ext/standard/tests/array/compact.phpt
index 4b4bfbb..02df44e 100644
--- a/ext/standard/tests/array/compact.phpt
+++ b/ext/standard/tests/array/compact.phpt
@@ -1,8 +1,5 @@
 --TEST--
 compact()
---INI--
-unicode.script_encoding=UTF-8
-unicode.output_encoding=UTF-8
 --FILE--
 ?php
 
diff --git a/ext/standard/tests/array/locale_sort.phpt 
b/ext/standard/tests/array/locale_sort.phpt
index 1db9604..c2f66c0 100644
--- a/ext/standard/tests/array/locale_sort.phpt
+++ b/ext/standard/tests/array/locale_sort.phpt
@@ -9,9 +9,6 @@ if (false == setlocale(LC_CTYPE, fr_FR.ISO8859-1, fr_FR)) {
   die(skip setlocale() failed\n);
 }
 ?
---INI--
-unicode.script_encoding=ISO8859-1
-unicode.output_encoding=ISO8859-1
 --FILE--
 ?php
 setlocale(LC_ALL, 'fr_FR.ISO8859-1', 'fr_FR');
diff --git a/run-tests.php b/run-tests.php
index 1fe0deb..929de4a 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -239,10 +239,6 @@ $ini_overwrites = array(
'magic_quotes_runtime=0',
'ignore_repeated_errors=0',
'precision=14',
-   'unicode.runtime_encoding=ISO-8859-1',
-   'unicode.script_encoding=UTF-8',
-   'unicode.output_encoding=UTF-8',
-   'unicode.from_error_mode=U_INVALID_SUBSTITUTE',
);
 
 function write_information($show_html)


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: 128 MB is enough for everyone (TM): run-tests.php

2012-05-27 Thread Nuno Lopes
Commit:77b086f3f0a2207386289b8acf5717d42037ee0d
Author:Nuno Lopes nlop...@php.net Sun, 27 May 2012 20:03:58 -0400
Parents:   c5d054d3a5fc5cb3ec59fe9205e5dcb3ed8ff0ab
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=77b086f3f0a2207386289b8acf5717d42037ee0d

Log:
128 MB is enough for everyone (TM)

this is an initial tentative to avoid some testcases go crazy and consume 16 GB 
of memory. Additional measures will have to be taken if the problem persists.
Please patch individual tests that really require more than 128MB of memory

Changed paths:
  M  run-tests.php


Diff:
diff --git a/run-tests.php b/run-tests.php
index 929de4a..2b37ec4 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -239,6 +239,7 @@ $ini_overwrites = array(
'magic_quotes_runtime=0',
'ignore_repeated_errors=0',
'precision=14',
+   'memory_limit=128M',
);
 
 function write_information($show_html)


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: sync with HEAD: run-tests.php

2012-05-27 Thread Nuno Lopes
Commit:72911237b55d9eaaa48a046cbd7cbc4c195c1ee3
Author:Nuno Lopes nlop...@php.net Sun, 27 May 2012 20:13:09 -0400
Parents:   2f7bd57f930bcfdc97b7472fbe6a502cafdc5a59
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=72911237b55d9eaaa48a046cbd7cbc4c195c1ee3

Log:
sync with HEAD

Changed paths:
  M  run-tests.php


Diff:
diff --git a/run-tests.php b/run-tests.php
index 1fe0deb..2b37ec4 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -239,10 +239,7 @@ $ini_overwrites = array(
'magic_quotes_runtime=0',
'ignore_repeated_errors=0',
'precision=14',
-   'unicode.runtime_encoding=ISO-8859-1',
-   'unicode.script_encoding=UTF-8',
-   'unicode.output_encoding=UTF-8',
-   'unicode.from_error_mode=U_INVALID_SUBSTITUTE',
+   'memory_limit=128M',
);
 
 function write_information($show_html)


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: sync with HEAD: run-tests.php

2012-05-27 Thread Nuno Lopes
Commit:339508d6ace868b022cd59f20630e3218e52732a
Author:Nuno Lopes nlop...@php.net Sun, 27 May 2012 20:14:31 -0400
Parents:   773e85a788de7dc557201d4af2cb10250c049052
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=339508d6ace868b022cd59f20630e3218e52732a

Log:
sync with HEAD

Changed paths:
  M  run-tests.php


Diff:
diff --git a/run-tests.php b/run-tests.php
index 1fe0deb..2b37ec4 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -239,10 +239,7 @@ $ini_overwrites = array(
'magic_quotes_runtime=0',
'ignore_repeated_errors=0',
'precision=14',
-   'unicode.runtime_encoding=ISO-8859-1',
-   'unicode.script_encoding=UTF-8',
-   'unicode.output_encoding=UTF-8',
-   'unicode.from_error_mode=U_INVALID_SUBSTITUTE',
+   'memory_limit=128M',
);
 
 function write_information($show_html)


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: add support for the alloc_size __attribute__ (through ZEND_ATTRIBUTE_ALLOC_SIZE and ZEND_ATTRIBUTE_ALLOC_SIZE2: Zend/zend.h Zend/zend_alloc.c Zend/zend_alloc.h

2012-05-23 Thread Nuno Lopes
Commit:58d2203317865bfaebec801d41e57988a3e46683
Author:Nuno Lopes nlop...@php.net Wed, 23 May 2012 22:18:01 -0400
Parents:   8208462fc1ffcc575aa631ffb4cda22e2247521a
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=58d2203317865bfaebec801d41e57988a3e46683

Log:
add support for the alloc_size __attribute__ (through ZEND_ATTRIBUTE_ALLOC_SIZE 
and ZEND_ATTRIBUTE_ALLOC_SIZE2

requires GCC = 4.3 or clang = 3.2 to perform anything useful

Changed paths:
  M  Zend/zend.h
  M  Zend/zend_alloc.c
  M  Zend/zend_alloc.h


Diff:
diff --git a/Zend/zend.h b/Zend/zend.h
index 3226f8c..39bf5be 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -133,6 +133,11 @@ char *alloca ();
 # endif
 #endif
 
+/* Compatibility with non-clang compilers */
+#ifndef __has_attribute
+# define __has_attribute(x) 0
+#endif
+
 /* GCC x.y.z supplies __GNUC__ = x and __GNUC_MINOR__ = y */
 #ifdef __GNUC__
 # define ZEND_GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
@@ -146,6 +151,14 @@ char *alloca ();
 # define ZEND_ATTRIBUTE_MALLOC
 #endif
 
+#if ZEND_GCC_VERSION = 4003 || __has_attribute(alloc_size)
+# define ZEND_ATTRIBUTE_ALLOC_SIZE(X) __attribute__ ((alloc_size(X)))
+# define ZEND_ATTRIBUTE_ALLOC_SIZE2(X,Y) __attribute__ ((alloc_size(X,Y)))
+#else
+# define ZEND_ATTRIBUTE_ALLOC_SIZE(X)
+# define ZEND_ATTRIBUTE_ALLOC_SIZE2(X,Y)
+#endif
+
 #if ZEND_GCC_VERSION = 2007
 # define ZEND_ATTRIBUTE_FORMAT(type, idx, first) __attribute__ ((format(type, 
idx, first)))
 #else
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 66cd23c..a29350d 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -658,9 +658,9 @@ static unsigned int _mem_block_end_magic   = 0;
 
 #define ZEND_MM_LARGE_BUCKET_INDEX(S) zend_mm_high_bit(S)
 
-static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size 
ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
+static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size 
ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC 
ZEND_ATTRIBUTE_ALLOC_SIZE(2);
 static void _zend_mm_free_int(zend_mm_heap *heap, void *p ZEND_FILE_LINE_DC 
ZEND_FILE_LINE_ORIG_DC);
-static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size 
ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
+static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size 
ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_ALLOC_SIZE(3);
 
 static inline unsigned int zend_mm_high_bit(size_t _size)
 {
diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h
index b8b800e..6b071c2 100644
--- a/Zend/zend_alloc.h
+++ b/Zend/zend_alloc.h
@@ -54,12 +54,12 @@ BEGIN_EXTERN_C()
 
 ZEND_API char *zend_strndup(const char *s, unsigned int length) 
ZEND_ATTRIBUTE_MALLOC;
 
-ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) 
ZEND_ATTRIBUTE_MALLOC;
+ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) 
ZEND_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_ALLOC_SIZE(1);
 ZEND_API void *_safe_emalloc(size_t nmemb, size_t size, size_t offset 
ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
 ZEND_API void *_safe_malloc(size_t nmemb, size_t size, size_t offset) 
ZEND_ATTRIBUTE_MALLOC;
 ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
-ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC 
ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
-ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure 
ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
+ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC 
ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_ALLOC_SIZE2(1,2);
+ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure 
ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_ALLOC_SIZE(2);
 ZEND_API void *_safe_erealloc(void *ptr, size_t nmemb, size_t size, size_t 
offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
 ZEND_API void *_safe_realloc(void *ptr, size_t nmemb, size_t size, size_t 
offset);
 ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC 
ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] Re: com php-src: Implemented FR #61602 Allow access to name of constant used as

2012-05-22 Thread Nuno Lopes

Commit:054f3e3ce5af13c2c3a6ccd54f7dc3e2f6cd4f74
Author:reeze reeze@gmail.com Tue, 3 Apr 2012 13:47:16 +0800
Parents:   3bf53aa911e1e2128a11aee45c126000635de006
Branches:  PHP-5.4 master

Link:
http://git.php.net/?p=php-src.git;a=commitdiff;h=054f3e3ce5af13c2c3a6ccd54f7dc3e2f6cd4f74


Log:
Implemented FR #61602 Allow access to name of constant used as default value

Bugs:
https://bugs.php.net/61602

diff --git a/ext/reflection/php_reflection.c  
b/ext/reflection/php_reflection.c

index 1cf65ce..ef1ed7e 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1457,6 +1457,57 @@ static void  
_reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c

 }
 /* }}} */
 +/* {{{ _reflection_param_get_default_param */
+static parameter_reference  
*_reflection_param_get_default_param(INTERNAL_FUNCTION_PARAMETERS)

+{
+   reflection_object *intern;
+   parameter_reference *param;
+
+   if (zend_parse_parameters_none() == FAILURE) {
+   return NULL;
+   }
+
+   GET_REFLECTION_OBJECT_PTR(param);


You cannot use GET_REFLECTION_OBJECT_PTR here because it has a  
'return;' statement (i.e., without a return value). While gcc accepts  
this (but issues a warning), it's considered an error in C99, and it  
breaks the build with other compilers.

Please either fix it or revert the patch.

Nuno

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix stack overflow in php_intlog10abs(): ext/standard/math.c

2012-05-11 Thread Nuno Lopes
Commit:5c87ca2d2770e18c385d4b770123b9b21eeaa053
Author:Nuno Lopes nlop...@php.net Fri, 11 May 2012 12:50:29 -0400
Parents:   d0d7340d50f178691c8e436391168cf6cc1fea3e
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=5c87ca2d2770e18c385d4b770123b9b21eeaa053

Log:
fix stack overflow in php_intlog10abs()

bug uncovered by LLVM/clang's new -fbounds-checking switch
this patch fixes a crash in ext/standard/tests/math/round_large_exp.phpt

Changed paths:
  M  ext/standard/math.c


Diff:
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 302fbda..65187f6 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -37,7 +37,7 @@ static inline int php_intlog10abs(double value) {
int result;
value = fabs(value);
 
-   if (value  1e-8 || value  1e23) {
+   if (value  1e-8 || value  1e22) {
result = (int)floor(log10(value));
} else {
static const double values[] = {
@@ -46,7 +46,7 @@ static inline int php_intlog10abs(double value) {
1e8,  1e9,  1e10, 1e11, 1e12, 1e13, 1e14, 1e15,
1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22};
/* Do a binary search with 5 steps */
-   result = 16;
+   result = 15;
if (value  values[result]) {
result -= 8;
} else {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix stack overflow in php_intlog10abs(): ext/standard/math.c

2012-05-11 Thread Nuno Lopes
Commit:8b4b70df56e14be0f7172b5cc5f8da44b3272ac3
Author:Nuno Lopes nlop...@php.net Fri, 11 May 2012 12:50:29 -0400
Parents:   4458f3bcf65e5826f4cfb8ffd00cd3b8161f37bd
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=8b4b70df56e14be0f7172b5cc5f8da44b3272ac3

Log:
fix stack overflow in php_intlog10abs()

bug uncovered by LLVM/clang's new -fbounds-checking switch
this patch fixes a crash in ext/standard/tests/math/round_large_exp.phpt

Changed paths:
  M  ext/standard/math.c


Diff:
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 302fbda..65187f6 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -37,7 +37,7 @@ static inline int php_intlog10abs(double value) {
int result;
value = fabs(value);
 
-   if (value  1e-8 || value  1e23) {
+   if (value  1e-8 || value  1e22) {
result = (int)floor(log10(value));
} else {
static const double values[] = {
@@ -46,7 +46,7 @@ static inline int php_intlog10abs(double value) {
1e8,  1e9,  1e10, 1e11, 1e12, 1e13, 1e14, 1e15,
1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22};
/* Do a binary search with 5 steps */
-   result = 16;
+   result = 15;
if (value  values[result]) {
result -= 8;
} else {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: fix stack overflow in php_intlog10abs(): ext/standard/math.c

2012-05-11 Thread Nuno Lopes
Commit:950d5ee590214742799836d3d939ee59f641bdf4
Author:Nuno Lopes nlop...@php.net Fri, 11 May 2012 12:50:29 -0400
Parents:   81ba6b14c7b1b934f4d3e2896f861a42b07aa838
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=950d5ee590214742799836d3d939ee59f641bdf4

Log:
fix stack overflow in php_intlog10abs()

bug uncovered by LLVM/clang's new -fbounds-checking switch
this patch fixes a crash in ext/standard/tests/math/round_large_exp.phpt

Changed paths:
  M  ext/standard/math.c


Diff:
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 21c730c..749c77c 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -37,7 +37,7 @@ static inline int php_intlog10abs(double value) {
int result;
value = fabs(value);
 
-   if (value  1e-8 || value  1e23) {
+   if (value  1e-8 || value  1e22) {
result = (int)floor(log10(value));
} else {
static const double values[] = {
@@ -46,7 +46,7 @@ static inline int php_intlog10abs(double value) {
1e8,  1e9,  1e10, 1e11, 1e12, 1e13, 1e14, 1e15,
1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22};
/* Do a binary search with 5 steps */
-   result = 16;
+   result = 15;
if (value  values[result]) {
result -= 8;
} else {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Make css string constant: sapi/cli/php_cli_server.c

2012-04-21 Thread Nuno Lopes

Thanks!
Nuno

- Original Message - 
From: Xinchen Hui larue...@php.net

To: php-cvs@lists.php.net
Sent: Saturday, April 21, 2012 2:31 AM
Subject: [PHP-CVS] com php-src: Make css string constant: 
sapi/cli/php_cli_server.c



Commit:b999e91f5bd0f366d67f18badc02c910729e8a08
Author:Xinchen Hui larue...@php.net Sat, 21 Apr 2012 09:31:00 
+0800

Parents:   da85337d13075885f165eeed820181be20d397b9
Branches:  PHP-5.4

Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=b999e91f5bd0f366d67f18badc02c910729e8a08


Log:
Make css string constant

Changed paths:
 M  sapi/cli/php_cli_server.c


Diff:
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 105fd60..a3ed390 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -276,7 +276,7 @@ ZEND_DECLARE_MODULE_GLOBALS(cli_server);
/* {{{ static char php_cli_server_css[]
 * copied from ext/standard/info.c
 */
-static char php_cli_server_css[] = style type=\text/css\\n \
+static const char php_cli_server_css[] = style type=\text/css\\n \
body {background-color: #ff; color: #00;}\n \
body, td, th, h1, h2 {font-family: sans-serif;}\n \
.center {text-align: center;}\n \


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] com php-src: Improved performance while sending error page: NEWS sapi/cli/php_cli_server.c

2012-04-20 Thread Nuno Lopes
+/* {{{ static char php_cli_server_css[] 
+ * copied from ext/standard/info.c

+ */
+static char php_cli_server_css[] = style type=\text/css\\n \



const, please!
Nuno

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Makefile.gcov branches/PHP_5_4/Makefile.gcov trunk/Makefile.gcov

2012-02-20 Thread Nuno Lopes
nlopess  Mon, 20 Feb 2012 16:01:34 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=323386

Log:
fix race condition in find (it was finding the copied files over and over 
again, and recursing forever)

Changed paths:
U   php/php-src/branches/PHP_5_3/Makefile.gcov
U   php/php-src/branches/PHP_5_4/Makefile.gcov
U   php/php-src/trunk/Makefile.gcov

Modified: php/php-src/branches/PHP_5_3/Makefile.gcov
===
--- php/php-src/branches/PHP_5_3/Makefile.gcov  2012-02-20 15:22:27 UTC (rev 
323385)
+++ php/php-src/branches/PHP_5_3/Makefile.gcov  2012-02-20 16:01:34 UTC (rev 
323386)
@@ -12,7 +12,8 @@
@rm -rf lcov_data/
@$(mkinstalldirs) lcov_data/
@echo
-   -@find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | 
sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | 
uniq | while read x; do \
+   -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name 
\*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 
's/\.da//g' | uniq` ;\
+   for x in $$files; do \
echo -n . ;\
y=`echo $$x | sed -e 's!\.libs/!!'`; \
dir=lcov_data/`dirname $$x`; \

Modified: php/php-src/branches/PHP_5_4/Makefile.gcov
===
--- php/php-src/branches/PHP_5_4/Makefile.gcov  2012-02-20 15:22:27 UTC (rev 
323385)
+++ php/php-src/branches/PHP_5_4/Makefile.gcov  2012-02-20 16:01:34 UTC (rev 
323386)
@@ -12,7 +12,8 @@
@rm -rf lcov_data/
@$(mkinstalldirs) lcov_data/
@echo
-   -@find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | 
sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | 
uniq | while read x; do \
+   -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name 
\*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 
's/\.da//g' | uniq` ;\
+   for x in $$files; do \
echo -n . ;\
y=`echo $$x | sed -e 's!\.libs/!!'`; \
dir=lcov_data/`dirname $$x`; \

Modified: php/php-src/trunk/Makefile.gcov
===
--- php/php-src/trunk/Makefile.gcov 2012-02-20 15:22:27 UTC (rev 323385)
+++ php/php-src/trunk/Makefile.gcov 2012-02-20 16:01:34 UTC (rev 323386)
@@ -14,7 +14,8 @@
@rm -rf lcov_data/
@$(mkinstalldirs) lcov_data/
@echo
-   -@find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | 
sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | 
$(EGREP) $(LCOV_INCLUDE) | uniq | while read x; do \
+   -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name 
\*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 
's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
+   for x in $$files; do \
echo -n . ;\
y=`echo $$x | sed -e 's!\.libs/!!'`; \
dir=lcov_data/`dirname $$x`; \

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ NEWS ext/standard/html.c ext/standard/tests/strings/bug60965.phpt

2012-02-05 Thread Nuno Lopes
I didn't carefully review this patch, but doesn't this code suffer from 
potential math overflow?

i.e. with strlen($input_str)  INT_MAX/2  (or UINT_MAX/2)

Nuno

- Original Message - 
From: Gustavo André dos Santos Lopes cataphr...@php.net

To: php-cvs@lists.php.net
Sent: Sunday, February 05, 2012 9:59 AM
Subject: [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ NEWS 
ext/standard/html.c ext/standard/tests/strings/bug60965.phpt




cataphract   Sun, 05 Feb 2012 09:59:33 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=323074

Log:
- Merge r323056 (see bug #60965).

Bug: https://bugs.php.net/60965 (Critical) Buffer overflow on 
htmlspecialchars/entities with $double=false


Changed paths:
   U   php/php-src/branches/PHP_5_4/NEWS
   U   php/php-src/branches/PHP_5_4/ext/standard/html.c
   A + 
php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug60965.phpt
   (from 
php/php-src/trunk/ext/standard/tests/strings/bug60965.phpt:r323056)


Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS 2012-02-05 09:58:50 UTC (rev 323073)
+++ php/php-src/branches/PHP_5_4/NEWS 2012-02-05 09:59:33 UTC (rev 323074)
@@ -1,10 +1,13 @@
PHP 
NEWS

|||
?? Feb 2012, PHP 5.4.0 RC 8
+- Core:
+  . Fixed bug #60965 (Buffer overflow on htmlspecialchars/entities with
+$double=false). (Gustavo)

02 Feb 2012, PHP 5.4.0 RC 7
- Core:
-  . Fix bug #60895 (Possible invalid handler usage in windows random
+  . Fixed bug #60895 (Possible invalid handler usage in windows random
functions). (Pierre)
  . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry)
  . Fixed (disabled) inline-caching for ZEND_OVERLOADED_FUNCTION methods.

Modified: php/php-src/branches/PHP_5_4/ext/standard/html.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/html.c 2012-02-05 09:58:50 
UTC (rev 323073)
+++ php/php-src/branches/PHP_5_4/ext/standard/html.c 2012-02-05 09:59:33 
UTC (rev 323074)

@@ -1215,7 +1215,6 @@
 size_t cursor, maxlen, len;
 char *replaced;
 enum entity_charset charset = determine_charset(hint_charset TSRMLS_CC);
- int matches_map;
 int doctype = flags  ENT_HTML_DOC_TYPE_MASK;
 entity_table_opt entity_table;
 const enc_to_uni *to_uni_table = NULL;
@@ -1253,12 +1252,14 @@
 }
 }

+ /* initial estimate */
 if (oldlen  64) {
 maxlen = 128;
 } else {
 maxlen = 2 * oldlen;
 }
- replaced = emalloc(maxlen);
+
+ replaced = emalloc(maxlen + 1);
 len = 0;
 cursor = 0;
 while (cursor  oldlen) {
@@ -1271,7 +1272,7 @@
 /* guarantee we have at least 40 bytes to write.
 * In HTML5, entities may take up to 33 bytes */
 if (len + 40  maxlen) {
- replaced = erealloc(replaced, maxlen += 128);
+ replaced = erealloc(replaced, (maxlen += 128) + 1);
 }

 if (status == FAILURE) {
@@ -1291,7 +1292,6 @@
 mbsequence = old[cursor_before];
 mbseqlen = cursor - cursor_before;
 }
- matches_map = 0;

 if (this_char != '') { /* no entity on this position */
 const unsigned char *rep = NULL;
@@ -1302,12 +1302,15 @@
 goto pass_char_through;

 if (all) { /* false that CHARSET_PARTIAL_SUPPORT(charset) */
- /* look for entity for this char */
 if (to_uni_table != NULL) {
+ /* !CHARSET_UNICODE_COMPAT therefore not UTF-8; since UTF-8
+ * is the only multibyte encoding with !CHARSET_PARTIAL_SUPPORT,
+ * we're using a single byte encoding */
 map_to_unicode(this_char, to_uni_table, this_char);
 if (this_char == 0x) /* no mapping; pass through */
 goto pass_char_through;
 }
+ /* the cursor may advance */
 find_entity_for_char(this_char, charset, entity_table.ms_table, rep,
 rep_len, old, oldlen, cursor);
 } else {
@@ -1397,6 +1400,10 @@
 }
 }
 /* checks passed; copy entity to result */
+ /* entity size is unbounded, we may need more memory */
+ if (maxlen  len + ent_len + 2 /*  and ; */) {
+ replaced = erealloc(replaced, (maxlen += ent_len + 128) + 1);
+ }
 replaced[len++] = '';
 memcpy(replaced[len], old[cursor], ent_len);
 len += ent_len;

Copied: 
php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug60965.phpt 
(from rev 323056, 
php/php-src/trunk/ext/standard/tests/strings/bug60965.phpt)

===
--- php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug60965.phpt 
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug60965.phpt 
2012-02-05 09:59:33 UTC (rev 323074)

@@ -0,0 +1,10 @@
+--TEST--
+Bug #60965: Buffer overflow on htmlspecialchars/entities with 
$double=false

+--FILE--
+?php
+echo 
htmlspecialchars('#x05;',

+ENT_QUOTES, 'UTF-8', false), \n;
+echo Done.\n;
+--EXPECT--

Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ NEWS ext/standard/html.c ext/standard/tests/strings/bug60965.phpt

2012-02-05 Thread Nuno Lopes

On Sun, 05 Feb 2012 15:00:11 +0100, Gustavo Lopes wrote:

On Sun, 5 Feb 2012 14:37:27 +0100, Pierre Joye wrote:

2012/2/5 Gustavo Lopes glo...@nebm.ist.utl.pt:


All the length and position variables are of type size_t, so I'd say
we'd be out of memory long before that could be a problem (unless
there's some architecture of which I'm not aware where SIZE_T is low
enough for this to be a problem).



read: SIZE_MAX, not SIZE_T


By the way, SIZE_MAX (can be up to 65k or so afair) should not be used
in relation with buffer (string or other) length. It defines the
maximum size of a single object allocation that the compiler can
manage. Not sure if it is actually what you want here.


SIZE_MAX is indeed the limit of size_t. See ISO/IEC 9899:TC3, section
7.18.3 on http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
(page 259).

Forgetting the irrelevant case where size_t is 16 bit wide, there is
indeed a potential problem if size_t is 32-bit wide. First, if you can
pass a string with about 2GB you could the multiplication by 2 would
wrap around. But you could even pass a smaller string (possibly 10/15
times less, I don't know what's the maximum expansion factor of
htmlentities) and then it could wrap in the reallocation. I'll take
this into account.


See 
http://svn.php.net/viewvc/php/php-src/trunk/ext/standard/html.c?r1=323079r2=323078pathrev=323079


I don't know if this is worth merging to 5.4 at this point; after all 5.3 
has the same problem.


Obrigado!
I think this bug (although probably exploitable) is low risk, since it 
requires a large 'memory_limit' value to be triggable.

Your last patch seems good to me.

Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/tidy/ tidy.c

2012-01-23 Thread Nuno Lopes
nlopess  Mon, 23 Jan 2012 09:22:38 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=322614

Log:
minor tweak to warning to fix the bug54682.phpt test

Bug: https://bugs.php.net/54682 (Re-Opened) tidy NullPD
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/tidy/tidy.c

Modified: php/php-src/branches/PHP_5_3/ext/tidy/tidy.c
===
--- php/php-src/branches/PHP_5_3/ext/tidy/tidy.c2012-01-23 09:09:05 UTC 
(rev 322613)
+++ php/php-src/branches/PHP_5_3/ext/tidy/tidy.c2012-01-23 09:22:38 UTC 
(rev 322614)
@@ -1235,7 +1235,7 @@
obj = (PHPTidyObj *) zend_object_store_get_object(return_value 
TSRMLS_CC);

if (!(contents = php_tidy_file_to_mem(inputfile, use_include_path, 
contents_len TSRMLS_CC))) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot Load '%s' 
into memory %s, inputfile, (use_include_path) ? (Using include path) : );
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot Load '%s' 
into memory%s, inputfile, (use_include_path) ?  (Using include path) : );
RETURN_FALSE;
}


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/tidy/tests/004.phpt branches/PHP_5_3/ext/tidy/tidy.c branches/PHP_5_4/ext/tidy/tests/004.phpt branches/PHP_5_4/ext/tidy/tidy.c trunk/ext/tidy/tests/00

2012-01-21 Thread Nuno Lopes
nlopess  Sat, 21 Jan 2012 11:32:56 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=322536

Log:
revert r319254 (fix bug #54682) since it is not correct
add test that was broken with that patch.
this bug is probably in libtidy itself and not in PHP. I didn't investigate it 
enough to confirm, though

Bug: https://bugs.php.net/54682 (Re-Opened) tidy NullPD
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/tidy/tests/004.phpt
U   php/php-src/branches/PHP_5_3/ext/tidy/tidy.c
U   php/php-src/branches/PHP_5_4/ext/tidy/tests/004.phpt
U   php/php-src/branches/PHP_5_4/ext/tidy/tidy.c
U   php/php-src/trunk/ext/tidy/tests/004.phpt
U   php/php-src/trunk/ext/tidy/tidy.c

Modified: php/php-src/branches/PHP_5_3/ext/tidy/tests/004.phpt
===
--- php/php-src/branches/PHP_5_3/ext/tidy/tests/004.phpt2012-01-21 
05:24:58 UTC (rev 322535)
+++ php/php-src/branches/PHP_5_3/ext/tidy/tests/004.phpt2012-01-21 
11:32:56 UTC (rev 322536)
@@ -4,14 +4,28 @@
 ?php if (!extension_loaded(tidy)) print skip; ?
 --FILE--
 ?php
-   $a = tidy_parse_string(HTML/HTML);
-   tidy_diagnose($a);
-   echo tidy_get_error_buffer($a);
+$a = tidy_parse_string('HTML/HTML');
+var_dump(tidy_diagnose($a));
+echo tidy_get_error_buffer($a);
+
+$html =  HTML
+!DOCTYPE html PUBLIC -//W3C//DTD HTML 3.2//EN
+html
+headtitlefoo/title/head
+bodyphello/p/body
+/html
+HTML;
+$a = tidy_parse_string($html);
+var_dump(tidy_diagnose($a));
+echo tidy_get_error_buffer($a);
 ?
 --EXPECT--
-
+bool(true)
 line 1 column 1 - Warning: missing !DOCTYPE declaration
 line 1 column 7 - Warning: discarding unexpected /html
 line 1 column 14 - Warning: inserting missing 'title' element
 Info: Document content looks like HTML 3.2
-3 warnings, 0 errors were found!
\ No newline at end of file
+3 warnings, 0 errors were found!
+bool(true)
+Info: Document content looks like HTML 3.2
+No warnings or errors were found.

Modified: php/php-src/branches/PHP_5_3/ext/tidy/tidy.c
===
--- php/php-src/branches/PHP_5_3/ext/tidy/tidy.c2012-01-21 05:24:58 UTC 
(rev 322535)
+++ php/php-src/branches/PHP_5_3/ext/tidy/tidy.c2012-01-21 11:32:56 UTC 
(rev 322536)
@@ -1288,7 +1288,7 @@
 {
TIDY_FETCH_OBJECT;

-   if (tidyStatus(obj-ptdoc-doc) != 0  
tidyRunDiagnostics(obj-ptdoc-doc) = 0) {
+   if (tidyRunDiagnostics(obj-ptdoc-doc) = 0) {
tidy_doc_update_properties(obj TSRMLS_CC);
RETURN_TRUE;
}

Modified: php/php-src/branches/PHP_5_4/ext/tidy/tests/004.phpt
===
--- php/php-src/branches/PHP_5_4/ext/tidy/tests/004.phpt2012-01-21 
05:24:58 UTC (rev 322535)
+++ php/php-src/branches/PHP_5_4/ext/tidy/tests/004.phpt2012-01-21 
11:32:56 UTC (rev 322536)
@@ -4,14 +4,28 @@
 ?php if (!extension_loaded(tidy)) print skip; ?
 --FILE--
 ?php
-   $a = tidy_parse_string(HTML/HTML);
-   tidy_diagnose($a);
-   echo tidy_get_error_buffer($a);
+$a = tidy_parse_string('HTML/HTML');
+var_dump(tidy_diagnose($a));
+echo tidy_get_error_buffer($a);
+
+$html =  HTML
+!DOCTYPE html PUBLIC -//W3C//DTD HTML 3.2//EN
+html
+headtitlefoo/title/head
+bodyphello/p/body
+/html
+HTML;
+$a = tidy_parse_string($html);
+var_dump(tidy_diagnose($a));
+echo tidy_get_error_buffer($a);
 ?
 --EXPECT--
-
+bool(true)
 line 1 column 1 - Warning: missing !DOCTYPE declaration
 line 1 column 7 - Warning: discarding unexpected /html
 line 1 column 14 - Warning: inserting missing 'title' element
 Info: Document content looks like HTML 3.2
-3 warnings, 0 errors were found!
\ No newline at end of file
+3 warnings, 0 errors were found!
+bool(true)
+Info: Document content looks like HTML 3.2
+No warnings or errors were found.

Modified: php/php-src/branches/PHP_5_4/ext/tidy/tidy.c
===
--- php/php-src/branches/PHP_5_4/ext/tidy/tidy.c2012-01-21 05:24:58 UTC 
(rev 322535)
+++ php/php-src/branches/PHP_5_4/ext/tidy/tidy.c2012-01-21 11:32:56 UTC 
(rev 322536)
@@ -1336,7 +1336,7 @@
 {
TIDY_FETCH_OBJECT;

-   if (tidyStatus(obj-ptdoc-doc) != 0  
tidyRunDiagnostics(obj-ptdoc-doc) = 0) {
+   if (tidyRunDiagnostics(obj-ptdoc-doc) = 0) {
tidy_doc_update_properties(obj TSRMLS_CC);
RETURN_TRUE;
}

Modified: php/php-src/trunk/ext/tidy/tests/004.phpt
===
--- php/php-src/trunk/ext/tidy/tests/004.phpt   2012-01-21 05:24:58 UTC (rev 
322535)
+++ php/php-src/trunk/ext/tidy/tests/004.phpt   2012-01-21 11:32:56 UTC (rev 
322536)
@@ -4,14 +4,28 @@
 ?php if (!extension_loaded(tidy)) print skip; ?
 --FILE--
 ?php
-   $a = tidy_parse_string(HTML/HTML);
-   tidy_diagnose($a);
-   echo 

Re: [PHP-CVS] svn: /SVNROOT/ global_avail

2012-01-20 Thread Nuno Lopes

Hi,

I'm having some trouble with git (first time using this thing..).
I just tried to commit to gcov.git:

$ git clone https://git.php.net/repository/web/gcov.git
$ cd gcov
(...)
$ git config remote.origin.pushurl 
https://nlop...@git.php.net/push/web/gcov.git

$ git push
error: The requested URL returned error: 401 while accessing 
https://nlop...@git.php.net/push/web/gcov.git/info/refs


fatal: HTTP request failed


It's not even asking my password. Am I missing anything?  (btw I'm following 
the instructions from https://wiki.php.net/vcs/gitfaq)


Thanks,
Nuno


- Original Message - 
From: David Soria Parra d...@php.net

To: php-cvs@lists.php.net
Sent: Thursday, January 19, 2012 8:15 PM
Subject: [PHP-CVS] svn: /SVNROOT/ global_avail



dsp  Thu, 19 Jan 2012 20:15:18 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=322474

Log:
Move php-gcov, php-master, php-news to git

Changed paths:
   U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail 2012-01-19 20:15:16 UTC (rev 322473)
+++ SVNROOT/global_avail 2012-01-19 20:15:18 UTC (rev 322474)
@@ -58,15 +58,15 @@
# The PHP Web Group maintains www.php.net, news.php.net, bugs.php.net,
# people.php.net, master.php.net, wiki.php.net, pecl.php.net and 
qa.php.net.


-avail|salathe,scottmac,jmertic,lsmith,johannes,iliaa,cmv,tcobb,gareth,jah,eschmid,ronabop,derick,sterling,stas,phildriscoll,jmoore,andre,jani,david,lyric,zimt,mk,goba,zak,jmcastagnetto,dams,tom,jacques,sebastian,georg,mj,imajes,cortesi,sander,markonen,edink,jan,victor,mfischer,wez,sesser,pollita,alindeman,magnus,iliaa,philip,didou,sfox,sean,dufuz,nlopess,pajoye,helly,tony2001,bjori,felipe,dsp,aharvey,danbrown,moacir,till,vrana,tyrael|web/php,web/php-bugs,web/php-master,web/php-news,web/php-hosts,web/php-wiki,web/php-people,web/pecl,web/qa,web/bugs.git
+avail|salathe,scottmac,jmertic,lsmith,johannes,iliaa,cmv,tcobb,gareth,jah,eschmid,ronabop,derick,sterling,stas,phildriscoll,jmoore,andre,jani,david,lyric,zimt,mk,goba,zak,jmcastagnetto,dams,tom,jacques,sebastian,georg,mj,imajes,cortesi,sander,markonen,edink,jan,victor,mfischer,wez,sesser,pollita,alindeman,magnus,iliaa,philip,didou,sfox,sean,dufuz,nlopess,pajoye,helly,tony2001,bjori,felipe,dsp,aharvey,danbrown,moacir,till,vrana,tyrael|web/php,web/php-bugs,web/master.git,web/news.git,web/php-hosts,web/php-wiki,web/php-people,web/pecl,web/qa,web/bugs.git

avail|degeberg|web/php-bugs
avail|danielc|web/php/
avail|ericstewart|web/php/*/archive
-avail|odoucet|web/php-news/,web/qa/
-avail|shein|web/php-news/
+avail|odoucet|web/news.git,web/qa/
+avail|shein|web/news.git
avail|dragoonis,seld,wojak|web/php/
-avail|stewartlord|web/php/,web/php-master/
+avail|stewartlord|web/php/,web/master.git

# The PHP Presentation Group has access to the presentations on the
# conf.php.net site.
@@ -116,7 +116,7 @@
avail|auroraeosrose,ohill,csilles,t2k269,jhannus,moriyoshi,spankin,pqf,lebsack,acmurthy,markus,omar,dsp|pecl

# access to gcov.php.net website.
-avail|helly,iliaa,nlopess,pronych,felixdv,felipe|web/php-gcov
+avail|helly,iliaa,nlopess,pronych,felixdv,felipe|web/gcov.git

# The PHP-GTK Group has access to the PHP-GTK code and documentation.




--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/tests/general_functions/bug39322.phpt branches/PHP_5_4/ext/standard/tests/general_functions/bug39322.phpt trunk/ext/standard/tests/general_fu

2012-01-08 Thread Nuno Lopes
nlopess  Sun, 08 Jan 2012 18:03:56 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=321933

Log:
do kill 9 to fix a race condition in this test. (should fix the debian 32-bit 
buildbot)

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug39322.phpt
U   
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/bug39322.phpt
U   php/php-src/trunk/ext/standard/tests/general_functions/bug39322.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug39322.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug39322.phpt 
2012-01-08 16:46:40 UTC (rev 321932)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug39322.phpt 
2012-01-08 18:03:56 UTC (rev 321933)
@@ -16,7 +16,7 @@

 $process = proc_open('/bin/sleep 120', $descriptors, $pipes);

-proc_terminate($process);
+proc_terminate($process, 9);
 sleep(1); // wait a bit to let the process finish
 var_dump(proc_get_status($process));

@@ -38,7 +38,7 @@
   [exitcode]=
   int(-1)
   [termsig]=
-  int(15)
+  int(9)
   [stopsig]=
   int(0)
 }

Modified: 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/bug39322.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/bug39322.phpt 
2012-01-08 16:46:40 UTC (rev 321932)
+++ 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/bug39322.phpt 
2012-01-08 18:03:56 UTC (rev 321933)
@@ -16,7 +16,7 @@

 $process = proc_open('/bin/sleep 120', $descriptors, $pipes);

-proc_terminate($process);
+proc_terminate($process, 9);
 sleep(1); // wait a bit to let the process finish
 var_dump(proc_get_status($process));

@@ -38,7 +38,7 @@
   [exitcode]=
   int(-1)
   [termsig]=
-  int(15)
+  int(9)
   [stopsig]=
   int(0)
 }

Modified: php/php-src/trunk/ext/standard/tests/general_functions/bug39322.phpt
===
--- php/php-src/trunk/ext/standard/tests/general_functions/bug39322.phpt
2012-01-08 16:46:40 UTC (rev 321932)
+++ php/php-src/trunk/ext/standard/tests/general_functions/bug39322.phpt
2012-01-08 18:03:56 UTC (rev 321933)
@@ -16,7 +16,7 @@

 $process = proc_open('/bin/sleep 120', $descriptors, $pipes);

-proc_terminate($process);
+proc_terminate($process, 9);
 sleep(1); // wait a bit to let the process finish
 var_dump(proc_get_status($process));

@@ -38,7 +38,7 @@
   [exitcode]=
   int(-1)
   [termsig]=
-  int(15)
+  int(9)
   [stopsig]=
   int(0)
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/tests/lang/ 019.phpt

2012-01-04 Thread Nuno Lopes

I cannot reproduce that on my 32-bits machine either.
Can I get access to that VM?

Nuno

- Original Message -

Could you please also look at this failing test:
http://ci.qa.php.net/job/php-src-trunk-matrix-build/architecture=x86,os=linux-debian-6.0/lastCompletedBuild/testReport/php-src.ext.standard.tests/general_functions/bug39322_phpt___Bug__39322__proc_terminate___loosing_process_resource_/
it seems that you worked on it according to
https://bugs.php.net/bug.php?id=39322. It fails only on 32-bit build,
i can't fail it on my ubuntu-amd64.
Thank you. 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/tests/lang/ 019.phpt

2012-01-03 Thread Nuno Lopes

Gah, thank you!
Nuno

- Original Message -

sheinMon, 02 Jan 2012 20:02:21 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=321694

Log:
Fixed broken test (different error message wording in 5.3 branch)

Changed paths:
   U   php/php-src/branches/PHP_5_3/tests/lang/019.phpt

Modified: php/php-src/branches/PHP_5_3/tests/lang/019.phpt
===
--- php/php-src/branches/PHP_5_3/tests/lang/019.phpt 2012-01-02 18:49:33 
UTC (rev 321693)
+++ php/php-src/branches/PHP_5_3/tests/lang/019.phpt 2012-01-02 20:02:21 
UTC (rev 321694)

@@ -35,4 +35,4 @@
hey, this is a regular echo'd eval()
hey, this is a function inside an eval()!

-Parse error: syntax error, unexpected end of file in %s019.php(12) : 
eval()'d code on line 1
+Parse error: syntax error, unexpected $end in %s019.php(12) : eval()'d 
code on line 1




--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/acinclude.m4 trunk/acinclude.m4

2011-12-27 Thread Nuno Lopes
Uhm, I don't think this change makes much sense (nor does the previous 
behaviour on Mac)..
Extensions that use C++ should pull in the required libraries themselves. We 
shouldn't be linking PHP everytime with libstdc++ if that is not needed.


Nuno


- Original Message -

bjoriTue, 27 Dec 2011 13:53:11 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=321435

Log:
Looks like we need to explicity add libstdc++ on recent linux' too, like 
fedora 14 and ubuntu 11

This fixes build failures for ext/intl and several pecl exts

Changed paths:
   U   php/php-src/branches/PHP_5_4/NEWS
   U   php/php-src/branches/PHP_5_4/acinclude.m4
   U   php/php-src/trunk/acinclude.m4

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS 2011-12-27 11:05:58 UTC (rev 321434)
+++ php/php-src/branches/PHP_5_4/NEWS 2011-12-27 13:53:11 UTC (rev 321435)
@@ -7,6 +7,10 @@
- CLI SAPI:
  . Fixed bug #60591 (Memory leak when access a non-exists file). 
(Laruence)


+- Intl:
+  . Fixed build on Fedora 15 / Ubuntu 11. (Hannes)
+
+
22 Dec 2011, PHP 5.4.0 RC4
- Core:
  . Added max_input_vars directive to prevent attacks based on hash 
collisions


Modified: php/php-src/branches/PHP_5_4/acinclude.m4
===
--- php/php-src/branches/PHP_5_4/acinclude.m4 2011-12-27 11:05:58 UTC (rev 
321434)
+++ php/php-src/branches/PHP_5_4/acinclude.m4 2011-12-27 13:53:11 UTC (rev 
321435)

@@ -762,11 +762,7 @@
  if test -z $php_cxx_done; then
AC_PROG_CXX
AC_PROG_CXXCPP
-case $host_alias in
-  *darwin*)
-PHP_ADD_LIBRARY(stdc++)
-  ;;
-esac
+PHP_ADD_LIBRARY(stdc++)
php_cxx_done=yes
  fi
])

Modified: php/php-src/trunk/acinclude.m4
===
--- php/php-src/trunk/acinclude.m4 2011-12-27 11:05:58 UTC (rev 321434)
+++ php/php-src/trunk/acinclude.m4 2011-12-27 13:53:11 UTC (rev 321435)
@@ -762,11 +762,7 @@
  if test -z $php_cxx_done; then
AC_PROG_CXX
AC_PROG_CXXCPP
-case $host_alias in
-  *darwin*)
-PHP_ADD_LIBRARY(stdc++)
-  ;;
-esac
+PHP_ADD_LIBRARY(stdc++)
php_cxx_done=yes
  fi
])



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/acinclude.m4 trunk/acinclude.m4

2011-12-27 Thread Nuno Lopes

On Tue, Dec 27, 2011 at 18:02, Nuno Lopes nlop...@php.net wrote:

Uhm, I don't think this change makes much sense (nor does the previous
behaviour on Mac)..
Extensions that use C++ should pull in the required libraries themselves. 
We

shouldn't be linking PHP everytime with libstdc++ if that is not needed.


Then what is the idea behind PHP_REQUIRE_CXX?
As I see it, it should pull in everything needed for the extension to use 
c++.


Ah, sorry, I was fooled by your commit message.. I didn't noticed your 
change was in PHP_REQUIRE_CXX.
Anyway, pulling libstdc++ is a bit too gcc centric. If I use, say, clang, 
then I may want to use libc++ instead. The right fix, I believe, is to 
change the link command to use $CXX instead of $CC, since the c++ compiler 
knows which libraries it needs. For example, it seems that PHP_SHARED_MODULE 
is doing the right thing.


Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/run-tests.php branches/PHP_5_4/run-tests.php trunk/run-tests.php

2011-08-09 Thread Nuno Lopes
nlopess  Tue, 09 Aug 2011 21:53:44 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=314690

Log:
terminate timeouting processes with SIGKILL (9)

Changed paths:
U   php/php-src/branches/PHP_5_3/run-tests.php
U   php/php-src/branches/PHP_5_4/run-tests.php
U   php/php-src/trunk/run-tests.php

Modified: php/php-src/branches/PHP_5_3/run-tests.php
===
--- php/php-src/branches/PHP_5_3/run-tests.php  2011-08-09 21:35:31 UTC (rev 
314689)
+++ php/php-src/branches/PHP_5_3/run-tests.php  2011-08-09 21:53:44 UTC (rev 
314690)
@@ -1080,7 +1080,7 @@
} else if ($n === 0) {
/* timed out */
$data .= b\n ** ERROR: process timed out **\n;
-   proc_terminate($proc);
+   proc_terminate($proc, 9);
return $data;
} else if ($n  0) {
$line = (binary) fread($pipes[1], 8192);

Modified: php/php-src/branches/PHP_5_4/run-tests.php
===
--- php/php-src/branches/PHP_5_4/run-tests.php  2011-08-09 21:35:31 UTC (rev 
314689)
+++ php/php-src/branches/PHP_5_4/run-tests.php  2011-08-09 21:53:44 UTC (rev 
314690)
@@ -1080,7 +1080,7 @@
} else if ($n === 0) {
/* timed out */
$data .= b\n ** ERROR: process timed out **\n;
-   proc_terminate($proc);
+   proc_terminate($proc, 9);
return $data;
} else if ($n  0) {
$line = (binary) fread($pipes[1], 8192);

Modified: php/php-src/trunk/run-tests.php
===
--- php/php-src/trunk/run-tests.php 2011-08-09 21:35:31 UTC (rev 314689)
+++ php/php-src/trunk/run-tests.php 2011-08-09 21:53:44 UTC (rev 314690)
@@ -1082,7 +1082,7 @@
} else if ($n === 0) {
/* timed out */
$data .= b\n ** ERROR: process timed out **\n;
-   proc_terminate($proc);
+   proc_terminate($proc, 9);
return $data;
} else if ($n  0) {
$line = (binary) fread($pipes[1], 8192);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ext/date/lib/ parse_date.c

2011-06-23 Thread Nuno Lopes
nlopess  Thu, 23 Jun 2011 14:58:02 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312405

Log:
properly regen file to fix coverage data

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/date/lib/parse_date.c

diffs exceeded maximum size
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ext/date/lib/ parse_date.c

2011-06-23 Thread Nuno Lopes
nlopess  Thu, 23 Jun 2011 15:00:00 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312406

Log:
MFB: properly regen file to fix coverage data

Changed paths:
U   php/php-src/trunk/ext/date/lib/parse_date.c

diffs exceeded maximum size
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/date/lib/ parse_date.c parse_date.re

2011-03-28 Thread Nuno Lopes
nlopess  Mon, 28 Mar 2011 09:10:23 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309775

Log:
fix last commit:
 - fix code coverage build
 - spread static love

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.c
U   php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.re

diffs exceeded maximum size
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ext/date/lib/ parse_date.c parse_date.re

2011-03-28 Thread Nuno Lopes
nlopess  Mon, 28 Mar 2011 09:11:28 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309776

Log:
MFB (r309775): fix last commit

Changed paths:
U   php/php-src/trunk/ext/date/lib/parse_date.c
U   php/php-src/trunk/ext/date/lib/parse_date.re

diffs exceeded maximum size
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/date/lib/ parse_date.c parse_date.re

2011-03-28 Thread Nuno Lopes

On Mon, 28 Mar 2011, Nuno Lopes wrote:


nlopess  Mon, 28 Mar 2011 09:10:23 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=309775

Log:
fix last commit:
 - fix code coverage build
 - spread static love

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.c
U   php/php-src/branches/PHP_5_3/ext/date/lib/parse_date.re


Why is that .c file change so large? Did you use the little line in the
ext/date/lib/README for re-generating the file?


It's actually the opposite. I regenerated the file in the right way (as 
described in the README file).
The previous commit 
(http://svn.php.net/viewvc?view=revisionrevision=309493) broke it, not me.


Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/phar/ Makefile.frag phar_internal.h phar_object.c phar_path_check.c phar_path_check.re

2011-02-25 Thread Nuno Lopes
nlopess  Fri, 25 Feb 2011 09:32:17 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308657

Log:
fix lcov build

Changed paths:
UU  php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag
_U  php/php-src/branches/PHP_5_3/ext/phar/phar_internal.h
_U  php/php-src/branches/PHP_5_3/ext/phar/phar_object.c
UU  php/php-src/branches/PHP_5_3/ext/phar/phar_path_check.c
UU  php/php-src/branches/PHP_5_3/ext/phar/phar_path_check.re

Modified: php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag
===
--- php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag 2011-02-25 09:18:12 UTC 
(rev 308656)
+++ php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag 2011-02-25 09:32:17 UTC 
(rev 308657)
@@ -1,6 +1,5 @@
-
 $(srcdir)/phar_path_check.c: $(srcdir)/phar_path_check.re
-   $(RE2C) -b -o $(srcdir)/phar_path_check.c $(srcdir)/phar_path_check.re
+   @(cd $(top_srcdir); $(RE2C) -b -o ext/phar/phar_path_check.c 
ext/phar/phar_path_check.re)

 pharcmd: $(builddir)/phar.php $(builddir)/phar.phar



Property changes on: php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag
___
Deleted: svn:executable
   - *


Property changes on: php/php-src/branches/PHP_5_3/ext/phar/phar_internal.h
___
Deleted: svn:executable
   - *


Property changes on: php/php-src/branches/PHP_5_3/ext/phar/phar_object.c
___
Deleted: svn:executable
   - *

Modified: php/php-src/branches/PHP_5_3/ext/phar/phar_path_check.c
===
--- php/php-src/branches/PHP_5_3/ext/phar/phar_path_check.c 2011-02-25 
09:18:12 UTC (rev 308656)
+++ php/php-src/branches/PHP_5_3/ext/phar/phar_path_check.c 2011-02-25 
09:32:17 UTC (rev 308657)
@@ -1,5 +1,5 @@
-/* Generated by re2c 0.13.5 on Fri Dec 31 23:52:05 2010 */
-#line 1 /home/felipe/dev/php5/ext/phar/phar_path_check.re
+/* Generated by re2c 0.13.5 on Fri Feb 25 04:29:05 2011 */
+#line 1 ext/phar/phar_path_check.re
 /*
   +--+
   | phar php single-file executable PHP extension|
@@ -43,7 +43,7 @@

 loop:

-#line 47 /home/felipe/dev/php5/ext/phar/phar_path_check.c
+#line 47 ext/phar/phar_path_check.c
 {
YYCTYPE yych;

@@ -76,30 +76,30 @@
if (yych = '.') goto yy16;
if (yych = '/') goto yy18;
 yy3:
-#line 93 /home/felipe/dev/php5/ext/phar/phar_path_check.re
+#line 93 ext/phar/phar_path_check.re
{
goto loop;
}
-#line 84 /home/felipe/dev/php5/ext/phar/phar_path_check.c
+#line 84 ext/phar/phar_path_check.c
 yy4:
++YYCURSOR;
-#line 60 /home/felipe/dev/php5/ext/phar/phar_path_check.re
+#line 60 ext/phar/phar_path_check.re
{
*error = back-slash;
return pcr_err_back_slash;
}
-#line 92 /home/felipe/dev/php5/ext/phar/phar_path_check.c
+#line 92 ext/phar/phar_path_check.c
 yy6:
++YYCURSOR;
-#line 64 /home/felipe/dev/php5/ext/phar/phar_path_check.re
+#line 64 ext/phar/phar_path_check.re
{
*error = star;
return pcr_err_star;
}
-#line 100 /home/felipe/dev/php5/ext/phar/phar_path_check.c
+#line 100 ext/phar/phar_path_check.c
 yy8:
++YYCURSOR;
-#line 68 /home/felipe/dev/php5/ext/phar/phar_path_check.re
+#line 68 ext/phar/phar_path_check.re
{
if (**s == '/') {
(*s)++;
@@ -108,22 +108,22 @@
*error = NULL;
return pcr_use_query;
}
-#line 112 /home/felipe/dev/php5/ext/phar/phar_path_check.c
+#line 112 ext/phar/phar_path_check.c
 yy10:
++YYCURSOR;
 yy11:
-#line 76 /home/felipe/dev/php5/ext/phar/phar_path_check.re
+#line 76 ext/phar/phar_path_check.re
{
*error =illegal character;
return pcr_err_illegal_char;
}
-#line 121 /home/felipe/dev/php5/ext/phar/phar_path_check.c
+#line 121 ext/phar/phar_path_check.c
 yy12:
yych = *++YYCURSOR;
goto yy11;
 yy13:
++YYCURSOR;
-#line 80 /home/felipe/dev/php5/ext/phar/phar_path_check.re
+#line 80 ext/phar/phar_path_check.re
{
if (**s == '/') {
(*s)++;
@@ -137,7 +137,7 @@
*error = NULL;
return pcr_is_ok;
}
-#line 141 /home/felipe/dev/php5/ext/phar/phar_path_check.c
+#line 141 ext/phar/phar_path_check.c
 yy15:
yych = *++YYCURSOR;
goto yy3;
@@ -152,12 +152,12 @@
goto yy3;
 yy18:
++YYCURSOR;
-#line 48 

[PHP-CVS] svn: /php/php-src/trunk/ext/phar/ Makefile.frag phar_internal.h phar_object.c phar_path_check.c phar_path_check.re

2011-02-25 Thread Nuno Lopes
nlopess  Fri, 25 Feb 2011 09:37:33 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=308658

Log:
MFB: fix lcov build (r308657)

Changed paths:
UU  php/php-src/trunk/ext/phar/Makefile.frag
_U  php/php-src/trunk/ext/phar/phar_internal.h
_U  php/php-src/trunk/ext/phar/phar_object.c
UU  php/php-src/trunk/ext/phar/phar_path_check.c
UU  php/php-src/trunk/ext/phar/phar_path_check.re

Modified: php/php-src/trunk/ext/phar/Makefile.frag
===
--- php/php-src/trunk/ext/phar/Makefile.frag2011-02-25 09:32:17 UTC (rev 
308657)
+++ php/php-src/trunk/ext/phar/Makefile.frag2011-02-25 09:37:33 UTC (rev 
308658)
@@ -1,6 +1,5 @@
-
 $(srcdir)/phar_path_check.c: $(srcdir)/phar_path_check.re
-   $(RE2C) -b -o $(srcdir)/phar_path_check.c $(srcdir)/phar_path_check.re
+   @(cd $(top_srcdir); $(RE2C) -b -o ext/phar/phar_path_check.c 
ext/phar/phar_path_check.re)

 pharcmd: $(builddir)/phar.php $(builddir)/phar.phar



Property changes on: php/php-src/trunk/ext/phar/Makefile.frag
___
Deleted: svn:executable
   - *


Property changes on: php/php-src/trunk/ext/phar/phar_internal.h
___
Deleted: svn:executable
   - *


Property changes on: php/php-src/trunk/ext/phar/phar_object.c
___
Deleted: svn:executable
   - *

Modified: php/php-src/trunk/ext/phar/phar_path_check.c
===
--- php/php-src/trunk/ext/phar/phar_path_check.c2011-02-25 09:32:17 UTC 
(rev 308657)
+++ php/php-src/trunk/ext/phar/phar_path_check.c2011-02-25 09:37:33 UTC 
(rev 308658)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.3 on Tue Jan  8 18:41:21 2008 */
+/* Generated by re2c 0.13.5 on Fri Feb 25 04:35:39 2011 */
 #line 1 ext/phar/phar_path_check.re
 /*
   +--+
@@ -42,66 +42,65 @@
 #define YYFILL(n)

 loop:
+
+#line 47 ext/phar/phar_path_check.c
 {
+   YYCTYPE yych;

-#line 48 ext/phar/phar_path_check.c
-   {
-   YYCTYPE yych;
-
-   if((YYLIMIT - YYCURSOR)  4) YYFILL(4);
-   yych = *YYCURSOR;
-   if(yych = '.') {
-   if(yych = 0x0A) {
-   if(yych = 0x00) goto yy13;
-   if(yych = 0x09) goto yy10;
-   goto yy12;
-   } else {
-   if(yych = 0x19) goto yy10;
-   if(yych == '*') goto yy6;
-   goto yy15;
-   }
+   if ((YYLIMIT - YYCURSOR)  4) YYFILL(4);
+   yych = *YYCURSOR;
+   if (yych = '.') {
+   if (yych = '\n') {
+   if (yych = 0x00) goto yy13;
+   if (yych = '\t') goto yy10;
+   goto yy12;
} else {
-   if(yych = '?') {
-   if(yych = '/') goto yy2;
-   if(yych = '') goto yy15;
-   goto yy8;
-   } else {
-   if(yych == '\\') goto yy4;
-   if(yych = 0x7F) goto yy15;
-   goto yy10;
-   }
+   if (yych = 0x19) goto yy10;
+   if (yych == '*') goto yy6;
+   goto yy15;
}
+   } else {
+   if (yych = '?') {
+   if (yych = '/') goto yy2;
+   if (yych = '') goto yy15;
+   goto yy8;
+   } else {
+   if (yych == '\\') goto yy4;
+   if (yych = 0x7F) goto yy15;
+   goto yy10;
+   }
+   }
 yy2:
-   yych = *(YYMARKER = ++YYCURSOR);
-   if(yych = '-') goto yy3;
-   if(yych = '.') goto yy16;
-   if(yych = '/') goto yy18;
+   yych = *(YYMARKER = ++YYCURSOR);
+   if (yych = '-') goto yy3;
+   if (yych = '.') goto yy16;
+   if (yych = '/') goto yy18;
 yy3:
 #line 93 ext/phar/phar_path_check.re
-   {
+   {
goto loop;
}
-#line 85 ext/phar/phar_path_check.c
+#line 84 ext/phar/phar_path_check.c
 yy4:
-   ++YYCURSOR;
+   ++YYCURSOR;
 #line 60 ext/phar/phar_path_check.re
-   {
+   {
*error = back-slash;
return pcr_err_back_slash;
}
-#line 93 ext/phar/phar_path_check.c
+#line 92 ext/phar/phar_path_check.c
 yy6:
-   ++YYCURSOR;
+   ++YYCURSOR;
 #line 64 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ Makefile.gcov

2010-01-25 Thread Nuno Lopes
nlopess  Mon, 25 Jan 2010 22:44:07 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=294022

Log:
Daniel Convissor wants to test ext/date/lib, so enable code coverage data for 
him

Changed paths:
U   php/php-src/branches/PHP_5_3/Makefile.gcov

Modified: php/php-src/branches/PHP_5_3/Makefile.gcov
===
--- php/php-src/branches/PHP_5_3/Makefile.gcov  2010-01-25 22:43:29 UTC (rev 
294021)
+++ php/php-src/branches/PHP_5_3/Makefile.gcov  2010-01-25 22:44:07 UTC (rev 
294022)
@@ -61,7 +61,7 @@
test -f $$x.bbcp $$x.bb   lcov_data/$$y.bb ; \
test -f $$x.bbg   cp $$x.bbg  lcov_data/$$y.bbg ; \
done
-   for dir in ext/bcmath/libbcmath ext/date/lib ext/fileinfo/libmagic 
ext/gd/libgd ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib 
ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite 
ext/xmlrpc/libxmlrpc ext/zip/lib; do \
+   for dir in ext/bcmath/libbcmath ext/fileinfo/libmagic ext/gd/libgd 
ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib 
ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite 
ext/xmlrpc/libxmlrpc ext/zip/lib; do \
test -d lcov_data/$$dir  rm -rf lcov_data/$$dir ; \
done
@echo

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ Makefile.gcov

2010-01-25 Thread Nuno Lopes
nlopess  Mon, 25 Jan 2010 22:51:52 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=294023

Log:
merge r294022. 5.2 branch doesnt need it

Changed paths:
U   php/php-src/trunk/Makefile.gcov

Modified: php/php-src/trunk/Makefile.gcov
===
--- php/php-src/trunk/Makefile.gcov 2010-01-25 22:44:07 UTC (rev 294022)
+++ php/php-src/trunk/Makefile.gcov 2010-01-25 22:51:52 UTC (rev 294023)
@@ -61,7 +61,7 @@
test -f $$x.bbcp $$x.bb   lcov_data/$$y.bb ; \
test -f $$x.bbg   cp $$x.bbg  lcov_data/$$y.bbg ; \
done
-   for dir in ext/bcmath/libbcmath ext/date/lib ext/fileinfo/libmagic 
ext/gd/libgd ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib 
ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite 
ext/xmlrpc/libxmlrpc ext/zip/lib; do \
+   for dir in ext/bcmath/libbcmath ext/fileinfo/libmagic ext/gd/libgd 
ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib 
ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite 
ext/xmlrpc/libxmlrpc ext/zip/lib; do \
test -d lcov_data/$$dir  rm -rf lcov_data/$$dir ; \
done
@echo

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/mysqlnd/

2009-10-16 Thread Nuno Lopes
nlopess  Fri, 16 Oct 2009 10:51:29 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=289695

Log:
ignore php_mysqlnd_config.h file

Changed paths:
_U  php/php-src/branches/PHP_5_3/ext/mysqlnd/


Property changes on: php/php-src/branches/PHP_5_3/ext/mysqlnd
___
Modified: svn:ignore
   - #*#
*.dsw
*.la
*.lo
*.ncb
*.opt
*.plg
*.tgz
*~
#*
deps
libs
Debug
Debug_TS
Makefile
Makefile.fragments
Makefile.global
Makefile.objects
Release
Release_TS
Release_TSDbg
Release_TS_inline
Release_inline
acinclude.m4
aclocal.m4
autom4te.cache
build
config.cache
config.guess
config.h
config.h.in
config.log
config.nice
config.status
config.sub
configure
configure.in
conftest
conftest.c
include
install-sh
libtool
ltmain.sh
missing
mkinstalldirs
modules
scan_makefile_in.awk
*.gcda
*.gcno

   + #*#
*.dsw
*.la
*.lo
*.ncb
*.opt
*.plg
*.tgz
*~
#*
deps
libs
Debug
Debug_TS
Makefile
Makefile.fragments
Makefile.global
Makefile.objects
Release
Release_TS
Release_TSDbg
Release_TS_inline
Release_inline
acinclude.m4
aclocal.m4
autom4te.cache
build
config.cache
config.guess
config.h
config.h.in
config.log
config.nice
config.status
config.sub
configure
configure.in
conftest
conftest.c
include
install-sh
libtool
ltmain.sh
missing
mkinstalldirs
modules
scan_makefile_in.awk
*.gcda
*.gcno
php_mysqlnd_config.h


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/

2009-09-22 Thread Nuno Lopes
nlopess  Tue, 22 Sep 2009 12:12:43 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=288565

Log:
spread some svn:ignore love

Changed paths:
_U  php/php-src/branches/PHP_5_3/ext/bcmath/libbcmath/src/
_U  php/php-src/branches/PHP_5_3/ext/snmp/
_U  php/php-src/branches/PHP_5_3/ext/soap/tests/interop/Round3/GroupD/
_U  php/php-src/branches/PHP_5_3/ext/soap/tests/interop/Round3/GroupF/
_U  php/php-src/branches/PHP_5_3/ext/sockets/
_U  php/php-src/branches/PHP_5_3/ext/sqlite/tests/pdo/
_U  php/php-src/branches/PHP_5_3/ext/standard/
_U  php/php-src/branches/PHP_5_3/ext/standard/tests/file/windows_acls/
_U  php/php-src/branches/PHP_5_3/ext/sysvshm/
_U  php/php-src/branches/PHP_5_3/tests/lang/operators/
_U  php/php-src/branches/PHP_5_3/tests/run-test/
_U  php/php-src/branches/PHP_5_3/tests/strings/


Property changes on: php/php-src/branches/PHP_5_3/ext/bcmath/libbcmath/src
___
Added: svn:ignore
   + *.gcno
*.gcda



Property changes on: php/php-src/branches/PHP_5_3/ext/snmp
___
Added: svn:ignore
   + *.gcno
*.gcda



Property changes on: 
php/php-src/branches/PHP_5_3/ext/soap/tests/interop/Round3/GroupD
___
Added: svn:ignore
   + *.php



Property changes on: 
php/php-src/branches/PHP_5_3/ext/soap/tests/interop/Round3/GroupF
___
Added: svn:ignore
   + *.php



Property changes on: php/php-src/branches/PHP_5_3/ext/sockets
___
Added: svn:ignore
   + *.gcno
*.gcda



Property changes on: php/php-src/branches/PHP_5_3/ext/sqlite/tests/pdo
___
Added: svn:ignore
   + *.php



Property changes on: php/php-src/branches/PHP_5_3/ext/standard
___
Added: svn:ignore
   + *.gcno
*.gcda



Property changes on: 
php/php-src/branches/PHP_5_3/ext/standard/tests/file/windows_acls
___
Added: svn:ignore
   + *.php



Property changes on: php/php-src/branches/PHP_5_3/ext/sysvshm
___
Added: svn:ignore
   + *.gcno
*.gcda



Property changes on: php/php-src/branches/PHP_5_3/tests/lang/operators
___
Added: svn:ignore
   + *.php



Property changes on: php/php-src/branches/PHP_5_3/tests/run-test
___
Added: svn:ignore
   + *.php



Property changes on: php/php-src/branches/PHP_5_3/tests/strings
___
Added: svn:ignore
   + *.php


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/

2009-09-22 Thread Nuno Lopes
nlopess  Tue, 22 Sep 2009 12:14:47 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=288566

Log:
spread more svn:ignore love

Changed paths:
_U  php/php-src/trunk/ext/standard/tests/file/windows_acls/
_U  php/php-src/trunk/tests/lang/operators/


Property changes on: php/php-src/trunk/ext/standard/tests/file/windows_acls
___
Added: svn:ignore
   + *.php



Property changes on: php/php-src/trunk/tests/lang/operators
___
Added: svn:ignore
   + *.php


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] svn: SVNROOT/ global_avail

2009-07-20 Thread Nuno Lopes

Thank you!
Nuno

- Original Message -

gwynne Sun, 19 Jul 2009 23:59:45 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=284402

Changed paths:
U   SVNROOT/global_avail

Log:
fix Nuno's username

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail 2009-07-19 23:58:43 UTC (rev 284401)
+++ SVNROOT/global_avail 2009-07-19 23:59:45 UTC (rev 284402)
@@ -348,7 +348,7 @@
avail|pajoye,guilhermeblanco,auroraeosrose,rrichards,kalle|web/php-windows

# php-benchmarks karma
-avail|nlopes,pbiggar,olafurw,hjalle|php/php-benchmarks
+avail|nlopess,pbiggar,olafurw,hjalle|php/php-benchmarks

# phpruntests karma
avail|zoe,spriebsch,g2|php/phpruntests 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/proc_open.c branches/PHP_5_3/ext/standard/proc_open.h branches/PHP_5_3/ext/standard/tests/general_functions/proc_ope

2009-07-20 Thread Nuno Lopes
This is not a new feature. As the commit log says, this is about 
implementing an existing feature that was only implemented on windows.
Anyway, since when we require long discussions and voting to implement 
little details like this?..


Nuno


Excuse me but where/when was it agreed that this new feature can go into 
PHP_5_3? I thought it was supposed to go HEAD only..


--Jani



On 07/19/2009 05:52 PM, Nuno Lopes wrote:

nlopess Sun, 19 Jul 2009 14:52:27 +

URL: http://svn.php.net/viewvc?view=revisionrevision=284353

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/proc_open.c
U   php/php-src/branches/PHP_5_3/ext/standard/proc_open.h
A 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/proc_open03.phpt
A 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/proc_open04.phpt
A 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/proc_open05.phpt
A 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/proc_open06.phpt
A 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/proc_open07.phpt
A 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/proc_open08.phpt

U   php/php-src/trunk/ext/standard/proc_open.c
U   php/php-src/trunk/ext/standard/proc_open.h
A 
php/php-src/trunk/ext/standard/tests/general_functions/proc_open03.phpt
A 
php/php-src/trunk/ext/standard/tests/general_functions/proc_open04.phpt
A 
php/php-src/trunk/ext/standard/tests/general_functions/proc_open05.phpt
A 
php/php-src/trunk/ext/standard/tests/general_functions/proc_open06.phpt
A 
php/php-src/trunk/ext/standard/tests/general_functions/proc_open07.phpt
A 
php/php-src/trunk/ext/standard/tests/general_functions/proc_open08.phpt


Log:
Add support for proc_open()'s bypass_shell feature for Unix systems
(slightly modified patch from Gwynne) 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/proc_open.c branches/PHP_5_3/ext/standard/proc_open.h branches/PHP_5_3/ext/standard/tests/general_functions/proc_ope

2009-07-20 Thread Nuno Lopes

On Mon, Jul 20, 2009 at 12:19 PM, Jani Taskinenj...@php.net wrote:

Excuse me but where/when was it agreed that this new feature can go into
PHP_5_3? I thought it was supposed to go HEAD only..


It should not go in 5.3, Nuno please revert.


Why not? Should we wait 2 years to implement these kind of little things? Or 
even to implement new things?
Especially in a web-oriented language like PHP, you cannot afford to release 
new stuff only once in 2 years.


Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/proc_open.c branches/PHP_5_3/ext/standard/proc_open.h branches/PHP_5_3/ext/standard/tests/general_functions/proc_o

2009-07-20 Thread Nuno Lopes
Excuse me but where/when was it agreed that this new feature can go 
into

PHP_5_3? I thought it was supposed to go HEAD only..

It should not go in 5.3, Nuno please revert.



And for the record, this was supposed to be my patch and I had full  karma 
to commit it. I never asked Nuno to do so, all I wanted was peer  review.


Next time please make it clear that you don't need someone else to commit 
the patch for you. I explicitly asked you that in the e-mail that I sent 
with my review, and you didn't say a word about that. So I assumed that you 
needed me to commit the patch, as usually people only send patches when they 
don't have enough karma.
Anyway, I also don't understand why you sent the patch for PHP 5.3, when the 
title of the e-mail said patch for HEAD and you promptly reverted the 
patch from that branch.


Nuno

P.S.: do you want me to revert the patch I commited to trunk so that you can 
commit it yourself (after possibly collecting more feedback from others)? 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/proc_open.c branches/PHP_5_3/ext/standard/proc_open.h branches/PHP_5_3/ext/standard/tests/general_functions/proc_open03.

2009-07-19 Thread Nuno Lopes
nlopess Sun, 19 Jul 2009 14:52:27 +

URL: http://svn.php.net/viewvc?view=revisionrevision=284353

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/proc_open.c
U   php/php-src/branches/PHP_5_3/ext/standard/proc_open.h
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/proc_open03.phpt
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/proc_open04.phpt
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/proc_open05.phpt
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/proc_open06.phpt
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/proc_open07.phpt
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/proc_open08.phpt
U   php/php-src/trunk/ext/standard/proc_open.c
U   php/php-src/trunk/ext/standard/proc_open.h
A   
php/php-src/trunk/ext/standard/tests/general_functions/proc_open03.phpt
A   
php/php-src/trunk/ext/standard/tests/general_functions/proc_open04.phpt
A   
php/php-src/trunk/ext/standard/tests/general_functions/proc_open05.phpt
A   
php/php-src/trunk/ext/standard/tests/general_functions/proc_open06.phpt
A   
php/php-src/trunk/ext/standard/tests/general_functions/proc_open07.phpt
A   
php/php-src/trunk/ext/standard/tests/general_functions/proc_open08.phpt

Log:
Add support for proc_open()'s bypass_shell feature for Unix systems
(slightly modified patch from Gwynne)
Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2009-07-19 14:36:16 UTC (rev 284352)
+++ php/php-src/branches/PHP_5_3/NEWS	2009-07-19 14:52:27 UTC (rev 284353)
@@ -5,6 +5,8 @@
   Functors. (Christian Seiler)
 - Fixed open_basedir circumvention for mail.log. (Maksymilian Arciemowicz,
   Stas)
+- Added support for proc_open()'s bypass_shell feature for Unix systems
+  (Gwynne, Nuno)

 - Fixed bug #48899 (is_callable returns true even if method does not exist in
   parent class). (Felipe)

Modified: php/php-src/branches/PHP_5_3/ext/standard/proc_open.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/proc_open.c	2009-07-19 14:36:16 UTC (rev 284352)
+++ php/php-src/branches/PHP_5_3/ext/standard/proc_open.c	2009-07-19 14:52:27 UTC (rev 284353)
@@ -71,6 +71,56 @@

 static int le_proc_open;

+#if !defined(PHP_WIN32)  !defined(NETWARE)
+/* {{{ _php_array_to_argv */
+static char **_php_array_to_argv(zval *arg_array, int is_persistent)
+{
+	zval **element, temp;
+	char **c_argv, **ap;
+	HashTable *target_hash;
+	HashPosition pos;
+
+	target_hash = Z_ARRVAL_P(arg_array);
+	ap = c_argv = (char **)pecalloc(zend_hash_num_elements(target_hash) + 1, sizeof(char *), is_persistent);
+
+	/* skip first element */
+	zend_hash_internal_pointer_reset_ex(target_hash, pos);
+	zend_hash_move_forward_ex(target_hash, pos);
+	for (	;
+			zend_hash_get_current_data_ex(target_hash, (void **) element, pos) == SUCCESS;
+			zend_hash_move_forward_ex(target_hash, pos)) {
+
+		temp = **element;
+		if (Z_TYPE_PP(element) != IS_STRING) {
+			zval_copy_ctor(temp);
+			convert_to_string(temp);
+		}
+		*ap++ = pestrndup(Z_STRVAL(temp), Z_STRLEN(temp), is_persistent);
+		if (Z_TYPE_PP(element) != IS_STRING) {
+			zval_dtor(temp);
+		}
+	}
+
+	return c_argv;
+}
+/* }}} */
+
+/* {{{ _php_free_argv */
+static void _php_free_argv(char **argv, int is_persistent)
+{
+	if (argv) {
+		char **ap = NULL;
+
+		for (ap = argv; *ap; ap++) {
+			pefree(*ap, is_persistent);
+		}
+		pefree(argv, is_persistent);
+	}
+}
+/* }}} */
+
+#endif
+
 /* {{{ _php_array_to_envp */
 static php_process_env_t _php_array_to_envp(zval *environment, int is_persistent TSRMLS_DC)
 {
@@ -177,8 +227,6 @@
 	}

 	assert(p - env.envp = sizeenv);
-
-	zend_hash_internal_pointer_reset_ex(target_hash, pos);

 	return env;
 }
@@ -243,6 +291,7 @@
 	FG(pclose_ret) = -1;
 #endif
 	_php_free_envp(proc-env, proc-is_persistent);
+	_php_free_argv(proc-argv, proc-is_persistent);
 	pefree(proc-command, proc-is_persistent);
 	pefree(proc, proc-is_persistent);

@@ -465,6 +514,7 @@
Run a process with more control over it's file descriptors */
 PHP_FUNCTION(proc_open)
 {
+	zval *command_with_args = NULL;
 	char *command, *cwd=NULL;
 	int command_len, cwd_len = 0;
 	zval *descriptorspec;
@@ -477,6 +527,7 @@
 	zval **descitem = NULL;
 	HashPosition pos;
 	struct php_proc_open_descriptor_item descriptors[PHP_PROC_OPEN_MAX_DESCRIPTORS];
+	char** child_argv = NULL;
 #ifdef PHP_WIN32
 	PROCESS_INFORMATION pi;
 	HANDLE childHandle;
@@ -488,7 +539,6 @@
 	UINT old_error_mode;
 #endif
 #ifdef NETWARE
-	char** child_argv = NULL;
 	char* command_dup = NULL;
 	char* orig_cwd = NULL;
 	int command_num_args = 0;
@@ -499,43 +549,85 @@
 	int is_persistent = 0; /* TODO: 

[PHP-CVS] svn: php/php-src/branches/PHP_5_3/

2009-07-19 Thread Nuno Lopes
nlopess Sun, 19 Jul 2009 14:57:28 +

URL: http://svn.php.net/viewvc?view=revisionrevision=284355

Changed paths:
_U  php/php-src/branches/PHP_5_3/
_U  php/php-src/branches/PHP_5_3/pear/
_U  php/php-src/branches/PHP_5_3/sapi/cli/
_U  php/php-src/branches/PHP_5_3/scripts/
_U  php/php-src/branches/PHP_5_3/scripts/man1/

Log:
ignore a few generated files


Property changes on: php/php-src/branches/PHP_5_3
___
Modified: svn:ignore
   - Makefile.objects
Makefile.fragments
Makefile
acconfig.h
aclocal.m4
autom4te.cache
bsd_converted
buildmk.stamp
buildconf.stamp
config.h.in
config.cache
config.log
config.status
config_vars.mk
configuration-parser.c
configuration-parser.h
configuration-parser.output
configuration-scanner.c
configure
configure.bat
conftest
conftest.c
generated_lists
meta_cc
meta_ccld
mkinstalldirs
missing
install-sh
internal_functions.c
libtool
shlibtool
php
php5.spec
stamp-h
test.php3
*.lo
*.la
libs
modules
php-*.tar.gz
want_dependencies
deps
config.nice
php_version.h
*.plg
*.opt
*.ncb
Release
Release_inline
Debug
Release_TS
Release_TSDbg
Release_TS_inline
Debug_TS
results.txt
libs
_libs
include
autom4te.cache
FBCIndex
FBCLockFolder
debug.log
confdefs.h
configure.js
config.nice.bat
configure.bat
ZendEngine1
php_test_results_*.txt
*.gcda
*.gcno
lcov_data
lcov_html
php_lcov.info
tmp-php.ini

   + Makefile.objects
Makefile.fragments
Makefile
acconfig.h
aclocal.m4
autom4te.cache
bsd_converted
buildmk.stamp
buildconf.stamp
config.h.in
config.cache
config.log
config.status
config_vars.mk
configuration-parser.c
configuration-parser.h
configuration-parser.output
configuration-scanner.c
configure
configure.bat
conftest
conftest.c
generated_lists
meta_cc
meta_ccld
mkinstalldirs
missing
install-sh
internal_functions.c
libtool
shlibtool
php
php5.spec
stamp-h
test.php3
*.lo
*.la
libs
modules
php-*.tar.gz
want_dependencies
deps
config.nice
php_version.h
*.plg
*.opt
*.ncb
Release
Release_inline
Debug
Release_TS
Release_TSDbg
Release_TS_inline
Debug_TS
results.txt
libs
_libs
include
autom4te.cache
FBCIndex
FBCLockFolder
debug.log
confdefs.h
configure.js
config.nice.bat
configure.bat
ZendEngine1
php_test_results_*.txt
*.gcda
*.gcno
lcov_data
lcov_html
php_lcov.info
tmp-php.ini
diff



Property changes on: php/php-src/branches/PHP_5_3/pear
___
Modified: svn:ignore
   - install-pear-nozlib.phar
Makefile
deps
phpize
run-tests
php-config
test.php
*.gcda
*.gcno

   + install-pear-nozlib.phar
Makefile
deps
phpize
run-tests
php-config
test.php
*.gcda
*.gcno
scripts



Property changes on: php/php-src/branches/PHP_5_3/sapi/cli
___
Added: svn:ignore
   + php
php.1



Property changes on: php/php-src/branches/PHP_5_3/scripts
___
Added: svn:ignore
   + php-config
phpize



Property changes on: php/php-src/branches/PHP_5_3/scripts/man1
___
Added: svn:ignore
   + *.1


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] svn: php/php-src/branches/PHP_5_2/win32/

2009-07-11 Thread Nuno Lopes
Just FYI, this file (and php-src/INSTALL) used to be generated automatically 
from phpdoc sources.
I used to do this myself, but I haven't done it for quite some time now, so 
I don't know what's the status. Does anyone knows?


Nuno


- Original Message -

rasmus Sat, 11 Jul 2009 04:14:29 +

ViewVC URL: http://svn.php.net/viewvc?view=revisionrevision=283787

Changed paths:
U   php/php-src/branches/PHP_5_2/win32/install.txt

Log:
Test commit - but pseudo useful


Modified: php/php-src/branches/PHP_5_2/win32/install.txt
===
--- php/php-src/branches/PHP_5_2/win32/install.txt 2009-07-11 02:47:38 UTC 
(rev 283786)
+++ php/php-src/branches/PHP_5_2/win32/install.txt 2009-07-11 04:14:29 UTC 
(rev 283787)

@@ -883,7 +883,7 @@
   http://snaps.php.net/php5-latest.tar.gz or download binaries for
   Windows http://snaps.php.net/win32/php5-win32-latest.zip.
 * a prerelease version downloadable from http://qa.php.net/.
- * you have always the option to obtain PHP through anonymous CVS.
+ * you have always the option to obtain PHP through SVN.

 These versions of PHP are compatible to Apache 2.0.40 and later.

@@ -1428,8 +1428,8 @@

   When building PHP modules, it's important to have known-good versions
   of the required tools (autoconf, automake, libtool, etc.) See the
-   Anonymous CVS Instructions for details on the required tools, and
-   required versions.
+   SVN Instructions for details on the required tools, and required
+   versions.
 __

Downloading PECL extensions
@@ -1445,14 +1445,12 @@
   PECL extensions that have releases listed on the PECL web site are
   available for download and installation using the pecl command.
   Specific revisions may also be specified.
- * CVS
-   Most PECL extensions also reside in CVS. A web-based view may be
-   seen at http://cvs.php.net/pecl/. To download straight from CVS,
-   the following sequence of commands may be used. Note that phpfi is
-   the password for user cvsread:
+ * SVN
+   Most PECL extensions also reside in SVN. A web-based view may be
+   seen at http://svn.php.net/pecl/. To download straight from SVN,
+   the following sequence of commands may be used.

-$ cvs -d:pserver:cvsr...@cvs.php.net:/repository login
-$ cvs -d:pserver:cvsr...@cvs.php.net:/repository co pecl/extname
+$ svn  co http://svn.php.net/repository/pecl/extname/trunk

 * Windows downloads
   Windows users may find compiled PECL binaries by downloading the
@@ -1500,7 +1498,7 @@
   Sometimes, using the pecl installer is not an option. This could be
   because you're behind a firewall, or it could be because the extension
   you want to install is not available as a PECL compatible package, such
-   as unreleased extensions from CVS. If you need to build such an
+   as unreleased extensions from SVN. If you need to build such an
   extension, you can use the lower-level build tools to perform the build
   manually.

@@ -1647,7 +1645,7 @@
   directives are documented in the manual though. For a complete list of
   directives available in your PHP version, please read your well
   commented php.ini file. Alternatively, you may find the the latest
-   php.ini from CVS helpful too.
+   php.ini from SVN helpful too.

   Example 5-1. php.ini example
; any text on a line after an unquoted semicolon (;) is ignored 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: php/php-src/branches/PHP_5_2/win32/

2009-07-11 Thread Nuno Lopes

On Sat, Jul 11, 2009 at 13:14, Nuno Lopesnlop...@php.net wrote:
Just FYI, this file (and php-src/INSTALL) used to be generated 
automatically

from phpdoc sources.
I used to do this myself, but I haven't done it for quite some time now, 
so

I don't know what's the status. Does anyone knows?


Nope.

We found out, just before the 5.3.0 release, that it was very very
outofdate but couldnt figureout how to generate it so Johannes made
some 'manual changes' to it.


Ok, so let me summarize how it used to work:
First we generated a .html file that included the whole install + install 
faq sections of the manual (with openjade at the time :). Then we used lynx 
to produce the .txt file out of the .html file.
The difference between INSTALL and install.txt was the included sections. We 
excluded non-interesting sections from the souce .xmls files before 
generating the html.


In the old phpdoc/Makefile.in you can find this:
%.txt: %.html
   lynx -nolist -dump file:`pwd`/$  $@

And the source .xml files can still be found in CVS:
http://cvs.php.net/viewvc.cgi/phpdoc/install-unix.xml?view=markup
http://cvs.php.net/viewvc.cgi/phpdoc/install-win.xml?view=markup


Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/standard/tests/misc time_nanosleep_error4.phpt

2009-07-01 Thread Nuno Lopes

kalle Wed Jul  1 20:26:37 2009 UTC

 Modified files:
   /php-src/ext/standard/tests/misc time_nanosleep_error4.phpt
 Log:
 Fix test on Windows

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt
diff -u php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt:1.2 
php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt:1.3
--- php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt:1.2 Tue Jun 
16 19:49:04 2009
+++ php-src/ext/standard/tests/misc/time_nanosleep_error4.phpt Wed Jul  1 
20:26:37 2009

@@ -1,8 +1,8 @@
---TEST--
+--TEST--


what out for the BOM here and in the other commit you did today.

Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: phpruntests /documentation ParallelExecutionStrategy.odp

2009-06-30 Thread Nuno Lopes

Hi,

The file was added in ASCII. Please remove it and readd it as binary. You 
can do that with:

cvs  -kb file.odp

Nuno


zoe Tue Jun 30 09:41:23 2009 UTC

 Added files:
   /phpruntests/documentation ParallelExecutionStrategy.odp
 Log:
 parallel execution diagram 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/pdo_firebird config.m4

2009-05-24 Thread Nuno Lopes
This changes the default directory of the lib, so I don't think it's 
suitable for a bugfix-only branch.
Anyway, noone complained about this problem (except myself), although it has 
been around forever.


Nuno

- Original Message -

And PHP_5_2 ..?


Nuno Lopes kirjoitti:

nlopess Sat May 23 13:52:53 2009 UTC

  Modified files:  /php-src/ext/pdo_firebird config.m4 Log:
  MFB: fix compilation of pdo_firebird and intl extension with 
ld --as-needed


http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_firebird/config.m4?r1=1.11r2=1.12diff_format=u
Index: php-src/ext/pdo_firebird/config.m4
diff -u php-src/ext/pdo_firebird/config.m4:1.11 
php-src/ext/pdo_firebird/config.m4:1.12

--- php-src/ext/pdo_firebird/config.m4:1.11 Fri Jul 25 13:38:40 2008
+++ php-src/ext/pdo_firebird/config.m4 Sat May 23 13:52:53 2009
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.11 2008/07/25 13:38:40 jani Exp $
+dnl $Id: config.m4,v 1.12 2009/05/23 13:52:53 nlopess Exp $
 dnl
 PHP_ARG_WITH(pdo-firebird,for Firebird support for PDO,
@@ -13,11 +13,13 @@
   fi
 if test $PHP_PDO_FIREBIRD = yes; then
-FIREBIRD_INCDIR=/opt/firebird/include
-FIREBIRD_LIBDIR=/opt/firebird/lib
+FIREBIRD_INCDIR=
+FIREBIRD_LIBDIR=
+FIREBIRD_LIBDIR_FLAG=
   else
 FIREBIRD_INCDIR=$PHP_PDO_FIREBIRD/include
 FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/$PHP_LIBDIR
+FIREBIRD_LIBDIR_FLAG=-L$FIREBIRD_LIBDIR
   fi
 PHP_CHECK_LIBRARY(fbclient, isc_detach_database,
@@ -34,13 +36,13 @@
   ], [
 AC_MSG_ERROR([libfbclient, libgds or libib_util not found! Check 
config.log for more information.])

   ], [
--L$FIREBIRD_LIBDIR
+$FIREBIRD_LIBDIR_FLAG
   ])
 ], [
-  -L$FIREBIRD_LIBDIR
+  $FIREBIRD_LIBDIR_FLAG
 ])
   ], [
--L$FIREBIRD_LIBDIR
+$FIREBIRD_LIBDIR_FLAG
   ])
  PHP_CHECK_PDO_INCLUDES 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo_firebird config.m4

2009-05-23 Thread Nuno Lopes
nlopess Sat May 23 13:52:01 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/pdo_firebird   config.m4 
  Log:
  fix compilation of pdo_firebird and intl extension with ld --as-needed
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_firebird/config.m4?r1=1.8.4.2.2.1r2=1.8.4.2.2.2diff_format=u
Index: php-src/ext/pdo_firebird/config.m4
diff -u php-src/ext/pdo_firebird/config.m4:1.8.4.2.2.1 
php-src/ext/pdo_firebird/config.m4:1.8.4.2.2.2
--- php-src/ext/pdo_firebird/config.m4:1.8.4.2.2.1  Fri Jul 25 13:46:23 2008
+++ php-src/ext/pdo_firebird/config.m4  Sat May 23 13:52:00 2009
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.8.4.2.2.1 2008/07/25 13:46:23 jani Exp $
+dnl $Id: config.m4,v 1.8.4.2.2.2 2009/05/23 13:52:00 nlopess Exp $
 dnl
 
 PHP_ARG_WITH(pdo-firebird,for Firebird support for PDO,
@@ -13,11 +13,13 @@
   fi
 
   if test $PHP_PDO_FIREBIRD = yes; then
-FIREBIRD_INCDIR=/opt/firebird/include
-FIREBIRD_LIBDIR=/opt/firebird/lib
+FIREBIRD_INCDIR=
+FIREBIRD_LIBDIR=
+FIREBIRD_LIBDIR_FLAG=
   else
 FIREBIRD_INCDIR=$PHP_PDO_FIREBIRD/include
 FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/$PHP_LIBDIR
+FIREBIRD_LIBDIR_FLAG=-L$FIREBIRD_LIBDIR
   fi
 
   PHP_CHECK_LIBRARY(fbclient, isc_detach_database,
@@ -34,13 +36,13 @@
   ], [
 AC_MSG_ERROR([libfbclient, libgds or libib_util not found! Check 
config.log for more information.])
   ], [
--L$FIREBIRD_LIBDIR
+$FIREBIRD_LIBDIR_FLAG
   ])
 ], [
-  -L$FIREBIRD_LIBDIR
+  $FIREBIRD_LIBDIR_FLAG
 ])
   ], [
--L$FIREBIRD_LIBDIR
+$FIREBIRD_LIBDIR_FLAG
   ])
  
   PHP_CHECK_PDO_INCLUDES



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/pdo_firebird config.m4

2009-05-23 Thread Nuno Lopes
nlopess Sat May 23 13:52:53 2009 UTC

  Modified files:  
/php-src/ext/pdo_firebird   config.m4 
  Log:
  MFB: fix compilation of pdo_firebird and intl extension with ld --as-needed
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_firebird/config.m4?r1=1.11r2=1.12diff_format=u
Index: php-src/ext/pdo_firebird/config.m4
diff -u php-src/ext/pdo_firebird/config.m4:1.11 
php-src/ext/pdo_firebird/config.m4:1.12
--- php-src/ext/pdo_firebird/config.m4:1.11 Fri Jul 25 13:38:40 2008
+++ php-src/ext/pdo_firebird/config.m4  Sat May 23 13:52:53 2009
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.11 2008/07/25 13:38:40 jani Exp $
+dnl $Id: config.m4,v 1.12 2009/05/23 13:52:53 nlopess Exp $
 dnl
 
 PHP_ARG_WITH(pdo-firebird,for Firebird support for PDO,
@@ -13,11 +13,13 @@
   fi
 
   if test $PHP_PDO_FIREBIRD = yes; then
-FIREBIRD_INCDIR=/opt/firebird/include
-FIREBIRD_LIBDIR=/opt/firebird/lib
+FIREBIRD_INCDIR=
+FIREBIRD_LIBDIR=
+FIREBIRD_LIBDIR_FLAG=
   else
 FIREBIRD_INCDIR=$PHP_PDO_FIREBIRD/include
 FIREBIRD_LIBDIR=$PHP_PDO_FIREBIRD/$PHP_LIBDIR
+FIREBIRD_LIBDIR_FLAG=-L$FIREBIRD_LIBDIR
   fi
 
   PHP_CHECK_LIBRARY(fbclient, isc_detach_database,
@@ -34,13 +36,13 @@
   ], [
 AC_MSG_ERROR([libfbclient, libgds or libib_util not found! Check 
config.log for more information.])
   ], [
--L$FIREBIRD_LIBDIR
+$FIREBIRD_LIBDIR_FLAG
   ])
 ], [
-  -L$FIREBIRD_LIBDIR
+  $FIREBIRD_LIBDIR_FLAG
 ])
   ], [
--L$FIREBIRD_LIBDIR
+$FIREBIRD_LIBDIR_FLAG
   ])
  
   PHP_CHECK_PDO_INCLUDES



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /win32 php_stdint.h

2009-05-04 Thread Nuno Lopes

pajoye Mon May  4 20:32:33 2009 UTC

 Modified files:
   /php-src/win32 php_stdint.h
 Log:
 - a  macro will just do it too

http://cvs.php.net/viewvc.cgi/php-src/win32/php_stdint.h?r1=1.5r2=1.6diff_format=u
Index: php-src/win32/php_stdint.h
diff -u php-src/win32/php_stdint.h:1.5 php-src/win32/php_stdint.h:1.6
--- php-src/win32/php_stdint.h:1.5 Mon May  4 17:10:26 2009
+++ php-src/win32/php_stdint.h Mon May  4 20:32:33 2009
@@ -264,7 +264,7 @@
#define INTMAX_C   INT64_C
#define UINTMAX_C  UINT64_C

-static inline int64_t llabs( int64_t i ) { return i = 0? i: -i; }
+#define llabs(i) (i = 0? i : -i)


what about multiple evaluation problems? (e.g. llabs(some_function_call()) )

Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/lib parse_tz.c

2009-04-25 Thread Nuno Lopes
nlopess Sat Apr 25 16:33:41 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/lib   parse_tz.c 
  Log:
  fix strict aliasing problems.
  this should fix the crash that Sebastian was having with gcc 4.4. Please 
confirm this is the case
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_tz.c?r1=1.20.2.6.2.13.2.5r2=1.20.2.6.2.13.2.6diff_format=u
Index: php-src/ext/date/lib/parse_tz.c
diff -u php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.13.2.5 
php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.13.2.6
--- php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.13.2.5   Wed Dec 31 11:15:35 2008
+++ php-src/ext/date/lib/parse_tz.c Sat Apr 25 16:33:41 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_tz.c,v 1.20.2.6.2.13.2.5 2008/12/31 11:15:35 sebastian Exp $ */
+/* $Id: parse_tz.c,v 1.20.2.6.2.13.2.6 2009/04/25 16:33:41 nlopess Exp $ */
 
 #include timelib.h
 
@@ -49,7 +49,7 @@
 #define timelib_conv_int(l) ((l  0x00ff)  24) + ((l  0xff00)  8) 
+ ((l  0x00ff)  8) + ((l  0xff00)  24)
 #endif
 
-static void read_preamble(char **tzf, timelib_tzinfo *tz)
+static void read_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
 {
/* skip ID */
*tzf += 4;
@@ -67,7 +67,7 @@
*tzf += 13;
 }
 
-static void read_header(char **tzf, timelib_tzinfo *tz)
+static void read_header(const unsigned char **tzf, timelib_tzinfo *tz)
 {
uint32_t buffer[6];
 
@@ -81,7 +81,7 @@
*tzf += sizeof(buffer);
 }
 
-static void read_transistions(char **tzf, timelib_tzinfo *tz)
+static void read_transistions(const unsigned char **tzf, timelib_tzinfo *tz)
 {
int32_t *buffer = NULL;
uint32_t i;
@@ -110,7 +110,7 @@
tz-trans_idx = cbuffer;
 }
 
-static void read_types(char **tzf, timelib_tzinfo *tz)
+static void read_types(const unsigned char **tzf, timelib_tzinfo *tz)
 {
unsigned char *buffer;
int32_t *leap_buffer;
@@ -191,7 +191,7 @@
}
 }
 
-static void read_location(char **tzf, timelib_tzinfo *tz)
+static void read_location(const unsigned char **tzf, timelib_tzinfo *tz)
 {
uint32_t buffer[3];
uint32_t comments_len;
@@ -317,11 +317,11 @@
if (seek_to_tz_position(tzf, timezone, tzdb)) {
tmp = timelib_tzinfo_ctor(timezone);
 
-   read_preamble((char**) tzf, tmp);
-   read_header((char**) tzf, tmp);
-   read_transistions((char**) tzf, tmp);
-   read_types((char**) tzf, tmp);
-   read_location((char**) tzf, tmp);
+   read_preamble(tzf, tmp);
+   read_header(tzf, tmp);
+   read_transistions(tzf, tmp);
+   read_types(tzf, tmp);
+   read_location(tzf, tmp);
} else {
tmp = NULL;
}



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date/lib parse_tz.c

2009-04-25 Thread Nuno Lopes
nlopess Sat Apr 25 16:42:24 2009 UTC

  Modified files:  
/php-src/ext/date/lib   parse_tz.c 
  Log:
  MFB: fix strict aliasing issues
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_tz.c?r1=1.40r2=1.41diff_format=u
Index: php-src/ext/date/lib/parse_tz.c
diff -u php-src/ext/date/lib/parse_tz.c:1.40 
php-src/ext/date/lib/parse_tz.c:1.41
--- php-src/ext/date/lib/parse_tz.c:1.40Tue Mar 10 23:39:12 2009
+++ php-src/ext/date/lib/parse_tz.c Sat Apr 25 16:42:24 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_tz.c,v 1.40 2009/03/10 23:39:12 helly Exp $ */
+/* $Id: parse_tz.c,v 1.41 2009/04/25 16:42:24 nlopess Exp $ */
 
 #include timelib.h
 
@@ -45,7 +45,7 @@
 #define timelib_conv_int(l) ((l  0x00ff)  24) + ((l  0xff00)  8) 
+ ((l  0x00ff)  8) + ((l  0xff00)  24)
 #endif
 
-static void read_preamble(char **tzf, timelib_tzinfo *tz)
+static void read_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
 {
/* skip ID */
*tzf += 4;
@@ -63,7 +63,7 @@
*tzf += 13;
 }
 
-static void read_header(char **tzf, timelib_tzinfo *tz)
+static void read_header(const unsigned char **tzf, timelib_tzinfo *tz)
 {
uint32_t buffer[6];
 
@@ -77,7 +77,7 @@
*tzf += sizeof(buffer);
 }
 
-static void read_transistions(char **tzf, timelib_tzinfo *tz)
+static void read_transistions(const unsigned char **tzf, timelib_tzinfo *tz)
 {
int32_t *buffer = NULL;
uint32_t i;
@@ -106,7 +106,7 @@
tz-trans_idx = cbuffer;
 }
 
-static void read_types(char **tzf, timelib_tzinfo *tz)
+static void read_types(const unsigned char **tzf, timelib_tzinfo *tz)
 {
unsigned char *buffer;
int32_t *leap_buffer;
@@ -187,7 +187,7 @@
}
 }
 
-static void read_location(char **tzf, timelib_tzinfo *tz)
+static void read_location(const unsigned char **tzf, timelib_tzinfo *tz)
 {
uint32_t buffer[3];
uint32_t comments_len;
@@ -296,11 +296,11 @@
if (seek_to_tz_position(tzf, timezone, tzdb)) {
tmp = timelib_tzinfo_ctor(timezone);
 
-   read_preamble((char**) tzf, tmp);
-   read_header((char**) tzf, tmp);
-   read_transistions((char**) tzf, tmp);
-   read_types((char**) tzf, tmp);
-   read_location((char**) tzf, tmp);
+   read_preamble(tzf, tmp);
+   read_header(tzf, tmp);
+   read_transistions(tzf, tmp);
+   read_types(tzf, tmp);
+   read_location(tzf, tmp);
} else {
tmp = NULL;
}



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pcre php_pcre.c /ext/pcre/tests bug47662.phpt

2009-04-14 Thread Nuno Lopes
nlopess Tue Apr 14 20:31:32 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/pcre/tests bug47662.phpt 

  Modified files:  
/php-src/ext/pcre   php_pcre.c 
  Log:
  MFH: fix bug #47662: support more than 127 named subpatterns
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.30r2=1.168.2.9.2.31diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.30 
php-src/ext/pcre/php_pcre.c:1.168.2.9.2.31
--- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.30  Tue Jan 13 19:23:31 2009
+++ php-src/ext/pcre/php_pcre.c Tue Apr 14 20:31:31 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.168.2.9.2.30 2009/01/13 19:23:31 andrei Exp $ */
+/* $Id: php_pcre.c,v 1.168.2.9.2.31 2009/04/14 20:31:31 nlopess Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -209,7 +209,7 @@
}
 
while (ni++  name_cnt) {
-   name_idx = 0xff * name_table[0] + name_table[1];
+   name_idx = 0xff * (unsigned char)name_table[0] + 
(unsigned char)name_table[1];
subpat_names[name_idx] = name_table + 2;
if (is_numeric_string(subpat_names[name_idx], 
strlen(subpat_names[name_idx]), NULL, NULL, 0)  0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Numeric named subpatterns are not allowed);

http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug47662.phpt?view=markuprev=1.1
Index: php-src/ext/pcre/tests/bug47662.phpt
+++ php-src/ext/pcre/tests/bug47662.phpt



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/pcre/pcrelib AUTHORS ChangeLog LICENCE NEWS NON-UNIX-USE README config.h dftables.c pcre.h pcre_compile.c pcre_config.c pcre_exec.c pcre_fullinfo.c pcr

2009-04-14 Thread Nuno Lopes

Ok, done.
Nuno


We should upgrade the lib for 5.2 as well.

Ilia Alshanetsky

On 11-Apr-09, at 2:57 PM, Nuno Lopes wrote:


nlopess Sat Apr 11 18:57:29 2009 UTC7
 Log:
 upgrade PCRE to version 7.9


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pcre php_pcre.c /ext/pcre/tests bug47662.phpt

2009-04-10 Thread Nuno Lopes
nlopess Fri Apr 10 15:47:15 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/pcre/tests bug47662.phpt 

  Modified files:  
/php-src/ext/pcre   php_pcre.c 
  Log:
  fix bug #47662: support more than 127 named subpatterns
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.21.2.30r2=1.168.2.9.2.21.2.31diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.30 
php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.31
--- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.30 Wed Jan 28 22:39:30 2009
+++ php-src/ext/pcre/php_pcre.c Fri Apr 10 15:47:15 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.168.2.9.2.21.2.30 2009/01/28 22:39:30 nlopess Exp $ */
+/* $Id: php_pcre.c,v 1.168.2.9.2.21.2.31 2009/04/10 15:47:15 nlopess Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -209,7 +209,7 @@
}
 
while (ni++  name_cnt) {
-   name_idx = 0xff * name_table[0] + name_table[1];
+   name_idx = 0xff * (unsigned char)name_table[0] + 
(unsigned char)name_table[1];
subpat_names[name_idx] = name_table + 2;
if (is_numeric_string(subpat_names[name_idx], 
strlen(subpat_names[name_idx]), NULL, NULL, 0)  0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Numeric named subpatterns are not allowed);

http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug47662.phpt?view=markuprev=1.1
Index: php-src/ext/pcre/tests/bug47662.phpt
+++ php-src/ext/pcre/tests/bug47662.phpt



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/pcre php_pcre.c /ext/pcre/tests bug47662.phpt

2009-04-10 Thread Nuno Lopes
nlopess Fri Apr 10 15:48:22 2009 UTC

  Modified files:  
/php-src/ext/pcre   php_pcre.c 
/php-src/ext/pcre/tests bug47662.phpt 
  Log:
  MFB: fix #47662
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.250r2=1.251diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.250 php-src/ext/pcre/php_pcre.c:1.251
--- php-src/ext/pcre/php_pcre.c:1.250   Mon Mar 30 14:21:03 2009
+++ php-src/ext/pcre/php_pcre.c Fri Apr 10 15:48:22 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.250 2009/03/30 14:21:03 kalle Exp $ */
+/* $Id: php_pcre.c,v 1.251 2009/04/10 15:48:22 nlopess Exp $ */
 
 /*  TODO
  *  php_pcre_replace_impl():
@@ -220,7 +220,7 @@
}
 
while (ni++  name_cnt) {
-   name_idx = 0xff * name_table[0] + name_table[1];
+   name_idx = 0xff * (unsigned char)name_table[0] + 
(unsigned char)name_table[1];
subpat_names[name_idx] = name_table + 2;
if (is_numeric_string(subpat_names[name_idx], 
strlen(subpat_names[name_idx]), NULL, NULL, 0)  0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Numeric named subpatterns are not allowed);
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug47662.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/pcre/tests/bug47662.phpt
diff -u /dev/null php-src/ext/pcre/tests/bug47662.phpt:1.2
--- /dev/null   Fri Apr 10 15:48:22 2009
+++ php-src/ext/pcre/tests/bug47662.phptFri Apr 10 15:48:22 2009
@@ -0,0 +1,18 @@
+--TEST--
+Bug #47662 (support more than 127 named subpatterns)
+--FILE--
+?php
+
+$regex = '@';
+for($bar=0; $bar1027; $bar++) {
+   $regex .= '((?Px'.$bar.'))';
+}
+$regex .= 'fo+bar@';
+
+var_dump(preg_match($regex, 'foobar'));
+echo Done!\n;
+
+?
+--EXPECT--
+int(1)
+Done!



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings highlight_file.phpt ZendEngine2 zend_language_scanner.c zend_language_scanner.l zend_language_scanner_defs.h zend_stream.h

2009-03-12 Thread Nuno Lopes

shire Wed Mar 11 22:11:54 2009 UTC

 Modified files:  (Branch: PHP_5_3)
   /ZendEngine2 zend_language_scanner.c zend_language_scanner.l
   zend_language_scanner_defs.h zend_stream.h
   /php-src/ext/standard/tests/strings highlight_file.phpt
 Log:
 MFH: Add proper EOF handling for language scanner.  Fixes bug #46817.


This is not really the right fix.. I can accept this solution *temporarily*, 
but this breaks BC..
We need a better solution in the long run. I'm sorry but I haven't had time 
to work on this lately..


Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: CVSROOT / avail loginfo

2009-02-28 Thread Nuno Lopes

Thanks Philip!
Nuno

- Original Message - 
From: Philip Olson phi...@php.net

To: php-cvs@lists.php.net
Sent: Wednesday, February 25, 2009 7:23 AM
Subject: [PHP-CVS] cvs: CVSROOT / avail loginfo



philip Wed Feb 25 07:23:06 2009 UTC

 Modified files:
   /CVSROOT avail loginfo
 Log:
 Added php-benchmarks
 # With initial karma for nuno and paul


http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1496r2=1.1497diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1496 CVSROOT/avail:1.1497
--- CVSROOT/avail:1.1496 Mon Feb 23 16:10:41 2009
+++ CVSROOT/avail Wed Feb 25 07:23:05 2009
@@ -354,6 +354,9 @@
avail|pajoye,rrichards,auroraeosrose|php-internals-win
avail|pajoye,guilhermeblanco,auroraeosrose,rrichards|php-windows-web

+# php-benchmarks karma
+avail|nlopess,pbiggar|php-benchmarks
+
# SVN conversion repo
avail|gwynne|SVNROOT

http://cvs.php.net/viewvc.cgi/CVSROOT/loginfo?r1=1.133r2=1.134diff_format=u
Index: CVSROOT/loginfo
diff -u CVSROOT/loginfo:1.133 CVSROOT/loginfo:1.134
--- CVSROOT/loginfo:1.133 Mon Nov 10 19:19:31 2008
+++ CVSROOT/loginfo Wed Feb 25 07:23:06 2009
@@ -1,5 +1,5 @@
#
-#ident @(#)cvs/examples:$Name:  $:$Id: loginfo,v 1.133 2008/11/10 
19:19:31 gwynne Exp $
+#ident @(#)cvs/examples:$Name:  $:$Id: loginfo,v 1.134 2009/02/25 
07:23:06 philip Exp $

#
# The loginfo file is used to control where cvs commit log information
# is sent.  The first entry on a line is a regular expression which is 
tested

@@ -106,7 +106,8 @@
^pecl$CVSROOT/CVSROOT/loginfo.pl pecl-...@lists.php.net$USER 
%{sVv}


# QA website
-^qaweb   $CVSROOT/CVSROOT/loginfo.pl php...@lists.php.net  $USER 
%{sVv}
+^qaweb  $CVSROOT/CVSROOT/loginfo.pl php...@lists.php.net 
$USER %{sVv}
+^php-benchmarks $CVSROOT/CVSROOT/loginfo.pl php...@lists.php.net 
$USER %{sVv}


# presentation-related stuff
^pres$CVSROOT/CVSROOT/loginfo.pl p...@lists.php.net$USER 
%{sVv}




--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard/tests/file bug46347.phpt ZendEngine2 zend_ini_scanner.l

2009-02-02 Thread Nuno Lopes
nlopess Mon Feb  2 19:25:30 2009 UTC

  Modified files:  
/ZendEngine2zend_ini_scanner.l 
/php-src/ext/standard/tests/filebug46347.phpt 
  Log:
  MFB: fix #46347
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini_scanner.l?r1=1.60r2=1.61diff_format=u
Index: ZendEngine2/zend_ini_scanner.l
diff -u ZendEngine2/zend_ini_scanner.l:1.60 ZendEngine2/zend_ini_scanner.l:1.61
--- ZendEngine2/zend_ini_scanner.l:1.60 Fri Jan  2 20:36:30 2009
+++ ZendEngine2/zend_ini_scanner.l  Mon Feb  2 19:25:30 2009
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: zend_ini_scanner.l,v 1.60 2009/01/02 20:36:30 felipe Exp $ */
+/* $Id: zend_ini_scanner.l,v 1.61 2009/02/02 19:25:30 nlopess Exp $ */
 
 #include errno.h
 #include zend.h
@@ -309,7 +309,7 @@
 TABS_AND_SPACES [ \t]
 WHITESPACE [ \t]+
 CONSTANT [a-zA-Z][a-zA-Z0-9_]*
-LABEL [a-zA-Z0-9_][a-zA-Z0-9._-]*
+LABEL [a-zA-Z0-9_][a-zA-Z0-9*._-]*
 TOKENS [:,.\[\]'()|^+-/*=%$!~?...@{}]
 OPERATORS [|~()!]
 DOLLAR_CURLY ${
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug46347.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/bug46347.phpt
diff -u /dev/null php-src/ext/standard/tests/file/bug46347.phpt:1.2
--- /dev/null   Mon Feb  2 19:25:30 2009
+++ php-src/ext/standard/tests/file/bug46347.phpt   Mon Feb  2 19:25:30 2009
@@ -0,0 +1,24 @@
+--TEST--
+Bug #46347 (parse_ini_file() doesn't support * in keys)
+--FILE--
+?php
+
+$str =  EOF
+[section]
+part1.*.part2 = 1
+EOF;
+
+$file = __DIR__ . '/parse.ini';
+file_put_contents($file, $str);
+
+var_dump(parse_ini_file($file));
+?
+--CLEAN--
+?php
+unlink(__DIR__.'/parse.ini');
+?
+--EXPECT--
+array(1) {
+  [part1.*.part2]=
+  string(1) 1
+}



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard/tests/file bug46347.phpt ZendEngine2 zend_ini_scanner.l

2009-02-02 Thread Nuno Lopes
nlopess Mon Feb  2 19:23:13 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/filebug46347.phpt 

  Modified files:  
/php-srcNEWS 
/ZendEngine2zend_ini_scanner.l 
  Log:
  fix bug #46347: allow * in ini keys
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.480r2=1.2027.2.547.2.965.2.481diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.480 
php-src/NEWS:1.2027.2.547.2.965.2.481
--- php-src/NEWS:1.2027.2.547.2.965.2.480   Wed Jan 28 22:43:50 2009
+++ php-src/NEWSMon Feb  2 19:23:12 2009
@@ -2,6 +2,7 @@
 |||
 ?? ??? 2009, PHP 5.3.0 Beta 2
 - Fixed bug #47229 (preg_quote() should escape the '-' char). (Nuno)
+- Fixed bug #46347 (parse_ini_file() doesn't support * in keys). (Nuno)
 
 
 29 Jan 2009, PHP 5.3.0 Beta 1
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini_scanner.l?r1=1.41.2.2.2.2.2.15r2=1.41.2.2.2.2.2.16diff_format=u
Index: ZendEngine2/zend_ini_scanner.l
diff -u ZendEngine2/zend_ini_scanner.l:1.41.2.2.2.2.2.15 
ZendEngine2/zend_ini_scanner.l:1.41.2.2.2.2.2.16
--- ZendEngine2/zend_ini_scanner.l:1.41.2.2.2.2.2.15Fri Jan  2 20:45:41 2009
+++ ZendEngine2/zend_ini_scanner.l  Mon Feb  2 19:23:13 2009
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: zend_ini_scanner.l,v 1.41.2.2.2.2.2.15 2009/01/02 20:45:41 felipe Exp 
$ */
+/* $Id: zend_ini_scanner.l,v 1.41.2.2.2.2.2.16 2009/02/02 19:23:13 nlopess Exp 
$ */
 
 #include errno.h
 #include zend.h
@@ -308,7 +308,7 @@
 TABS_AND_SPACES [ \t]
 WHITESPACE [ \t]+
 CONSTANT [a-zA-Z][a-zA-Z0-9_]*
-LABEL [a-zA-Z0-9_][a-zA-Z0-9._-]*
+LABEL [a-zA-Z0-9_][a-zA-Z0-9*._-]*
 TOKENS [:,.\[\]'()|^+-/*=%$!~?...@{}]
 OPERATORS [|~()!]
 DOLLAR_CURLY ${

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug46347.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/bug46347.phpt
+++ php-src/ext/standard/tests/file/bug46347.phpt



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pcre php_pcre.c /ext/pcre/tests bug47229.phpt preg_quote_basic.phpt

2009-01-28 Thread Nuno Lopes
nlopess Wed Jan 28 22:39:33 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/pcre/tests bug47229.phpt 

  Modified files:  
/php-src/ext/pcre   php_pcre.c 
/php-src/ext/pcre/tests preg_quote_basic.phpt 
  Log:
  fix bug #47229: preg_quote should escape '-'
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.21.2.29r2=1.168.2.9.2.21.2.30diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.29 
php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.30
--- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.29 Wed Dec 31 11:15:40 2008
+++ php-src/ext/pcre/php_pcre.c Wed Jan 28 22:39:30 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.168.2.9.2.21.2.29 2008/12/31 11:15:40 sebastian Exp $ */
+/* $Id: php_pcre.c,v 1.168.2.9.2.21.2.30 2009/01/28 22:39:30 nlopess Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -1661,6 +1661,7 @@
case '':
case '|':
case ':':
+   case '-':
*q++ = '\\';
*q++ = c;
break;
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/preg_quote_basic.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/pcre/tests/preg_quote_basic.phpt
diff -u php-src/ext/pcre/tests/preg_quote_basic.phpt:1.1.4.2 
php-src/ext/pcre/tests/preg_quote_basic.phpt:1.1.4.3
--- php-src/ext/pcre/tests/preg_quote_basic.phpt:1.1.4.2Wed Nov 21 
18:22:01 2007
+++ php-src/ext/pcre/tests/preg_quote_basic.phptWed Jan 28 22:39:33 2009
@@ -17,7 +17,7 @@
 --EXPECT--
 
 $string_before looks like: /this *-has \ metacharacters^ in $
-$string_after looks like: \/this \*-has \\ metacharacters\^ in \$, with 
metacharacters and / (set as delimiter) escaped
+$string_after looks like: \/this \*\-has \\ metacharacters\^ in \$, with 
metacharacters and / (set as delimiter) escaped
 int(1)
 array(1) {
   [0]=

http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug47229.phpt?view=markuprev=1.1
Index: php-src/ext/pcre/tests/bug47229.phpt
+++ php-src/ext/pcre/tests/bug47229.phpt



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/pcre php_pcre.c /ext/pcre/tests bug47229.phpt preg_quote_basic.phpt

2009-01-28 Thread Nuno Lopes
nlopess Wed Jan 28 22:40:37 2009 UTC

  Modified files:  
/php-src/ext/pcre   php_pcre.c 
/php-src/ext/pcre/tests bug47229.phpt preg_quote_basic.phpt 
  Log:
  MFB: fix bug #47229: preg_quote should escape '-'
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.245r2=1.246diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.245 php-src/ext/pcre/php_pcre.c:1.246
--- php-src/ext/pcre/php_pcre.c:1.245   Wed Dec 31 11:12:34 2008
+++ php-src/ext/pcre/php_pcre.c Wed Jan 28 22:40:34 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.245 2008/12/31 11:12:34 sebastian Exp $ */
+/* $Id: php_pcre.c,v 1.246 2009/01/28 22:40:34 nlopess Exp $ */
 
 /*  TODO
  *  php_pcre_replace_impl():
@@ -1856,6 +1856,7 @@
case '':
case '|':
case ':':
+   case '-':
*q++ = '\\';
*q++ = c;
break;
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug47229.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/pcre/tests/bug47229.phpt
diff -u /dev/null php-src/ext/pcre/tests/bug47229.phpt:1.2
--- /dev/null   Wed Jan 28 22:40:36 2009
+++ php-src/ext/pcre/tests/bug47229.phptWed Jan 28 22:40:35 2009
@@ -0,0 +1,37 @@
+--TEST--
+Bug #47229 (preg_quote() doesn't escape -)
+--FILE--
+?php
+
+var_dump(preg_quote('-oh really?'));
+
+// make sure there's no regression in matching
+preg_match('/[a\-c]+/', 'a---b', $m);
+var_dump($m);
+
+preg_match('/[a\-c]+/', 'a\-', $m);
+var_dump($m);
+
+preg_match(/a\-{2,}/, 'aa', $m);
+var_dump($m);
+
+preg_match(/a\-{1,}/, 'a\a', $m);
+var_dump($m);
+
+?
+--EXPECT--
+string(13) \-oh really\?
+array(1) {
+  [0]=
+  string(4) a---
+}
+array(1) {
+  [0]=
+  string(1) a
+}
+array(1) {
+  [0]=
+  string(5) a
+}
+array(0) {
+}
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/preg_quote_basic.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/pcre/tests/preg_quote_basic.phpt
diff -u php-src/ext/pcre/tests/preg_quote_basic.phpt:1.3 
php-src/ext/pcre/tests/preg_quote_basic.phpt:1.4
--- php-src/ext/pcre/tests/preg_quote_basic.phpt:1.3Tue May 27 13:54:30 2008
+++ php-src/ext/pcre/tests/preg_quote_basic.phptWed Jan 28 22:40:36 2009
@@ -16,7 +16,7 @@
 ?
 --EXPECT--
 $string_before looks like: /this *-has \ metacharacters^ in $
-$string_after looks like: \/this \*-has \\ metacharacters\^ in \$, with 
metacharacters and / (set as delimiter) escaped
+$string_after looks like: \/this \*\-has \\ metacharacters\^ in \$, with 
metacharacters and / (set as delimiter) escaped
 int(1)
 array(1) {
   [0]=



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS

2009-01-28 Thread Nuno Lopes
nlopess Wed Jan 28 22:43:52 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.479r2=1.2027.2.547.2.965.2.480diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.479 
php-src/NEWS:1.2027.2.547.2.965.2.480
--- php-src/NEWS:1.2027.2.547.2.965.2.479   Wed Jan 28 22:09:55 2009
+++ php-src/NEWSWed Jan 28 22:43:50 2009
@@ -1,6 +1,7 @@
 PHPNEWS
 |||
 ?? ??? 2009, PHP 5.3.0 Beta 2
+- Fixed bug #47229 (preg_quote() should escape the '-' char). (Nuno)
 
 
 29 Jan 2009, PHP 5.3.0 Beta 1



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/pdo/tests bug_44159.phpt

2009-01-05 Thread Nuno Lopes
Well,.. at least it breaks BC. I think I prefer not breaking BC in this 
case, as it doesn't hurt much..

Nuno


- Original Message -
The fact that any line starting with # was ignored is actually a bug,  the 
original intent (even in 5.2 where the bug also exists in CLI) was  to 
handle #!/path/to/executable
With the new code the check is more strict looking for # followed  by !, I 
think its probably the desired behavior what do you guys think?



On 5-Jan-09, at 11:17 AM, Antony Dovgal wrote:


On 05.01.2009 19:06, Ilia Alshanetsky wrote:

Would it not be better to use :memory:, in memory DB and avoid the
file creation entirely, it'll also speed up test a bit.


Anything would do, as long as it doesn't pollute my /tmp dir.

Did you see this, btw: http://news.php.net/php.cvs/55354 ?



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/ftp/tests ftp_get_basic.phpt server.inc

2008-12-17 Thread Nuno Lopes

 Added files: (Branch: PHP_5_2)
   /php-src/ext/ftp/tests ftp_get_basic.phpt 

 Modified files:  
   /php-src/ext/ftp/tests server.inc 
 Log:

 New FTP test from Nathaniel McHugh



+++ php-src/ext/ftp/tests/ftp_get_basic.phpt
--TEST--
FTP ftp_get file for both binary and ASCII transfer modes 
--XFAIL--

Missing implementation in PHP6



Uhm, something doesn't match there (PHP 5.2 branch vs PHP 6 XFAIL).
Nuno

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   3   4   5   6   7   >