Commit Graph

12610 Commits

Author SHA1 Message Date
Nikita Popov
edcabf6d07 Drop unnecessary allocator return value checks 2017-03-13 22:07:15 +01:00
Nikita Popov
b3ca0c2500
zend-test extension to house code that is required for testing internal APIs, but that we would not want to expose for regular builds 2017-03-12 18:58:50 +00:00
Nikita Popov
22e6b5ef22 Merge branch 'PHP-7.1' 2017-03-10 18:21:09 +01:00
Nikita Popov
280e8dafe4 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-10 18:20:58 +01:00
Nikita Popov
29ee3e3c49 Fixed bug #73960 2017-03-10 18:20:32 +01:00
Remi Collet
ec31924cd6 Constify to void build warning for C++ ext. [-Wwrite-strings]
Example (with v8js):

/builddir/build/BUILD/php-pecl-v8js-1.3.4/NTS/v8js_class.cc: In function 'void v8js_execute_script(zval*, v8js_script*, long int, long int, long int, zval**)':
/usr/include/php/Zend/zend.h:204:57: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 #define zend_bailout()  _zend_bailout(__FILE__, __LINE__)
                                                         ^
/builddir/build/BUILD/php-pecl-v8js-1.3.4/NTS/v8js_class.cc:633:3: note: in expansion of macro 'zend_bailout'
   zend_bailout();
   ^~~~~~~~~~~~
2017-03-10 11:52:26 +01:00
Nikita Popov
8a34b33c59 Merge branch 'PHP-7.1' 2017-03-09 20:48:32 +01:00
Nikita Popov
305f3c2b76 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-09 20:48:24 +01:00
Nikita Popov
177f87cf05 Fixed bug #73370
If len=0 malloc() is allowed to return NULL.
2017-03-09 20:47:06 +01:00
Joe Watkins
89e403982c
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix bug #74149 static embed SAPI linkage error
2017-03-09 07:44:42 +00:00
Joe Watkins
8599ce4f18
Fix bug #74149 static embed SAPI linkage error 2017-03-09 07:43:58 +00:00
Anatol Belski
fdba33922a move to hash API for interned strings ht management 2017-03-07 19:01:00 +01:00
Nikita Popov
361b7159e7 Merge branch 'PHP-7.1' 2017-03-07 13:18:04 +01:00
Nikita Popov
8a6281455e Merge branch 'PHP-7.0' into PHP-7.1 2017-03-07 13:17:33 +01:00
Nikita Popov
549a30d2cd Fix out of bounds access in gc_find_additional_buffer() 2017-03-07 13:16:06 +01:00
Anatol Belski
c698299550 Interned strings unification for TS/NTS
Hereby, interned strings are supported in thread safe PHP. The patch
implements two types of interned strings

- interning per process, strings are not freed till process end
- interning per request, strings are freed at request end

There is no runtime interning.

With Opcache, all the permanent iterned strings are copied into SHM on
startup, additional copying into SHM might happen on demand.
2017-03-04 10:39:13 +01:00
Anatol Belski
834d13879f Merge branch 'PHP-7.1'
* PHP-7.1:
  improve signal globals consistency check for TS
2017-03-02 20:36:12 +01:00
Anatol Belski
1d4248af42 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  improve signal globals consistency check for TS
2017-03-02 20:34:48 +01:00
Anatol Belski
18f7e26257 improve signal globals consistency check for TS
Seems when we receive TERM, TLS is destroyed completely. In that case,
not only signal globals, but the entire globals array doesn't exist
anymore.
2017-03-02 20:27:27 +01:00
Anatol Belski
5b6ee004ba Merge branch 'PHP-7.1'
* PHP-7.1:
  do not try to handle signals, when globals are inconsistent
2017-03-02 16:43:10 +01:00
Anatol Belski
494fc16184 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  do not try to handle signals, when globals are inconsistent
2017-03-02 16:41:43 +01:00
Anatol Belski
c7b2c698d0 do not try to handle signals, when globals are inconsistent 2017-03-02 16:40:38 +01:00
Sara Golemon
5b52a44860 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix potential crash when setting invalid declare value
2017-02-28 17:18:08 -08:00
Sara Golemon
c5727a30cf Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix potential crash when setting invalid declare value
2017-02-28 17:17:41 -08:00
Sara Golemon
868930e079 Fix potential crash when setting invalid declare value
Using a non-literal expression in a declare value can cause the
compiler to crash trying to turn that AST node into a usable zval.

There was an existing test for such values using 'encoding',
but that didn't crash because it's handled by the lexer
rather than being compiled.

Trying to use a non-literal with ticks reproduces the crash.
2017-02-28 17:08:23 -08:00
Remi Collet
18293f9a6f Merge branch 'PHP-7.1'
* PHP-7.1:
  make test slower again
2017-02-28 11:36:42 +01:00
Remi Collet
3006d1de5b make test slower again 2017-02-28 11:36:24 +01:00
Xinchen Hui
b806287e43 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74157 (Segfault with nested generators)
2017-02-26 12:07:03 +08:00
Xinchen Hui
6a584cf318 Fixed bug #74157 (Segfault with nested generators) 2017-02-26 12:05:56 +08:00
Xinchen Hui
fa6144b077 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74164 (PHP hangs when an invalid value is dynamically passed to typehinted by-ref arg)
  Fixed typo (it should be typo)
2017-02-25 12:00:57 +08:00
Xinchen Hui
36fcc4cb5d Fixed bug #74164 (PHP hangs when an invalid value is dynamically passed to typehinted by-ref arg) 2017-02-25 12:00:42 +08:00
Anatol Belski
b59f3cf167 use the delivered global arg instead of fetching it 2017-02-21 12:12:42 +01:00
Anatol Belski
0c28332b11 Merge branch 'PHP-7.1'
* PHP-7.1:
  initialize valid_symbol_table, important for the main thread
2017-02-18 18:05:55 +01:00
Anatol Belski
ac64eea9e6 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  initialize valid_symbol_table, important for the main thread
2017-02-18 18:03:55 +01:00
Anatol Belski
1623ef10c9 initialize valid_symbol_table, important for the main thread
to prevent php_errormsg population on invalid symlol_table
2017-02-18 17:58:17 +01:00
Xinchen Hui
aa1d92e3e5 Unused var 2017-02-17 12:22:59 +08:00
Nikita Popov
f3d058c1da Merge branch 'PHP-7.1' 2017-02-16 17:36:09 +01:00
Nikita Popov
9ca43b873a Merge branch 'PHP-7.0' into PHP-7.1 2017-02-16 17:36:03 +01:00
Ondřej Surý
61e59db99d Disable RTLD_DEEPBIND when compiling with AddressSanitizer (-fsanitize=address).
The AddressSanitizer doesn't support RTLD_DEEPBIND resulting in
erratic errors when deinitializing phar module and possibly others.

Clang use __has_feature() macro to indicate compilation with
AddressSanitizer while gcc uses __SANITIZE_ADDRESS__ define.

Fixes bug #73677.
2017-02-16 17:35:29 +01:00
Anatol Belski
e35376c1e2 Merge branch 'PHP-7.1'
* PHP-7.1:
  skip test
2017-02-15 16:14:46 +01:00
Anatol Belski
8ad75bec97 skip test
The code path not available on Windows.
2017-02-15 16:12:34 +01:00
Xinchen Hui
b4fd233be0 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed test in travis
2017-02-15 17:31:35 +08:00
Xinchen Hui
f53ea4cd60 Fixed test in travis 2017-02-15 17:31:27 +08:00
Xinchen Hui
41bd2087ea Merge branch 'PHP-7.1'
* PHP-7.1:
  Make it slower
2017-02-15 15:27:33 +08:00
Xinchen Hui
8d94d5d942 Make it slower 2017-02-15 15:27:21 +08:00
Xinchen Hui
49dca87029 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed test
2017-02-15 14:49:09 +08:00
Xinchen Hui
dad5281a89 Fixed test 2017-02-15 14:49:02 +08:00
Xinchen Hui
bf91fc565c Merge branch 'PHP-7.1'
* PHP-7.1:
  Add a test for hard_timeout(bug #74093)
2017-02-15 13:52:08 +08:00
Xinchen Hui
6767ef05a5 Add a test for hard_timeout(bug #74093) 2017-02-15 13:51:45 +08:00
Xinchen Hui
e33afaa299 Merge branch 'PHP-7.1'
* PHP-7.1:
  Workaround to fix bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log)
2017-02-15 12:30:23 +08:00