Commit Graph

541 Commits

Author SHA1 Message Date
Nikita Popov
26f8fc833b Enable and fix printf() format warnings
Add _unchecked() variants of zend_spprintf and zend_strpprintf for
cases where we specifically want to disable these checks, such as
use of %H.
2017-11-16 21:15:36 +01:00
Dmitry Stogov
ccc12b82da Avoid unnecessary reference-counting on strings. 2017-11-16 17:09:32 +03:00
Dmitry Stogov
ce18738a30 Removed "_" from API functions. 2017-11-16 17:09:01 +03:00
Dmitry Stogov
aeca761856 Removed useless reallocations 2017-10-26 19:13:53 +03:00
Dmitry Stogov
886d4d9ca1 Avoid reallocations when concatenate with empty string 2017-10-26 09:45:02 +03:00
Dmitry Stogov
9cf87aa196 Avoid HashTable allocations for empty arrays (using zend_empty_array). 2017-10-24 17:27:31 +03:00
Anatol Belski
793ca716fb Fix datatypes and compiler warnings
Switch to size_t

Not critical as an unsigned is already used, but fixes a couple of
warnings in other areas.

Normalize signature

It's a function with the usual compare semantics, returning a platform
specific at least produces unnecessary warnings elsewhere and is otherwise
inappropriate.

Fix return value

Drop unused var

Fix compiler warnings

Fix compiler warning

Fix var name in arginfo

Fix cast
2017-10-23 08:56:57 +02:00
Dmitry Stogov
cb9d81ef4f Refactored recursion pretection 2017-10-06 01:34:50 +03:00
Xinchen Hui
ac3c586ca7 Merge branch 'PHP-7.2'
* PHP-7.2:
  Update NEWS
  Update NEWS
  Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()).
  Compiler warning
2017-09-24 17:25:26 +08:00
Xinchen Hui
bad5639386 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()).
  Compiler warning
2017-09-24 17:24:57 +08:00
Xinchen Hui
e8c200515a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()).
  Compiler warning
2017-09-24 17:24:23 +08:00
Xinchen Hui
b05ff14a9a Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()). 2017-09-24 17:24:11 +08:00
Dmitry Stogov
44e0b79ac6 Refactored array creation API. array_init() and array_init_size() are converted into macros calling zend_new_array(). They are not functions anymore and don't return any values. 2017-09-20 02:25:56 +03:00
Anatol Belski
0d1eeeb68d move zend_ato*() to size_t and remove casts 2017-07-28 14:59:31 +02:00
Sara Golemon
4a6ef8327a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Simpler fix for #74974
2017-07-27 10:04:59 -04:00
Sara Golemon
b62fb3aa0c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Simpler fix for #74974
2017-07-27 10:04:14 -04:00
Pedro Magalhães
34e5d3a87d Simpler fix for #74974 2017-07-27 09:25:38 -04:00
Sara Golemon
089f4ff885 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Use compatability zend_isnan() instead of POSIX isnan()
2017-07-22 21:33:28 -04:00
Sara Golemon
a4e3589966 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Use compatability zend_isnan() instead of POSIX isnan()
2017-07-22 21:33:20 -04:00
Sara Golemon
775b4b54d8
Use compatability zend_isnan() instead of POSIX isnan()
s/isnan/zend_isnan/g
2017-07-22 21:32:44 -04:00
Sara Golemon
e23c132940 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix compile-time optimization of NAN comparisons
2017-07-22 21:23:29 -04:00
Sara Golemon
1229b0f8cb Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix compile-time optimization of NAN comparisons
2017-07-22 21:23:17 -04:00
Sara Golemon
c562d44321
Fix compile-time optimization of NAN comparisons 2017-07-22 21:22:51 -04:00
Anatol Belski
bc5811f361 further sync for vim mode lines 2017-07-04 18:12:45 +02:00
Dmitry Stogov
a08723d3d3 Use interned empty and "one char" strings. 2017-05-18 17:59:59 +03: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
Xinchen Hui
963981df58 Merge branch 'PHP-7.1'
* PHP-7.1:
  Update NEWS
  Fixed bug #74084 (Out of bound read - zend_mm_alloc_small)
2017-02-12 20:36:43 +08:00
Xinchen Hui
b56114e8fb Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74084 (Out of bound read - zend_mm_alloc_small)

Conflicts:
	Zend/zend_operators.c
2017-02-12 20:36:18 +08:00
Xinchen Hui
26fdebc63b Fixed bug #74084 (Out of bound read - zend_mm_alloc_small) 2017-02-12 20:34:08 +08:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Dmitry Stogov
e8109e09aa Fixed memory leaks caused by exceptions thrown from destructors. 2016-12-07 00:41:07 +03:00
Dmitry Stogov
7d86ed1852 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed behavior of failing compound assignments (they shouldn't change the source value when exception thrown during type converion).
2016-12-05 21:50:06 +03:00
Dmitry Stogov
2f0e61f4b7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed behavior of failing compound assignments (they shouldn't change the source value when exception thrown during type converion).
2016-12-05 21:49:09 +03:00
Dmitry Stogov
a983b728a7 Fixed behavior of failing compound assignments (they shouldn't change the source value when exception thrown during type converion). 2016-12-05 21:45:08 +03:00
Nikita Popov
5e05b9b726 Merge branch 'PHP-7.1' 2016-12-02 17:04:20 +01:00
Nikita Popov
91d365f805 Merge branch 'PHP-7.0' into PHP-7.1 2016-12-02 17:03:59 +01:00
Nikita Popov
8f7325fc24 Fix leak in shift_right_function 2016-12-02 17:03:05 +01:00
Dmitry Stogov
e319504517 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed behavior of failing compound assignments (they shouldn't change the source value when exception thrown during type converion).
2016-12-02 15:14:48 +03:00
Dmitry Stogov
b3a4de65cd Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed behavior of failing compound assignments (they shouldn't change the source value when exception thrown during type converion).
2016-12-02 15:14:37 +03:00
Dmitry Stogov
2b70d44b57 Fixed behavior of failing compound assignments (they shouldn't change the source value when exception thrown during type converion). 2016-12-02 15:13:55 +03:00
Dmitry Stogov
0314958a43 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed behavior of failing compound assignments (they shouldn't change the source value).
2016-12-02 14:00:50 +03:00
Dmitry Stogov
5a57b3d6e0 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed behavior of failing compound assignments (they shouldn't change the source value).
2016-12-02 14:00:29 +03:00
Dmitry Stogov
dbf39cddd9 Fixed behavior of failing compound assignments (they shouldn't change the source value). 2016-12-02 13:58:44 +03:00
Dmitry Stogov
0ce5f99caf Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed possible memory leak in &=, |=, ^=.
2016-12-02 12:36:02 +03:00
Dmitry Stogov
04500f1fe0 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed possible memory leak in &=, |=, ^=.
2016-12-02 12:35:44 +03:00
Dmitry Stogov
67d90a4870 Fixed possible memory leak in &=, |=, ^=. 2016-12-02 12:34:46 +03:00
Dmitry Stogov
22cebaf89a Revert "Fix return value memory leaks upon exceptions in opcode operand freeing"
This reverts commit 9ad9d7ae37.
2016-12-02 11:58:41 +03:00
Bob Weinand
9ad9d7ae37 Fix return value memory leaks upon exceptions in opcode operand freeing 2016-11-30 17:44:34 +01:00