mirror of
https://github.com/php/php-src.git
synced 2026-03-30 04:02:19 +02:00
* Fix GH-17658: COMPersistHelper::LoadFromStream() can segfault The actual fix is trivial, but to be able to test the behavior we have to introduce an own COM object, since existing persistable objects likely implement `IPersistInit`, not only `IPersist`. We also want to avoid further test dependencies on possibly unavailable objects, such as `Word.Application`. To this purposes, we add a small COM in-process server, which may be extended for other testing purposes. We keep it simple by implementing it in C++, but without using any more sophisticated frameworks like ATL. This component needs to be built explicitly (`nmake comtest.dll`), and also needs to be explicitly registered (`nmake register_comtest`). When no longer needed, it is possible to unregister the component (`nmake unregister_comtest`).
52 lines
1.6 KiB
Batchfile
52 lines
1.6 KiB
Batchfile
@echo off
|
|
|
|
if /i "%GITHUB_ACTIONS%" neq "True" (
|
|
echo for CI only
|
|
exit /b 3
|
|
)
|
|
|
|
del /f /q C:\Windows\System32\libcrypto-1_1-x64.dll >NUL 2>NUL
|
|
if %errorlevel% neq 0 exit /b 3
|
|
del /f /q C:\Windows\System32\libssl-1_1-x64.dll >NUL 2>NUL
|
|
if %errorlevel% neq 0 exit /b 3
|
|
|
|
call %~dp0find-target-branch.bat
|
|
set STABILITY=staging
|
|
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VS%-%PHP_SDK_ARCH%
|
|
rem SDK is cached, deps info is cached as well
|
|
echo Updating dependencies in %DEPS_DIR%
|
|
cmd /c phpsdk_deps --update --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR% --crt %PHP_BUILD_CRT%
|
|
if %errorlevel% neq 0 exit /b 3
|
|
|
|
rem Something went wrong, most likely when concurrent builds were to fetch deps
|
|
rem updates. It might be, that some locking mechanism is needed.
|
|
if not exist "%DEPS_DIR%" (
|
|
cmd /c phpsdk_deps --update --force --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
|
|
)
|
|
if %errorlevel% neq 0 exit /b 3
|
|
|
|
cmd /c buildconf.bat --force
|
|
if %errorlevel% neq 0 exit /b 3
|
|
|
|
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=/W2 /WX /w14013 /wd4146 /wd4244
|
|
|
|
cmd /c configure.bat ^
|
|
--enable-snapshot-build ^
|
|
--disable-debug-pack ^
|
|
--without-analyzer ^
|
|
--enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^
|
|
--with-php-build=%DEPS_DIR% ^
|
|
%ADD_CONF% ^
|
|
--disable-test-ini
|
|
if %errorlevel% neq 0 exit /b 3
|
|
|
|
nmake /NOLOGO
|
|
nmake /NOLOGO comtest.dll
|
|
if %errorlevel% neq 0 exit /b 3
|
|
|
|
exit /b 0
|