diff --git a/CHANGELOG.md b/CHANGELOG.md
index 13fc70bcb8b3d5..ed404ec8fc6fd8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,11 +10,12 @@ Select a Node.js version below to view the changelog history:
* [Node.js 8](doc/changelogs/CHANGELOG_V8.md)
* [Node.js 7](doc/changelogs/CHANGELOG_V7.md)
* [Node.js 6](doc/changelogs/CHANGELOG_V6.md)
+* [Node.js 5](doc/changelogs/CHANGELOG_V5.md)
* [Node.js 4](doc/changelogs/CHANGELOG_V4.md)
-* [Node.js 5](doc/changelogs/CHANGELOG_V5.md),
- [0.12](doc/changelogs/CHANGELOG_V012.md),
- [0.10](doc/changelogs/CHANGELOG_V010.md),
- [io.js](doc/changelogs/CHANGELOG_IOJS.md) and [Archive](doc/changelogs/CHANGELOG_ARCHIVE.md)
+* [io.js](doc/changelogs/CHANGELOG_IOJS.md)
+* [Node.js 0.12](doc/changelogs/CHANGELOG_V012.md)
+* [Node.js 0.10](doc/changelogs/CHANGELOG_V010.md)
+* [Archive](doc/changelogs/CHANGELOG_ARCHIVE.md)
Please use the following table to find the changelog for a specific Node.js
release.
@@ -28,7 +29,8 @@ release.
-9.0.0
+9.1.0
+9.0.0
|
8.9.0
diff --git a/CPP_STYLE_GUIDE.md b/CPP_STYLE_GUIDE.md
index 3e7319c1f8e8f7..3bea5bb107586f 100644
--- a/CPP_STYLE_GUIDE.md
+++ b/CPP_STYLE_GUIDE.md
@@ -127,6 +127,21 @@ class FancyContainer {
What it says in the title.
+## Do not include `*.h` if `*-inl.h` has already been included
+
+Do
+
+```cpp
+#include "util-inl.h" // already includes util.h
+```
+
+instead of
+
+```cpp
+#include "util.h"
+#include "util-inl.h"
+```
+
## Avoid throwing JavaScript errors in nested C++ methods
If you need to throw JavaScript errors from a C++ binding method, try to do it
diff --git a/LICENSE b/LICENSE
index a34f642b3cb053..28723292ba530d 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1145,3 +1145,26 @@ The externally maintained libraries used by Node.js are:
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""
+
+- node-inspect, located at deps/node-inspect, is licensed as follows:
+ """
+ Copyright Node.js contributors. All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to
+ deal in the Software without restriction, including without limitation the
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ IN THE SOFTWARE.
+ """
diff --git a/Makefile b/Makefile
index 1d7d3799f02cc4..bc337ab96d90ce 100644
--- a/Makefile
+++ b/Makefile
@@ -219,7 +219,8 @@ test: all
$(CI_ASYNC_HOOKS) \
$(CI_JS_SUITES) \
$(CI_NATIVE_SUITES) \
- doctool known_issues
+ $(CI_DOC) \
+ known_issues
endif
# For a quick test, does not run linter or build doc
@@ -268,7 +269,6 @@ test/gc/build/Release/binding.node: test/gc/binding.cc test/gc/binding.gyp
--directory="$(shell pwd)/test/gc" \
--nodedir="$(shell pwd)"
-# Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale.
DOCBUILDSTAMP_PREREQS = tools/doc/addon-verify.js doc/api/addons.md
ifeq ($(OSTYPE),aix)
@@ -277,7 +277,7 @@ endif
test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS)
$(RM) -r test/addons/??_*/
- $(NODE) $<
+ [ -x $(NODE) ] && $(NODE) $< || node $<
touch $@
ADDONS_BINDING_GYPS := \
@@ -313,10 +313,10 @@ test/addons/.buildstamp: config.gypi \
done
touch $@
-# .buildstamp and .docbuildstamp need $(NODE_EXE) but cannot depend on it
+# .buildstamp needs $(NODE_EXE) but cannot depend on it
# directly because it calls make recursively. The parent make cannot know
# if the subprocess touched anything so it pessimistically assumes that
-# .buildstamp and .docbuildstamp are out of date and need a rebuild.
+# .buildstamp is out of date and need a rebuild.
# Just goes to show that recursive make really is harmful...
# TODO(bnoordhuis) Force rebuild after gyp update.
build-addons: $(NODE_EXE) test/addons/.buildstamp
@@ -352,10 +352,10 @@ test/addons-napi/.buildstamp: config.gypi \
done
touch $@
-# .buildstamp and .docbuildstamp need $(NODE_EXE) but cannot depend on it
+# .buildstamp needs $(NODE_EXE) but cannot depend on it
# directly because it calls make recursively. The parent make cannot know
# if the subprocess touched anything so it pessimistically assumes that
-# .buildstamp and .docbuildstamp are out of date and need a rebuild.
+# .buildstamp is out of date and need a rebuild.
# Just goes to show that recursive make really is harmful...
# TODO(bnoordhuis) Force rebuild after gyp or node-gyp update.
build-addons-napi: $(NODE_EXE) test/addons-napi/.buildstamp
@@ -387,6 +387,7 @@ test-all-valgrind: test-build
CI_NATIVE_SUITES ?= addons addons-napi
CI_ASYNC_HOOKS := async-hooks
CI_JS_SUITES ?= default
+CI_DOC := doctool
# Build and test addons without building anything else
test-ci-native: LOGLEVEL := info
@@ -412,7 +413,8 @@ test-ci: | clear-stalled build-addons build-addons-napi doc-only
out/Release/cctest --gtest_output=tap:cctest.tap
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=release --flaky-tests=$(FLAKY_TESTS) \
- $(TEST_CI_ARGS) $(CI_ASYNC_HOOKS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) doctool known_issues
+ $(TEST_CI_ARGS) $(CI_ASYNC_HOOKS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) \
+ $(CI_DOC) known_issues
# Clean up any leftover processes, error if found.
ps awwx | grep Release/node | grep -v grep | cat
@PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \
@@ -448,6 +450,10 @@ test-tick-processor: all
test-hash-seed: all
$(NODE) test/pummel/test-hash-seed.js
+test-doc: doc-only
+ $(MAKE) lint
+ $(PYTHON) tools/test.py $(CI_DOC)
+
test-known-issues: all
$(PYTHON) tools/test.py known_issues
@@ -542,13 +548,13 @@ doc-only: $(apidocs_html) $(apidocs_json)
doc: $(NODE_EXE) doc-only
$(apidoc_dirs):
- mkdir -p $@
+ @mkdir -p $@
out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets
- cp $< $@
+ @cp $< $@
out/doc/%: doc/%
- cp -r $< $@
+ @cp -r $< $@
# check if ./node is actually set, else use user pre-installed binary
gen-json = tools/doc/generate.js --format=json $< > $@
@@ -566,11 +572,11 @@ gen-doc = \
[ -x $(NODE) ] && $(NODE) $(1) || node $(1)
out/doc/api/%.json: doc/api/%.md
- $(call gen-doc, $(gen-json))
+ @$(call gen-doc, $(gen-json))
# check if ./node is actually set, else use user pre-installed binary
out/doc/api/%.html: doc/api/%.md
- $(call gen-doc, $(gen-html))
+ @$(call gen-doc, $(gen-html))
docopen: $(apidocs_html)
@$(PYTHON) -mwebbrowser file://$(PWD)/out/doc/api/all.html
@@ -970,9 +976,11 @@ lint-md-clean:
$(RM) -r tools/remark-preset-lint-node/node_modules
lint-md-build:
- if [ ! -d tools/remark-cli/node_modules ]; then \
+ @if [ ! -d tools/remark-cli/node_modules ]; then \
+ echo "Markdown linter: installing remark-cli into tools/"; \
cd tools/remark-cli && ../../$(NODE) ../../$(NPM) install; fi
- if [ ! -d tools/remark-preset-lint-node/node_modules ]; then \
+ @if [ ! -d tools/remark-preset-lint-node/node_modules ]; then \
+ echo "Markdown linter: installing remark-preset-lint-node into tools/"; \
cd tools/remark-preset-lint-node && ../../$(NODE) ../../$(NPM) install; fi
lint-md: lint-md-build
@@ -981,26 +989,38 @@ lint-md: lint-md-build
./*.md doc src lib benchmark tools/doc/ tools/icu/
LINT_JS_TARGETS = benchmark doc lib test tools
+LINT_JS_CMD = tools/eslint/bin/eslint.js --cache \
+ --rulesdir=tools/eslint-rules --ext=.js,.mjs,.md \
+ $(LINT_JS_TARGETS)
lint-js:
@echo "Running JS linter..."
- $(NODE) tools/eslint/bin/eslint.js --cache --rulesdir=tools/eslint-rules --ext=.js,.mjs,.md \
- $(LINT_JS_TARGETS)
+ @if [ -x $(NODE) ]; then \
+ $(NODE) $(LINT_JS_CMD); \
+ else \
+ node $(LINT_JS_CMD); \
+ fi
jslint: lint-js
@echo "Please use lint-js instead of jslint"
lint-js-ci:
@echo "Running JS linter..."
- $(NODE) tools/lint-js.js $(PARALLEL_ARGS) -f tap -o test-eslint.tap \
- $(LINT_JS_TARGETS)
+ @if [ -x $(NODE) ]; then \
+ $(NODE) tools/lint-js.js $(PARALLEL_ARGS) -f tap -o test-eslint.tap \
+ $(LINT_JS_TARGETS); \
+ else \
+ node tools/lint-js.js $(PARALLEL_ARGS) -f tap -o test-eslint.tap \
+ $(LINT_JS_TARGETS); \
+ fi
jslint-ci: lint-js-ci
@echo "Please use lint-js-ci instead of jslint-ci"
+LINT_CPP_ADDON_DOC_FILES = $(wildcard test/addons/??_*/*.cc test/addons/??_*/*.h)
LINT_CPP_EXCLUDE ?=
LINT_CPP_EXCLUDE += src/node_root_certs.h
-LINT_CPP_EXCLUDE += $(wildcard test/addons/??_*/*.cc test/addons/??_*/*.h)
+LINT_CPP_EXCLUDE += $(LINT_CPP_ADDON_DOC_FILES)
LINT_CPP_EXCLUDE += $(wildcard test/addons-napi/??_*/*.cc test/addons-napi/??_*/*.h)
# These files were copied more or less verbatim from V8.
LINT_CPP_EXCLUDE += src/tracing/trace_event.h src/tracing/trace_event_common.h
@@ -1024,11 +1044,19 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
tools/icu/*.h \
))
+# Code blocks don't have newline at the end,
+# and the actual filename is generated so it won't match header guards
+ADDON_DOC_LINT_FLAGS=-whitespace/ending_newline,-build/header_guard
+
lint-cpp:
@echo "Running C++ linter..."
@$(PYTHON) tools/cpplint.py $(LINT_CPP_FILES)
@$(PYTHON) tools/check-imports.py
+lint-addon-docs: test/addons/.docbuildstamp
+ @echo "Running C++ linter on addon docs..."
+ @$(PYTHON) tools/cpplint.py --filter=$(ADDON_DOC_LINT_FLAGS) $(LINT_CPP_ADDON_DOC_FILES)
+
cpplint: lint-cpp
@echo "Please use lint-cpp instead of cpplint"
@@ -1038,9 +1066,10 @@ lint:
$(MAKE) lint-js || EXIT_STATUS=$$? ; \
$(MAKE) lint-cpp || EXIT_STATUS=$$? ; \
$(MAKE) lint-md || EXIT_STATUS=$$? ; \
+ $(MAKE) lint-addon-docs || EXIT_STATUS=$$? ; \
exit $$EXIT_STATUS
CONFLICT_RE=^>>>>>>> [0-9A-Fa-f]+|^<<<<<<< [A-Za-z]+
-lint-ci: lint-js-ci lint-cpp lint-md
+lint-ci: lint-js-ci lint-cpp lint-md lint-addon-docs
@if ! ( grep -IEqrs "$(CONFLICT_RE)" benchmark deps doc lib src test tools ) \
&& ! ( find . -maxdepth 1 -type f | xargs grep -IEqs "$(CONFLICT_RE)" ); then \
exit 0 ; \
@@ -1120,6 +1149,7 @@ endif
test-ci \
test-ci-js \
test-ci-native \
+ test-doc \
test-gc \
test-gc-clean \
test-hash-seed \
diff --git a/common.gypi b/common.gypi
index c7c367ec83bfc6..d152c81498858f 100644
--- a/common.gypi
+++ b/common.gypi
@@ -291,7 +291,7 @@
'cflags': [ '-pthread', ],
'ldflags': [ '-pthread' ],
}],
- [ 'OS in "linux freebsd openbsd solaris android aix"', {
+ [ 'OS in "linux freebsd openbsd solaris android aix cloudabi"', {
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++0x' ],
'ldflags': [ '-rdynamic' ],
diff --git a/configure b/configure
index 9e04b03d4fe481..95f103fbcb34c2 100755
--- a/configure
+++ b/configure
@@ -57,7 +57,7 @@ from gyp_node import run_gyp
parser = optparse.OptionParser()
valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
- 'android', 'aix')
+ 'android', 'aix', 'cloudabi')
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
'ppc64', 'x32','x64', 'x86', 's390', 's390x')
valid_arm_float_abi = ('soft', 'softfp', 'hard')
diff --git a/deps/openssl/asm/x64-elf-gas/bn/x86_64-mont5.s b/deps/openssl/asm/x64-elf-gas/bn/x86_64-mont5.s
index 7eac91326f6dd5..963fa3efda5ea9 100644
--- a/deps/openssl/asm/x64-elf-gas/bn/x86_64-mont5.s
+++ b/deps/openssl/asm/x64-elf-gas/bn/x86_64-mont5.s
@@ -3075,11 +3075,19 @@ __bn_sqrx8x_internal:
.align 32
.Lsqrx8x_break:
- subq 16+8(%rsp),%r8
+ xorq %rbp,%rbp
+ subq 16+8(%rsp),%rbx
+ adcxq %rbp,%r8
movq 24+8(%rsp),%rcx
+ adcxq %rbp,%r9
movq 0(%rsi),%rdx
- xorl %ebp,%ebp
+ adcq $0,%r10
movq %r8,0(%rdi)
+ adcq $0,%r11
+ adcq $0,%r12
+ adcq $0,%r13
+ adcq $0,%r14
+ adcq $0,%r15
cmpq %rcx,%rdi
je .Lsqrx8x_outer_loop
diff --git a/deps/openssl/asm/x64-elf-gas/ec/ecp_nistz256-x86_64.s b/deps/openssl/asm/x64-elf-gas/ec/ecp_nistz256-x86_64.s
index 23188cda6e935a..027be89d1e446d 100644
--- a/deps/openssl/asm/x64-elf-gas/ec/ecp_nistz256-x86_64.s
+++ b/deps/openssl/asm/x64-elf-gas/ec/ecp_nistz256-x86_64.s
@@ -1036,19 +1036,18 @@ __ecp_nistz256_sqr_montx:
adoxq %rbp,%r13
.byte 0x67,0x67
mulxq %rdx,%rcx,%rax
- movq %r8,%rdx
+ movq .Lpoly+24(%rip),%rdx
adoxq %rcx,%r14
shlxq %rsi,%r8,%rcx
adoxq %rax,%r15
shrxq %rsi,%r8,%rax
- movq .Lpoly+24(%rip),%rbp
+ movq %rdx,%rbp
addq %rcx,%r9
adcq %rax,%r10
- mulxq %rbp,%rcx,%r8
- movq %r9,%rdx
+ mulxq %r8,%rcx,%r8
adcq %rcx,%r11
shlxq %rsi,%r9,%rcx
adcq $0,%r8
@@ -1058,8 +1057,7 @@ __ecp_nistz256_sqr_montx:
addq %rcx,%r10
adcq %rax,%r11
- mulxq %rbp,%rcx,%r9
- movq %r10,%rdx
+ mulxq %r9,%rcx,%r9
adcq %rcx,%r8
shlxq %rsi,%r10,%rcx
adcq $0,%r9
@@ -1069,8 +1067,7 @@ __ecp_nistz256_sqr_montx:
addq %rcx,%r11
adcq %rax,%r8
- mulxq %rbp,%rcx,%r10
- movq %r11,%rdx
+ mulxq %r10,%rcx,%r10
adcq %rcx,%r9
shlxq %rsi,%r11,%rcx
adcq $0,%r10
@@ -1080,12 +1077,12 @@ __ecp_nistz256_sqr_montx:
addq %rcx,%r8
adcq %rax,%r9
- mulxq %rbp,%rcx,%r11
+ mulxq %r11,%rcx,%r11
adcq %rcx,%r10
adcq $0,%r11
xorq %rdx,%rdx
- adcq %r8,%r12
+ addq %r8,%r12
movq .Lpoly+8(%rip),%rsi
adcq %r9,%r13
movq %r12,%r8
@@ -1094,8 +1091,7 @@ __ecp_nistz256_sqr_montx:
movq %r13,%r9
adcq $0,%rdx
- xorl %eax,%eax
- sbbq $-1,%r12
+ subq $-1,%r12
movq %r14,%r10
sbbq %rsi,%r13
sbbq $0,%r14
diff --git a/deps/openssl/asm/x64-elf-gas/x86_64cpuid.s b/deps/openssl/asm/x64-elf-gas/x86_64cpuid.s
index 06d11dc9c8e95e..86c780b1c5f4b6 100644
--- a/deps/openssl/asm/x64-elf-gas/x86_64cpuid.s
+++ b/deps/openssl/asm/x64-elf-gas/x86_64cpuid.s
@@ -116,8 +116,19 @@ OPENSSL_ia32_cpuid:
orl $0x40000000,%edx
andb $15,%ah
cmpb $15,%ah
- jne .Lnotintel
+ jne .LnotP4
orl $0x00100000,%edx
+.LnotP4:
+ cmpb $6,%ah
+ jne .Lnotintel
+ andl $0x0fff0ff0,%eax
+ cmpl $0x00050670,%eax
+ je .Lknights
+ cmpl $0x00080650,%eax
+ jne .Lnotintel
+.Lknights:
+ andl $0xfbffffff,%ecx
+
.Lnotintel:
btl $28,%edx
jnc .Lgeneric
@@ -142,6 +153,10 @@ OPENSSL_ia32_cpuid:
movl $7,%eax
xorl %ecx,%ecx
cpuid
+ btl $26,%r9d
+ jc .Lnotknights
+ andl $0xfff7ffff,%ebx
+.Lnotknights:
movl %ebx,8(%rdi)
.Lno_extended_info:
diff --git a/deps/openssl/asm/x64-macosx-gas/bn/x86_64-mont5.s b/deps/openssl/asm/x64-macosx-gas/bn/x86_64-mont5.s
index 21416b6f5d720c..0cdcd14f1a493c 100644
--- a/deps/openssl/asm/x64-macosx-gas/bn/x86_64-mont5.s
+++ b/deps/openssl/asm/x64-macosx-gas/bn/x86_64-mont5.s
@@ -3075,11 +3075,19 @@ L$sqrx8x_loop:
.p2align 5
L$sqrx8x_break:
- subq 16+8(%rsp),%r8
+ xorq %rbp,%rbp
+ subq 16+8(%rsp),%rbx
+ adcxq %rbp,%r8
movq 24+8(%rsp),%rcx
+ adcxq %rbp,%r9
movq 0(%rsi),%rdx
- xorl %ebp,%ebp
+ adcq $0,%r10
movq %r8,0(%rdi)
+ adcq $0,%r11
+ adcq $0,%r12
+ adcq $0,%r13
+ adcq $0,%r14
+ adcq $0,%r15
cmpq %rcx,%rdi
je L$sqrx8x_outer_loop
diff --git a/deps/openssl/asm/x64-macosx-gas/ec/ecp_nistz256-x86_64.s b/deps/openssl/asm/x64-macosx-gas/ec/ecp_nistz256-x86_64.s
index 05b6d5be2c885b..19df69f08afeb9 100644
--- a/deps/openssl/asm/x64-macosx-gas/ec/ecp_nistz256-x86_64.s
+++ b/deps/openssl/asm/x64-macosx-gas/ec/ecp_nistz256-x86_64.s
@@ -1036,19 +1036,18 @@ __ecp_nistz256_sqr_montx:
adoxq %rbp,%r13
.byte 0x67,0x67
mulxq %rdx,%rcx,%rax
- movq %r8,%rdx
+ movq L$poly+24(%rip),%rdx
adoxq %rcx,%r14
shlxq %rsi,%r8,%rcx
adoxq %rax,%r15
shrxq %rsi,%r8,%rax
- movq L$poly+24(%rip),%rbp
+ movq %rdx,%rbp
addq %rcx,%r9
adcq %rax,%r10
- mulxq %rbp,%rcx,%r8
- movq %r9,%rdx
+ mulxq %r8,%rcx,%r8
adcq %rcx,%r11
shlxq %rsi,%r9,%rcx
adcq $0,%r8
@@ -1058,8 +1057,7 @@ __ecp_nistz256_sqr_montx:
addq %rcx,%r10
adcq %rax,%r11
- mulxq %rbp,%rcx,%r9
- movq %r10,%rdx
+ mulxq %r9,%rcx,%r9
adcq %rcx,%r8
shlxq %rsi,%r10,%rcx
adcq $0,%r9
@@ -1069,8 +1067,7 @@ __ecp_nistz256_sqr_montx:
addq %rcx,%r11
adcq %rax,%r8
- mulxq %rbp,%rcx,%r10
- movq %r11,%rdx
+ mulxq %r10,%rcx,%r10
adcq %rcx,%r9
shlxq %rsi,%r11,%rcx
adcq $0,%r10
@@ -1080,12 +1077,12 @@ __ecp_nistz256_sqr_montx:
addq %rcx,%r8
adcq %rax,%r9
- mulxq %rbp,%rcx,%r11
+ mulxq %r11,%rcx,%r11
adcq %rcx,%r10
adcq $0,%r11
xorq %rdx,%rdx
- adcq %r8,%r12
+ addq %r8,%r12
movq L$poly+8(%rip),%rsi
adcq %r9,%r13
movq %r12,%r8
@@ -1094,8 +1091,7 @@ __ecp_nistz256_sqr_montx:
movq %r13,%r9
adcq $0,%rdx
- xorl %eax,%eax
- sbbq $-1,%r12
+ subq $-1,%r12
movq %r14,%r10
sbbq %rsi,%r13
sbbq $0,%r14
diff --git a/deps/openssl/asm/x64-macosx-gas/x86_64cpuid.s b/deps/openssl/asm/x64-macosx-gas/x86_64cpuid.s
index 909270ecae312b..7075cf80d3015b 100644
--- a/deps/openssl/asm/x64-macosx-gas/x86_64cpuid.s
+++ b/deps/openssl/asm/x64-macosx-gas/x86_64cpuid.s
@@ -117,8 +117,19 @@ L$nocacheinfo:
orl $0x40000000,%edx
andb $15,%ah
cmpb $15,%ah
- jne L$notintel
+ jne L$notP4
orl $0x00100000,%edx
+L$notP4:
+ cmpb $6,%ah
+ jne L$notintel
+ andl $0x0fff0ff0,%eax
+ cmpl $0x00050670,%eax
+ je L$knights
+ cmpl $0x00080650,%eax
+ jne L$notintel
+L$knights:
+ andl $0xfbffffff,%ecx
+
L$notintel:
btl $28,%edx
jnc L$generic
@@ -143,6 +154,10 @@ L$generic:
movl $7,%eax
xorl %ecx,%ecx
cpuid
+ btl $26,%r9d
+ jc L$notknights
+ andl $0xfff7ffff,%ebx
+L$notknights:
movl %ebx,8(%rdi)
L$no_extended_info:
diff --git a/deps/openssl/asm/x64-win32-masm/bn/x86_64-mont5.asm b/deps/openssl/asm/x64-win32-masm/bn/x86_64-mont5.asm
index 837b0bcedcd0c6..fb9aaaeabe2a90 100644
--- a/deps/openssl/asm/x64-win32-masm/bn/x86_64-mont5.asm
+++ b/deps/openssl/asm/x64-win32-masm/bn/x86_64-mont5.asm
@@ -3166,11 +3166,19 @@ DB 067h
ALIGN 32
$L$sqrx8x_break::
- sub r8,QWORD PTR[((16+8))+rsp]
+ xor rbp,rbp
+ sub rbx,QWORD PTR[((16+8))+rsp]
+ adcx r8,rbp
mov rcx,QWORD PTR[((24+8))+rsp]
+ adcx r9,rbp
mov rdx,QWORD PTR[rsi]
- xor ebp,ebp
+ adc r10,0
mov QWORD PTR[rdi],r8
+ adc r11,0
+ adc r12,0
+ adc r13,0
+ adc r14,0
+ adc r15,0
cmp rdi,rcx
je $L$sqrx8x_outer_loop
diff --git a/deps/openssl/asm/x64-win32-masm/ec/ecp_nistz256-x86_64.asm b/deps/openssl/asm/x64-win32-masm/ec/ecp_nistz256-x86_64.asm
index 87338aa6f0edae..da36a1c048642e 100644
--- a/deps/openssl/asm/x64-win32-masm/ec/ecp_nistz256-x86_64.asm
+++ b/deps/openssl/asm/x64-win32-masm/ec/ecp_nistz256-x86_64.asm
@@ -1137,19 +1137,18 @@ DB 067h
adox r13,rbp
DB 067h,067h
mulx rax,rcx,rdx
- mov rdx,r8
+ mov rdx,QWORD PTR[(($L$poly+24))]
adox r14,rcx
shlx rcx,r8,rsi
adox r15,rax
shrx rax,r8,rsi
- mov rbp,QWORD PTR[(($L$poly+24))]
+ mov rbp,rdx
add r9,rcx
adc r10,rax
- mulx r8,rcx,rbp
- mov rdx,r9
+ mulx r8,rcx,r8
adc r11,rcx
shlx rcx,r9,rsi
adc r8,0
@@ -1159,8 +1158,7 @@ DB 067h,067h
add r10,rcx
adc r11,rax
- mulx r9,rcx,rbp
- mov rdx,r10
+ mulx r9,rcx,r9
adc r8,rcx
shlx rcx,r10,rsi
adc r9,0
@@ -1170,8 +1168,7 @@ DB 067h,067h
add r11,rcx
adc r8,rax
- mulx r10,rcx,rbp
- mov rdx,r11
+ mulx r10,rcx,r10
adc r9,rcx
shlx rcx,r11,rsi
adc r10,0
@@ -1181,12 +1178,12 @@ DB 067h,067h
add r8,rcx
adc r9,rax
- mulx r11,rcx,rbp
+ mulx r11,rcx,r11
adc r10,rcx
adc r11,0
xor rdx,rdx
- adc r12,r8
+ add r12,r8
mov rsi,QWORD PTR[(($L$poly+8))]
adc r13,r9
mov r8,r12
@@ -1195,8 +1192,7 @@ DB 067h,067h
mov r9,r13
adc rdx,0
- xor eax,eax
- sbb r12,-1
+ sub r12,-1
mov r10,r14
sbb r13,rsi
sbb r14,0
diff --git a/deps/openssl/asm/x64-win32-masm/x86_64cpuid.asm b/deps/openssl/asm/x64-win32-masm/x86_64cpuid.asm
index 6cb8077b9da0a5..69532e09fbece5 100644
--- a/deps/openssl/asm/x64-win32-masm/x86_64cpuid.asm
+++ b/deps/openssl/asm/x64-win32-masm/x86_64cpuid.asm
@@ -127,8 +127,19 @@ $L$nocacheinfo::
or edx,040000000h
and ah,15
cmp ah,15
- jne $L$notintel
+ jne $L$notP4
or edx,000100000h
+$L$notP4::
+ cmp ah,6
+ jne $L$notintel
+ and eax,00fff0ff0h
+ cmp eax,000050670h
+ je $L$knights
+ cmp eax,000080650h
+ jne $L$notintel
+$L$knights::
+ and ecx,0fbffffffh
+
$L$notintel::
bt edx,28
jnc $L$generic
@@ -153,6 +164,10 @@ $L$generic::
mov eax,7
xor ecx,ecx
cpuid
+ bt r9d,26
+ jc $L$notknights
+ and ebx,0fff7ffffh
+$L$notknights::
mov DWORD PTR[8+rdi],ebx
$L$no_extended_info::
diff --git a/deps/openssl/asm_obsolete/x64-elf-gas/x86_64cpuid.s b/deps/openssl/asm_obsolete/x64-elf-gas/x86_64cpuid.s
index 06d11dc9c8e95e..86c780b1c5f4b6 100644
--- a/deps/openssl/asm_obsolete/x64-elf-gas/x86_64cpuid.s
+++ b/deps/openssl/asm_obsolete/x64-elf-gas/x86_64cpuid.s
@@ -116,8 +116,19 @@ OPENSSL_ia32_cpuid:
orl $0x40000000,%edx
andb $15,%ah
cmpb $15,%ah
- jne .Lnotintel
+ jne .LnotP4
orl $0x00100000,%edx
+.LnotP4:
+ cmpb $6,%ah
+ jne .Lnotintel
+ andl $0x0fff0ff0,%eax
+ cmpl $0x00050670,%eax
+ je .Lknights
+ cmpl $0x00080650,%eax
+ jne .Lnotintel
+.Lknights:
+ andl $0xfbffffff,%ecx
+
.Lnotintel:
btl $28,%edx
jnc .Lgeneric
@@ -142,6 +153,10 @@ OPENSSL_ia32_cpuid:
movl $7,%eax
xorl %ecx,%ecx
cpuid
+ btl $26,%r9d
+ jc .Lnotknights
+ andl $0xfff7ffff,%ebx
+.Lnotknights:
movl %ebx,8(%rdi)
.Lno_extended_info:
diff --git a/deps/openssl/asm_obsolete/x64-macosx-gas/x86_64cpuid.s b/deps/openssl/asm_obsolete/x64-macosx-gas/x86_64cpuid.s
index 909270ecae312b..7075cf80d3015b 100644
--- a/deps/openssl/asm_obsolete/x64-macosx-gas/x86_64cpuid.s
+++ b/deps/openssl/asm_obsolete/x64-macosx-gas/x86_64cpuid.s
@@ -117,8 +117,19 @@ L$nocacheinfo:
orl $0x40000000,%edx
andb $15,%ah
cmpb $15,%ah
- jne L$notintel
+ jne L$notP4
orl $0x00100000,%edx
+L$notP4:
+ cmpb $6,%ah
+ jne L$notintel
+ andl $0x0fff0ff0,%eax
+ cmpl $0x00050670,%eax
+ je L$knights
+ cmpl $0x00080650,%eax
+ jne L$notintel
+L$knights:
+ andl $0xfbffffff,%ecx
+
L$notintel:
btl $28,%edx
jnc L$generic
@@ -143,6 +154,10 @@ L$generic:
movl $7,%eax
xorl %ecx,%ecx
cpuid
+ btl $26,%r9d
+ jc L$notknights
+ andl $0xfff7ffff,%ebx
+L$notknights:
movl %ebx,8(%rdi)
L$no_extended_info:
diff --git a/deps/openssl/asm_obsolete/x64-win32-masm/x86_64cpuid.asm b/deps/openssl/asm_obsolete/x64-win32-masm/x86_64cpuid.asm
index 6cb8077b9da0a5..69532e09fbece5 100644
--- a/deps/openssl/asm_obsolete/x64-win32-masm/x86_64cpuid.asm
+++ b/deps/openssl/asm_obsolete/x64-win32-masm/x86_64cpuid.asm
@@ -127,8 +127,19 @@ $L$nocacheinfo::
or edx,040000000h
and ah,15
cmp ah,15
- jne $L$notintel
+ jne $L$notP4
or edx,000100000h
+$L$notP4::
+ cmp ah,6
+ jne $L$notintel
+ and eax,00fff0ff0h
+ cmp eax,000050670h
+ je $L$knights
+ cmp eax,000080650h
+ jne $L$notintel
+$L$knights::
+ and ecx,0fbffffffh
+
$L$notintel::
bt edx,28
jnc $L$generic
@@ -153,6 +164,10 @@ $L$generic::
mov eax,7
xor ecx,ecx
cpuid
+ bt r9d,26
+ jc $L$notknights
+ and ebx,0fff7ffffh
+$L$notknights::
mov DWORD PTR[8+rdi],ebx
$L$no_extended_info::
diff --git a/deps/openssl/openssl/CHANGES b/deps/openssl/openssl/CHANGES
index 307b2ed5e31287..e3d57b328c58e3 100644
--- a/deps/openssl/openssl/CHANGES
+++ b/deps/openssl/openssl/CHANGES
@@ -2,6 +2,44 @@
OpenSSL CHANGES
_______________
+ This is a high-level summary of the most important changes.
+ For a full list of changes, see the git commit log; for example,
+ https://github.com/openssl/openssl/commits/ and pick the appropriate
+ release branch.
+
+ Changes between 1.0.2l and 1.0.2m [2 Nov 2017]
+
+ *) bn_sqrx8x_internal carry bug on x86_64
+
+ There is a carry propagating bug in the x86_64 Montgomery squaring
+ procedure. No EC algorithms are affected. Analysis suggests that attacks
+ against RSA and DSA as a result of this defect would be very difficult to
+ perform and are not believed likely. Attacks against DH are considered just
+ feasible (although very difficult) because most of the work necessary to
+ deduce information about a private key may be performed offline. The amount
+ of resources required for such an attack would be very significant and
+ likely only accessible to a limited number of attackers. An attacker would
+ additionally need online access to an unpatched system using the target
+ private key in a scenario with persistent DH parameters and a private
+ key that is shared between multiple clients.
+
+ This only affects processors that support the BMI1, BMI2 and ADX extensions
+ like Intel Broadwell (5th generation) and later or AMD Ryzen.
+
+ This issue was reported to OpenSSL by the OSS-Fuzz project.
+ (CVE-2017-3736)
+ [Andy Polyakov]
+
+ *) Malformed X.509 IPAddressFamily could cause OOB read
+
+ If an X.509 certificate has a malformed IPAddressFamily extension,
+ OpenSSL could do a one-byte buffer overread. The most likely result
+ would be an erroneous display of the certificate in text format.
+
+ This issue was reported to OpenSSL by the OSS-Fuzz project.
+ (CVE-2017-3735)
+ [Rich Salz]
+
Changes between 1.0.2k and 1.0.2l [25 May 2017]
*) Have 'config' recognise 64-bit mingw and choose 'mingw64' as the target
diff --git a/deps/openssl/openssl/INSTALL b/deps/openssl/openssl/INSTALL
index aa7e35fa79fea0..fcdbfc0a6ee00b 100644
--- a/deps/openssl/openssl/INSTALL
+++ b/deps/openssl/openssl/INSTALL
@@ -190,10 +190,8 @@
the failure that isn't a problem in OpenSSL itself (like a missing
or malfunctioning bc). If it is a problem with OpenSSL itself,
try removing any compiler optimization flags from the CFLAG line
- in Makefile.ssl and run "make clean; make". Please send a bug
- report to , including the output of
- "make report" in order to be added to the request tracker at
- http://www.openssl.org/support/rt.html.
+ in Makefile.ssl and run "make clean; make". To report a bug please open an
+ issue on GitHub, at https://github.com/openssl/openssl/issues.
4. If everything tests ok, install OpenSSL with
diff --git a/deps/openssl/openssl/Makefile b/deps/openssl/openssl/Makefile
index a3d30318f9178d..484f2f45f77667 100644
--- a/deps/openssl/openssl/Makefile
+++ b/deps/openssl/openssl/Makefile
@@ -4,7 +4,7 @@
## Makefile for OpenSSL
##
-VERSION=1.0.2l
+VERSION=1.0.2m
MAJOR=1
MINOR=0.2
SHLIB_VERSION_NUMBER=1.0.0
diff --git a/deps/openssl/openssl/Makefile.bak b/deps/openssl/openssl/Makefile.bak
index ea0d92e4d7db50..b545261eaeee19 100644
--- a/deps/openssl/openssl/Makefile.bak
+++ b/deps/openssl/openssl/Makefile.bak
@@ -4,7 +4,7 @@
## Makefile for OpenSSL
##
-VERSION=1.0.2l
+VERSION=1.0.2m
MAJOR=1
MINOR=0.2
SHLIB_VERSION_NUMBER=1.0.0
diff --git a/deps/openssl/openssl/NEWS b/deps/openssl/openssl/NEWS
index fd49cedeba4c5c..1b72013ad18624 100644
--- a/deps/openssl/openssl/NEWS
+++ b/deps/openssl/openssl/NEWS
@@ -5,6 +5,11 @@
This file gives a brief overview of the major changes between each OpenSSL
release. For more details please read the CHANGES file.
+ Major changes between OpenSSL 1.0.2l and OpenSSL 1.0.2m [2 Nov 2017]
+
+ o bn_sqrx8x_internal carry bug on x86_64 (CVE-2017-3736)
+ o Malformed X.509 IPAddressFamily could cause OOB read (CVE-2017-3735)
+
Major changes between OpenSSL 1.0.2k and OpenSSL 1.0.2l [25 May 2017]
o config now recognises 64-bit mingw and chooses mingw64 instead of mingw
diff --git a/deps/openssl/openssl/README b/deps/openssl/openssl/README
index 4c357d9a836d08..b5aae6260ce889 100644
--- a/deps/openssl/openssl/README
+++ b/deps/openssl/openssl/README
@@ -1,5 +1,5 @@
- OpenSSL 1.0.2l 25 May 2017
+ OpenSSL 1.0.2m 2 Nov 2017
Copyright (c) 1998-2015 The OpenSSL Project
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
diff --git a/deps/openssl/openssl/apps/ca.c b/deps/openssl/openssl/apps/ca.c
index f90f033baed375..9a839969a204bb 100644
--- a/deps/openssl/openssl/apps/ca.c
+++ b/deps/openssl/openssl/apps/ca.c
@@ -1985,10 +1985,6 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509,
/* Lets add the extensions, if there are any */
if (ext_sect) {
X509V3_CTX ctx;
- if (ci->version == NULL)
- if ((ci->version = ASN1_INTEGER_new()) == NULL)
- goto err;
- ASN1_INTEGER_set(ci->version, 2); /* version 3 certificate */
/*
* Free the current entries if any, there should not be any I believe
@@ -2051,6 +2047,15 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509,
goto err;
}
+ {
+ STACK_OF(X509_EXTENSION) *exts = ci->extensions;
+
+ if (exts != NULL && sk_X509_EXTENSION_num(exts) > 0)
+ /* Make it an X509 v3 certificate. */
+ if (!X509_set_version(ret, 2))
+ goto err;
+ }
+
/* Set the right value for the noemailDN option */
if (email_dn == 0) {
if (!X509_set_subject_name(ret, dn_subject))
diff --git a/deps/openssl/openssl/apps/s_client.c b/deps/openssl/openssl/apps/s_client.c
index ffb8ffc5af20c7..19914a19dae818 100644
--- a/deps/openssl/openssl/apps/s_client.c
+++ b/deps/openssl/openssl/apps/s_client.c
@@ -1683,6 +1683,8 @@ int MAIN(int argc, char **argv)
if (strstr(mbuf, "/stream:features>"))
goto shut;
seen = BIO_read(sbio, mbuf, BUFSIZZ);
+ if (seen <= 0)
+ goto shut;
mbuf[seen] = 0;
}
BIO_printf(sbio,
diff --git a/deps/openssl/openssl/apps/s_server.c b/deps/openssl/openssl/apps/s_server.c
index d75871386928f5..98ffc09314a302 100644
--- a/deps/openssl/openssl/apps/s_server.c
+++ b/deps/openssl/openssl/apps/s_server.c
@@ -3017,7 +3017,7 @@ static int www_body(char *hostname, int s, int stype, unsigned char *context)
PEM_write_bio_X509(io, peer);
} else
BIO_puts(io, "no client certificate available\n");
- BIO_puts(io, " |