Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/windows/build_task.bat
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts
if "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS%
if "%ASAN%" equ "1" set ADD_CONF=%ADD_CONF% --enable-sanitizer --enable-debug-pack

set CFLAGS=/W1 /WX /w14013
set CFLAGS=/W2 /WX /w14013 /wd4146 /wd4244

cmd /c configure.bat ^
--enable-snapshot-build ^
Expand Down
3 changes: 3 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ PHP 8.5 UPGRADE NOTES
* --enable-sanitzer is now supported for MSVC builds. This enables ASan and
debug assertions, and is supported as of MSVC 16.10 and Windows 10.

* The --with-uncritical-warn-choke configuration option for clang builds is
no longer supported. Select warnings to suppress via CFLAGS instead.

* COM:
. The extension is now build shared by default; previously it defaulted to a
static extension, although the official Windows binaries built a shared
Expand Down
2 changes: 1 addition & 1 deletion ext/sockets/tests/socket_afpacket.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ bool(true)
string(2) "lo"
int(%i)

Warning: socket_getpeername(): unable to retrieve peer name [95]: Operation not supported in %s on line %d
Warning: socket_getpeername(): unable to retrieve peer name [95]: %sot supported in %s on line %d
8 changes: 4 additions & 4 deletions ext/standard/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static struct gfxinfo *php_handle_swc(php_stream * stream)
long bits;
unsigned char a[64];
unsigned long len=64, szlength;
int factor = 1,maxfactor = 16;
int factor = 1,maxfactor = 1 << 15;
int status = 0;
unsigned char *b, *buf = NULL;
zend_string *bufz;
Expand Down Expand Up @@ -197,13 +197,13 @@ static struct gfxinfo *php_handle_swc(php_stream * stream)
/*
* zlib::uncompress() wants to know the output data length
* if none was given as a parameter
* we try from input length * 2 up to input length * 2^8
* we try from input length * 2 up to input length * 2^15
* doubling it whenever it wasn't big enough
* that should be eneugh for all real life cases
* that should be enough for all real life cases
*/

do {
szlength = ZSTR_LEN(bufz) * (1<<factor++);
szlength = ZSTR_LEN(bufz) * (factor <<= 1);
buf = erealloc(buf, szlength);
status = uncompress(buf, &szlength, (unsigned char *) ZSTR_VAL(bufz), ZSTR_LEN(bufz));
} while ((status==Z_BUF_ERROR)&&(factor<maxfactor));
Expand Down
6 changes: 0 additions & 6 deletions win32/build/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ if (PHP_SECURITY_FLAGS == "yes") {
ADD_FLAG("LDFLAGS", "/NXCOMPAT /DYNAMICBASE ");
}

ARG_WITH("uncritical-warn-choke", "Disable some uncritical warnings", "yes");
ARG_ENABLE("sanitizer", "Enable ASan (and UBSan) extensions", "no");
if (PHP_SANITIZER == "yes" && PHP_DEBUG == "yes") {
ERROR("Use of both --enable-sanitizer and --enable-debug not allowed.");
Expand All @@ -377,11 +376,6 @@ if (VS_TOOLSET) {
AC_DEFINE("PHP_HAVE_BUILTIN_SSUBLL_OVERFLOW", 1, "Define to 1 if the compiler supports '__builtin_ssubll_overflow'.");
AC_DEFINE("PHP_HAVE_BUILTIN_SMULL_OVERFLOW", 1, "Define to 1 if the compiler supports '__builtin_smull_overflow '.");
AC_DEFINE("PHP_HAVE_BUILTIN_SMULLL_OVERFLOW", 1, "Define to 1 if the compiler supports '__builtin_smulll_overflow'.");
if (PHP_UNCRITICAL_WARN_CHOKE != "no") {
ADD_FLAG("CFLAGS", "-Wno-ignored-attributes -Wno-deprecated-declarations -Wno-missing-braces " +
"-Wno-logical-op-parentheses -Wno-msvc-include -Wno-invalid-source-encoding -Wno-unknown-pragmas " +
"-Wno-unused-command-line-argument -Wno-unused-function -Wno-ignored-pragma-optimize");
}

if (PHP_SANITIZER == "yes") {
if (COMPILER_NUMERIC_VERSION < 500) {
Expand Down
1 change: 1 addition & 0 deletions win32/build/confutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3305,6 +3305,7 @@ function toolset_setup_common_cflags()

ADD_FLAG("CFLAGS", "/Zc:wchar_t");
} else if (CLANG_TOOLSET) {
ADD_FLAG("CFLAGS", "-Wno-deprecated-declarations");
if (TARGET_ARCH == 'x86') {
ADD_FLAG('CFLAGS', '-m32');
} else {
Expand Down