Commit Graph

2183 Commits

Author SHA1 Message Date
Christoph M. Becker
a93ce58862 Merge branch 'PHP-7.4'
* PHP-7.4:
  Enable UBSan in addition to ASan
2020-01-23 12:00:50 +01:00
Christoph M. Becker
ea3afcbae3 Enable UBSan in addition to ASan
UBSan is a useful tool, so we enable it for `--enable-sanitizer` in
addition to ASan.
2020-01-23 12:00:11 +01:00
Christoph M. Becker
5a6f3de8ac Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79146: cscript can fail to run on some systems
2020-01-21 11:54:33 +01:00
Christoph M. Becker
b0f8d38f4a Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79146: cscript can fail to run on some systems
2020-01-21 11:54:11 +01:00
Deus Kane
3046e35718 Fix #79146: cscript can fail to run on some systems
In the buildconf and configure batch files, Windows' cscript utility was being
run without the /e:jscript flag. This works on systems that have not had the
default .js file association changed, but if .js has been re-associated to
(say) an IDE, the batch files fail with the error message:

Input Error: There is no script engine for file extension ".js".
2020-01-21 11:53:11 +01:00
Máté Kocsis
afdaa91170
Fix #78880: Final spelling fixes 2020-01-16 19:14:31 +01:00
Christoph M. Becker
1e62e627fd Merge branch 'PHP-7.4'
* PHP-7.4:
  Disable optimizations for ASan instrumented builds
2020-01-16 13:58:28 +01:00
Christoph M. Becker
c9908ee5eb Disable optimizations for ASan instrumented builds
ASan instrumentation does not support the MSVC debug runtime, but still
it does not make sense to enable optimizations for such builds, since
they are not meant for production usage anyway, and although memory
corruption issues are still found in optimized builds, the generated
diagnostics are close to being useless, and apparently sometimes even
outright wrong.  Therefore, we disable all optimizations for ASan
instrumented builds.

We also introduce and use `ZEND_WIN32_NEVER_INLINE` for ASan enabled
builds to avoid inlining of functions, so we get even better
diagnostics.
2020-01-16 13:57:21 +01:00
Máté Kocsis
c3cf01b553
Fix #78880: Yet another batch of spelling errors 2020-01-16 12:04:00 +01:00
Máté Kocsis
0b4778c377
Fix #78880: Another bunch of spelling errors 2020-01-16 09:46:47 +01:00
Christoph M. Becker
5d3be966f9 Use proper printf() specifiers 2020-01-15 18:18:36 +01:00
Christoph M. Becker
f6fbe13717 Rename run-test.php to run-tests.php in the test packs
In the php-src repository, the test runner is named run-tests.php, but
when it is copied to the tests packs, it is renamed to run-test.php.
This renaming does not make sense, and is actually somewhat confusing.
Although changing the name back to run-tests.php constitutes a BC
break, we think the benefit of having a single name outweights the
disadvantages in the long run.
2020-01-14 18:31:25 +01:00
Christoph M. Becker
10c420f84a Replace fakemail with minimal PHP script 2020-01-09 12:04:28 +01:00
Christoph M. Becker
64633044c5 Unify mail related tests for *nix and Windows
Currently mail related tests are split for *nix and Windows (if there
are even Windows versions).  The basic difference is that the *nix
variants set the INI directive sendmail_path to just write the email to
disk, while the Windows tests use ext/imap.  The latter tests are way
more verbose, and such duplicated tests are generally a pain point.
Furthermore, the Windows tests are much slower, and could not be run
without ext/imap being available.

We therefore introduce a small fakemail application, which basically
works like `tee <path> >/dev/null`, and which will be shipped with the
Windows tests packs.  fakemail.exe would also need to be added to the
PHP binary SDK, so these tests could be run during developments.

To cater to the remaining differences, we also introduce support for
`{MAIL:<path>}` placeholders in the INI sections to run-tests.php.  How
to use this can be seen in mail_basic.phpt, which is currently the only
modified test case, because these tests are yet supposed to fail on
Windows, due to the missing fakemail.exe in the PHP SDK.
2020-01-09 12:04:28 +01:00
Christoph M. Becker
54ec44a862 Don't enable sanitizer by default for Windows snapshot builds
Snapshot builds are release builds, and therefore enabling sanitizers
is undesireable.
2020-01-03 14:17:08 +01:00
Christoph M. Becker
e0b288020b Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove superfluous compiler option
2019-12-31 12:00:48 +01:00
Christoph M. Becker
4f0e5c8dd9 Remove superfluous compiler option
`-fsanitize-address-use-after-scope` is the default as of clang 5.0.0,
and we don't allow to enable ASan for older versions anyway.
2019-12-31 12:00:10 +01:00
Christoph M. Becker
48b44612d4 Fix typo 2019-12-30 18:32:52 +01:00
Máté Kocsis
e1b57310b1
Use RETURN_THROWS() during ZPP in main, sapi, win32, and Zend 2019-12-30 17:38:10 +01:00
Christoph M. Becker
cfefba6ddd Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79008: General performance regression with PHP 7.4 on Windows
2019-12-20 16:29:39 +01:00
Christoph M. Becker
6ec4056928 Fix #79008: General performance regression with PHP 7.4 on Windows
We no longer try to retrieve the filename of a given stream when
fstat'ing, because this is very slow.  Since we neither didn't do that
in PHP 7.3 and earlier, we regard this as sensible trade-off.
2019-12-20 16:28:11 +01:00
Stanislav Malyshev
0dfff646a2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test
  Fix bug #78793
  Fix build - no model field anymore
  Fixed bug #78910
  Fix #78878: Buffer underflow in bc_shift_addsub
  Fix test
  Fix #78862: link() silently truncates after a null byte on Windows
  Fix #78863: DirectoryIterator class silently truncates after a null byte
  Fix #78943: mail() may release string with refcount==1 twice
2019-12-16 10:07:15 -08:00
Stanislav Malyshev
d9f57e8316 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #78910
  Fix #78878: Buffer underflow in bc_shift_addsub
  Fix test
  Fix #78862: link() silently truncates after a null byte on Windows
  Fix #78863: DirectoryIterator class silently truncates after a null byte
  Fix #78943: mail() may release string with refcount==1 twice
2019-12-16 00:39:37 -08:00
Christoph M. Becker
518a160b65 Fix #78943: mail() may release string with refcount==1 twice
Since we need `headers_lc` as well as `headers_trim` in the following,
we do not release the former even if they are the same string, to avoid
complicating the release logic even more.

A new test case is not necessary, since we already have
mail_basic_alt2-win32.phpt and others.
2019-12-15 13:13:30 -08:00
Máté Kocsis
381c9c180b
Promote warnings to exceptions in sapi_windows_* functions 2019-12-11 18:48:14 +01:00
George Peter Banyard
4845c3f11d Remove configure checks for asinh, acosh, atanh, log1p, hypot 2019-12-04 14:57:11 +01:00
George Peter Banyard
039d678fdf Remove now obsolete configure checks for INFINITY and NAN. 2019-12-04 13:50:10 +01:00
Christoph M. Becker
b07c76059d Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78296: is_file fails to detect file
2019-12-02 11:30:23 +01:00
Christoph M. Becker
a9e45bc0fb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78296: is_file fails to detect file
2019-12-02 11:29:58 +01:00
Christoph M. Becker
bb735c9e9e Fix #78296: is_file fails to detect file
If we're constructing extended-length paths (i.e. paths prefixed with
`\\?\`), we have to replace all forward slashes with backward slashes,
because the former are not supported by Windows for extended-length
paths.

The more efficient and likely cleaner alternative solution would be to
cater to this in `php_win32_ioutil_normalize_path_w()` by always
replacing forward slashes, but that might break existing code.  It
might be sensible to change that for `master`, though.
2019-12-02 11:29:10 +01:00
Máté Kocsis
662afc80f8
Remove PHP_SLEEP_NON_VOID as it is not useful anymore 2019-11-07 17:56:26 +01:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Anatol Belski
ad3c763e2c Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix signature and calls
2019-08-27 14:35:06 +02:00
Anatol Belski
9b5d66bd52 Fix signature and calls 2019-08-27 14:34:35 +02:00
Christoph M. Becker
773957c36f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78386: fstat mode has unexpected value on PHP 7.4
2019-08-20 16:04:50 +02:00
Christoph M. Becker
c03114e55c Fix #78386: fstat mode has unexpected value on PHP 7.4
We must not assume that any file which is not a directory is a regular
file.  Therefore we employ `GetFileType()` in this case to properly
distinguish between character special, FIFO special and regular files.
2019-08-20 16:04:14 +02:00
Christoph M. Becker
ab7c3bf4bc Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix WS
2019-08-12 18:00:21 +02:00
Christoph M. Becker
ce646357bf Fix WS 2019-08-12 17:59:30 +02:00
Christoph M. Becker
2de4837b1f Merge branch 'PHP-7.4'
* PHP-7.4:
  Make extension compatibility check more liberal
2019-08-07 11:31:29 +02:00
Christoph M. Becker
886be260cb Make extension compatibility check more liberal
Checking for the exact linker version appears to be too restrictive; it
should be fine if the tens match.

We also refactor to avoid repeating ourselves.
2019-08-07 11:31:12 +02:00
Christoph M. Becker
9817382149 Merge branch 'PHP-7.4'
* PHP-7.4:
  file encoding cleanup: remove bom in win32 files
2019-07-27 10:14:14 +02:00
Sebastian Jennen
a2b2aaa67a file encoding cleanup: remove bom in win32 files
These two files have been: "UTF-8 Unicode (with BOM) text".
By applying `dos2unix` on these files the BOM has been removed.

I checked the whole source code with dos2unix:
These were the only two text files affected.
2019-07-27 10:12:54 +02:00
Peter Kokot
605386e394 Remove HAVE_LOCALE_H and locale.h check
This was a left over for supporting old code in PHP extensions out there.
Check is not needed anymore since this is part of C89+ standard.

Closes GH-4445
2019-07-21 00:37:47 +02:00
Christoph M. Becker
0ff5931310 Merge branch 'PHP-7.4'
* PHP-7.4:
  Use regedit to register event source
2019-07-18 09:11:18 +02:00
Christoph M. Becker
f34db7fc2a Use regedit to register event source
ext/win32std is unmaintained for years, so it is highly unlikely that
it is available.  We therefore use regedit instead to register the
event source.  We also remove the bundled syslog.reg, since it is of no
use, unless generated for the respective installation.
2019-07-18 09:10:48 +02:00
Christoph M. Becker
6d00cff36f Merge branch 'PHP-7.4'
* PHP-7.4:
  Revert "Remove Windows syslog script and syslog.reg"
2019-07-17 19:37:46 +02:00
Christoph M. Becker
6f617b7759 Revert "Remove Windows syslog script and syslog.reg"
This reverts commit cc44bad1f6, since its
assumptions were not correct.  Actually, the classic event logging is
still used by PHP, because Windows 7 is still to be supported for a
while.  Without the respective registry entries, the event log entries
show an error message regarding missing ID descriptions.

Thanks to ab@php.net for hinting at this!

Obviously, the part depending on ext/win32std has still to be
overhauled, and further improvements are conceivable; we will address
this in due course.
2019-07-17 19:36:56 +02:00
Peter Kokot
cf197962e1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix typo
  Simplify functions checks in m4
2019-07-17 03:55:04 +02:00
Peter Kokot
e7fcc45c43 Fix typo 2019-07-17 03:54:54 +02:00
Peter Kokot
b40be8751a Merge branch 'PHP-7.4'
* PHP-7.4:
  Update changelog
  Remove unused build checks
2019-07-16 22:47:02 +02:00