summaryrefslogtreecommitdiff
path: root/vcbuild.bat
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2015-01-24 01:06:07 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2015-01-27 00:54:02 +0100
commit4f68369643cbbbcc6b12028091bb8064e89ce02d (patch)
tree2b9f7fb324b1fb88c48473723afac67ff5015cba /vcbuild.bat
parentc0a9d1bc74e1aa5ed1f5a934509c1984142e0eab (diff)
downloadandroid-node-v8-4f68369643cbbbcc6b12028091bb8064e89ce02d.tar.gz
android-node-v8-4f68369643cbbbcc6b12028091bb8064e89ce02d.tar.bz2
android-node-v8-4f68369643cbbbcc6b12028091bb8064e89ce02d.zip
build: disable v8 snapshots
Snapshots speed up start-up by a few milliseconds but are potentially dangerous because of the fixed hash seed that is used for strings and dictionaries, making collision denial-of-service attacks possible. Release builds on iojs.org have snapshots disabled but source builds did not, until now. The risk for individual source builds is low; the binary gets a random 32 bits hash seed that should be hard to guess by an external attacker. It's when binaries are distributed by, for example, a distro vendor that the fixed hash seed becomes a vulnerability, because then it's possible to target a large group of people at once. People that really need the faster start-up time can use the new --with-snapshot configure flag. PR-URL: https://github.com/iojs/io.js/pull/585 Reviewed-By: Bert Belder <bertbelder@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'vcbuild.bat')
-rw-r--r--vcbuild.bat10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcbuild.bat b/vcbuild.bat
index 3ad209534a..606ebf262a 100644
--- a/vcbuild.bat
+++ b/vcbuild.bat
@@ -17,11 +17,11 @@ set msiplatform=x86
set target=Build
set target_arch=ia32
set debug_arg=
-set nosnapshot_arg=
+set snapshot_arg=
set noprojgen=
set nobuild=
set nosign=
-set nosnapshot=
+set snapshot=
set test=
set test_args=
set msi=
@@ -48,7 +48,7 @@ if /i "%1"=="x64" set target_arch=x64&goto arg-ok
if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok
if /i "%1"=="nobuild" set nobuild=1&goto arg-ok
if /i "%1"=="nosign" set nosign=1&goto arg-ok
-if /i "%1"=="nosnapshot" set nosnapshot=1&goto arg-ok
+if /i "%1"=="snapshot" set snapshot=1&goto arg-ok
if /i "%1"=="noetw" set noetw=1&goto arg-ok
if /i "%1"=="noperfctr" set noperfctr=1&goto arg-ok
if /i "%1"=="licensertf" set licensertf=1&goto arg-ok
@@ -79,7 +79,7 @@ if defined jslint goto jslint
if "%config%"=="Debug" set debug_arg=--debug
if "%target_arch%"=="x64" set msiplatform=x64
-if defined nosnapshot set nosnapshot_arg=--without-snapshot
+if defined snapshot set snapshot_arg=--with-snapshot
if defined noetw set noetw_arg=--without-etw& set noetw_msi_arg=/p:NoETW=1
if defined noperfctr set noperfctr_arg=--without-perfctr& set noperfctr_msi_arg=/p:NoPerfCtr=1
@@ -96,7 +96,7 @@ if defined NIGHTLY set TAG=nightly-%NIGHTLY%
@rem Generate the VS project.
SETLOCAL
if defined VS100COMNTOOLS call "%VS100COMNTOOLS%\VCVarsQueryRegistry.bat"
- python configure %download_arg% %i18n_arg% %debug_arg% %nosnapshot_arg% %noetw_arg% %noperfctr_arg% --dest-cpu=%target_arch% --tag=%TAG%
+ python configure %download_arg% %i18n_arg% %debug_arg% %snapshot_arg% %noetw_arg% %noperfctr_arg% --dest-cpu=%target_arch% --tag=%TAG%
if errorlevel 1 goto create-msvs-files-failed
if not exist node.sln goto create-msvs-files-failed
echo Project files generated.