Bob Weinand [Mon, 11 Jul 2016 21:28:14 +0000 (23:28 +0200)]
Rewrite watchpoints to be much more stable
This mainly involves a separate abstraction layer for elements (e.g. $a->b) and watchpoints (on pointer of the Bucket for example).
Also better comparison handling (value backup vs. page dumps).
It is not yet finished (there are sometimes false positives announced and names not yet perfect), but the functionality is working and not crashing as far as I have tested.
Future scope is also relative watchpoints, e.g. "w $this->val expression()" which does not have the symbol tables as basis, but the value (in this example: return value of expression()) as basis.
Remove needless zeroing of anonymously mmap'd memory
All existing systems zero anonymously mmapped memory, and if I
understand correctly POSIX will be specifying this soon. Many projects
already rely on it, so no reasonable system would return memory of
unspecified value.
Michael Orlitzky [Fri, 10 Jun 2016 03:39:07 +0000 (23:39 -0400)]
ext/tidy: work around a legacy libtidy bug in a test.
Our existing test 024.phpt actually tests incorrect behavior. There is
a self-closing tag present in the input, but the expected output has
that same tag half-open (i.e. open but never closed). To support
tidy-html5, which does the right thing, that test needed to be
changed. The self-closing tag was replaced by an explicit pair of
tags, and some extra whitespace fudging was done.
Michael Orlitzky [Fri, 10 Jun 2016 03:29:14 +0000 (23:29 -0400)]
ext/tidy: update the configuration file test to not inspect output.
One of the tests for tidy (016.phpt) is testing that we can use a
configuration file (016.tcfg) instead of a string to configure
tidy. It was observing the output of an API call, which proved too
fragile now that we support tidy-html5 as well. Instead, the test was
updated to inspect $tidy->getConfig() to ensure that the config file
was actually processed and will be respected.
Michael Orlitzky [Fri, 10 Jun 2016 03:14:19 +0000 (23:14 -0400)]
ext/tidy: fix expected test output with tidy-html5.
One of the tidy tests expects some output that has (harmlessly)
changed in tidy-html5. The "EXPECT" block for that test was changed to
"EXPECTF" and mangled to accept both the old and new outputs.
Michael Orlitzky [Fri, 10 Jun 2016 03:12:17 +0000 (23:12 -0400)]
ext/tidy: fix non-deterministic expected output in two tests.
Some of the tidy tests expect output that can change. The motivating
example is an object "id" that is some integer, but no integer in
particular. Those hard-coded values have been changed to accept any
integer so that the test suite passes when tidy-html5 is used.
Michael Orlitzky [Fri, 10 Jun 2016 03:09:33 +0000 (23:09 -0400)]
ext/tidy: fix DOCTYPE definitions in expected test output.
The test suite for the tidy extension was written before HTML5 was
"standardized". The new tidy-html5 library will output an HTML5
DOCTYPE in the absence of any other information, so the expected test
outputs have been updated to accomodate the absense of an HTML version
(which is how you declare "HTML5").
Michael Orlitzky [Fri, 10 Jun 2016 03:00:02 +0000 (23:00 -0400)]
ext/tidy: add support for the new tidy-html5 library.
Our existing libtidy support is based on the legacy "HTML tidy"
project. That project now has a successor called tidy-html5, where all
new features and bugfixes happen. Of particular note are the fixes for
two security vulnerabilities, CVE-2015-5522 and CVE-2015-5523.
The API is largely unchanged in the new project (which is truly the
successor of the original -- not a fork), and so it is almost a
drop-in replacement as far as PHP is concerned. However, one file has
changed in the new project: "buffio.h" has been moved to
"tidybuffio.h".
This commit detects the presence of tidybuffio.h at build time, and
then adjusts the import statement in tidy.c accordingly. The result is
a build that works against either the legacy project or the new
tidy-html5 project, although the test suite for the tidy extension now
fails. Those failures are not critical and will be fixed.
* PHP-7.0:
Fixed bug #72570 Segmentation fault when binding parameters on a query without placeholders
Fixed bug #70313 PDO statement fails to throw exception
To give userland developers who work with large numbers of file descriptors
the opportunity to avoid problems on systems which may not support that
many descriptors (e.g. when calling socket_select()), we make FD_SETSIZE
available in PHP as PHP_FD_SETSIZE.
* pull-request/1955:
Add parenthesis to if statements
Correctly add to the length of the final string
Correctly add to the length of the final string
Fix minor spacing issue
Make LDAP_ESCAPE_DN compliant with RFC 4514
Lauri Kenttä [Wed, 25 May 2016 16:52:11 +0000 (19:52 +0300)]
base64_decode: remove redundant code
case 1 is already handled in the first lines of the for loop;
it would only be entered in the invalid case where the string
continues past the defined length (ch != 0 but length-- == 0).
case 2 and case 3 are redundant, since k >= j and later the
string is truncated to j characters anyway.
Lauri Kenttä [Wed, 25 May 2016 18:15:52 +0000 (21:15 +0300)]
base64_decode: remove redundant check
If length == 0 || *current != '=' is false, the for loop will always
end up in this same point, until the if statement becomes true.
Thus, the if statement is not needed.
David Walker [Sat, 2 Jul 2016 16:44:17 +0000 (10:44 -0600)]
Fix #72409 - return previous handler
This patch addresses https://bugs.php.net/bug.php?id=72409
This patch is applied to master compared to PR#1952 which was
patching 5.6.x branch of PHP
This patch takes into account discussions on PR #1978
Addressing that rather than have pcntl_signal() return a value
to create a new function that can be used to get the current
value of the signal handler.