Commit Graph

112589 Commits

Author SHA1 Message Date
Derick Rethans
aae5907cb7 Update timelib to 2018.02 2019-06-30 15:45:13 +01:00
Anatol Belski
846c0e7233 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Update NEWS [ci skip]
2019-06-29 17:41:29 +02:00
Anatol Belski
0e148789c3 Update NEWS [ci skip] 2019-06-29 17:40:58 +02:00
Anatol Belski
07cdf0109f Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Update NEWS [ci skip]
2019-06-29 17:40:14 +02:00
Anatol Belski
a149f9f3c0 Update NEWS [ci skip] 2019-06-29 17:39:45 +02:00
Anatol Belski
dacf9ecc46 Update libmagic.patch [ci skip] 2019-06-29 17:36:11 +02:00
Anatol Belski
5ae0a6b784 Set buffer to NULL to prevent double free (Kamil Dudka at redhat)
Based on the upstream patch d13204e8da43f1d8a98cf3f74591cde02ecdb2f7.
2019-06-29 17:13:21 +02:00
Anatol Belski
02fc2fe8c9 Fix magic data 2019-06-29 16:51:41 +02:00
Christoph M. Becker
8357a696ab Fix memory leak in COM ctor
We have to free strings returned from php_com_olestring_to_string().
2019-06-29 14:51:13 +02:00
Anatol Belski
885cb79201 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix typo
  Add tests from fix #78183 from PHP-7.2
  Fix #78183: finfo_file shows wrong mime-type for .tga file
2019-06-29 13:31:22 +02:00
Anatol Belski
b926690947 Fix typo 2019-06-29 13:30:35 +02:00
Joshua Westerheide
6cdeedb8de Add tests from fix #78183 from PHP-7.2 2019-06-29 13:29:53 +02:00
Anatol Belski
0a31836bed Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78183: finfo_file shows wrong mime-type for .tga file
2019-06-29 13:29:41 +02:00
Joshua Westerheide
855bbc88c9 Fix #78183: finfo_file shows wrong mime-type for .tga file
Due to a bug in the underlying libmagic 5.31, .tga images returned mime type "image/x-tgaimage/x-tga".
2019-06-29 13:24:52 +02:00
Joe Watkins
82effb3fc7
implement support for workers in cli-server on platforms supporting fork 2019-06-29 05:27:35 +02:00
Joe Watkins
2d5f277a2d
add ini config details to php-config 2019-06-29 05:26:21 +02:00
Peter Kokot
57424f272c Clean up files after the tests are run 2019-06-28 20:19:00 +02:00
Peter Kokot
df4bb13c55 Update changelogs [ci skip] 2019-06-28 20:14:22 +02:00
Peter Kokot
a014e50513 Remove HAVE_ERRNO_H from libgd
The check for errno.h has been removed via
50b9ef8d94

Upstream libgd library is also patched via
1e7f93922f
2019-06-28 20:02:11 +02:00
Nikita Popov
45ab57339e Use strcmp() in phpdbg_eol_global_update
memcmp() only makes sense on equal length strings, and here we don't
know anything about the length of the input.
2019-06-28 17:24:30 +02:00
Nikita Popov
2c8819b89c Disable ifunc resolvers if memory sanitizer is used
Just marking them as no_sanitize("memory") is unforunately not
sufficient, as the function still gets instrumented -- the attribute
only disables reporting.
2019-06-28 17:15:56 +02:00
Nikita Popov
cf29c0f212 Remove phpdbg_xml_asprintf()
Clang doesn't like the use of promoted zend_bool in va_start. As
the function isn't used anyway, I'm simply dropping it...
2019-06-28 16:59:52 +02:00
Nikita Popov
88d52ae7aa Mark ifunc resolver functions as unused
It looks like clang doesn't see that these are used through
__attribute__((ifunc)) and generates a warning.
2019-06-28 16:55:54 +02:00
Nikita Popov
3698303540 Fix arginfo leak in disable_functions
Arginfo is allocated if types are used, we need to free it.
2019-06-28 16:38:46 +02:00
Nikita Popov
345a3b277c Merge branch 'PHP-7.3' into PHP-7.4 2019-06-28 16:09:23 +02:00
Nikita Popov
19d0a51533 Merge branch 'PHP-7.2' into PHP-7.3 2019-06-28 16:09:09 +02:00
sunnyeo
f7327b6244 Fix bugs in AST printer
Closes GH-4324.
2019-06-28 16:08:44 +02:00
Nikita Popov
54dd762f59 Set up asan+ubsan scheduled build on azure
Also adds an --asan flag to run-tests.php to setup all the necessary
environment variables. Some tests are marked as skipped because they
are incompatible with asan or too slow.

I'm basing this on the DEBUG_ZTS build, which seems to give us the
most mileage.
2019-06-28 15:00:54 +02:00
Nikita Popov
ca6f41aa5a Fix out of bounds read in sccp 2019-06-28 14:47:49 +02:00
Nikita Popov
50cce5eb4f Avoid reliance on arena details on phpdbg oplog
Instead of guessing what the address of the first arena allocation
is going to be, embed the sentinel in the oplog_list structure
directly.
2019-06-28 14:47:42 +02:00
Nikita Popov
c0bf3bc50c Update error message in libmysql test 2019-06-28 14:46:30 +02:00
Sebastian Pop
70ef87539d Fix compilation errors when building against libmysql
Closes GH-4316.
2019-06-28 14:46:12 +02:00
Nikita Popov
9f81c56e42 Fix out-of-bounds read in array compilation
UNPACK elements only have one child. Don't access the second one
until we have excluded this case.
2019-06-28 12:44:46 +02:00
Nikita Popov
7632a411e3 Add tracked arena allocator
Available under -DZEND_TRACK_ARENA_ALLOC. This will use the system
allocator combined with arena checkpointing & release semantics
and allows analyzing arena usage under asan/valgrind.

I've sacrificed the duplicate arena implementation in mysqlnd, as
the integration with mysqlnd alloc is not worth the code duplication
to me.
2019-06-28 12:44:18 +02:00
Christoph M. Becker
645ca710d7 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #78192 PDO SQLite SegFault when reuse statement after schema has changed
2019-06-28 12:37:49 +02:00
Christoph M. Becker
646debaf38 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #78192 PDO SQLite SegFault when reuse statement after schema has changed
2019-06-28 12:36:55 +02:00
Vincent
05c00a832c Fix bug #78192 PDO SQLite SegFault when reuse statement after schema has changed
Reset stmt->columns when column count changed on new execution of prepared statement
2019-06-28 12:36:02 +02:00
Nikita Popov
8be051015e Add support for proc_open() with a command array
In this case the progarm will be executed directly, without a shell.
On Linux the arguments are passed directly to execvp and no escaping
is necessary. On Windows we construct a command string using escaping
with the default Windows command-line argument parsing method described
at https://docs.microsoft.com/en-us/cpp/cpp/parsing-cpp-command-line-arguments.

Apart from avoiding the issue of argument escaping, passing an array
and bypassing shell has the advantage of allowing proper signal
delivery to the opened process (rather than the shell).
2019-06-28 11:09:55 +02:00
Dmitry Stogov
143f4e3b5c Reduce overhead 2019-06-28 12:03:01 +03:00
Joe Watkins
68485f8ab4
implement tsrm_is_shutdown API 2019-06-28 10:27:19 +02:00
Christoph M. Becker
bc0db8ce45 Use the portable zend_strndup() instead of strndup() 2019-06-28 10:23:38 +02:00
Dmitry Stogov
ba8033feb0 Fixed use-after-free 2019-06-28 10:43:56 +03:00
Nikita Popov
f365d0e00e Fix mysqlnd memory leak
The actual leak is observed in ext/pdo_mysql/tests/bug_74376.phpt.
The persistent connection leaks because a refcount decrement on a
result is missed. The refcount decrement is missed because
free_result_contents is used, rather than free_result.

Looking at other uses of free_result_contents, it looks like they
could also suffer from this problem. Apart from one case,
free_result_contents is always used to release the result entirely
(I've adjusted the one differing case to only free meta), so I'm
moving most of the logic from free_result into free_result_contents.
The only difference is now that free_result will skip_result first.
2019-06-28 09:18:32 +02:00
Nikita Popov
a78adce5cb Free ZTS lock in opcache
For some reason this only shows up as a leak when using phpdbg.
2019-06-28 09:18:14 +02:00
Nikita Popov
8c4d199851 Fix init_file leak in phpdbg 2019-06-28 09:17:26 +02:00
Nikita Popov
b195412bf3 run-tests: Don't pass --INI-- settings to --SKIPIF--
If we're testing ini settings that cause startup failures, we'll
never get to that SKIPIF block...

Also change settings2param to return a value instead of modifying
(to a different type no less!) in place.
2019-06-28 09:17:09 +02:00
Nikita Popov
70fa4715a4 Fix custom heap free
This seems to be designed around the use-case where the custom
allocator is a wrapper around ZMM.
2019-06-28 09:13:45 +02:00
Sara Golemon
27f1f3ed1a Bugfix #78208 Needs rehash with an unknown algo should always return true. 2019-06-27 19:26:03 -04:00
Peter Kokot
35b6a9f75a Catch up with some recent changes [ci skip]
- Mention mysqli::stat()
- Mention removal of HAVE_* for always defined extensions
- Mention removed symbols defined during the build
2019-06-28 00:29:50 +02:00
Peter Kokot
638c21765c Remove HAVE_STRCOLL check
The strcoll function is defined in the C89 standard and should be
on today's systems always available via the <string.h> header.

https://port70.net/~nsz/c/c89/c89-draft.html#4.11.4.3

- Remove also SKIPIF strcoll check in test
2019-06-28 00:05:55 +02:00