From 7de5a557103dd689bd9a757720eca72459d86e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Fri, 11 Oct 2019 11:42:04 +0200 Subject: [PATCH] deps: patch V8 to 7.8.279.17 Refs: https://github.com/v8/v8/compare/7.8.279.15...7.8.279.17 PR-URL: https://github.com/nodejs/node/pull/29928 Reviewed-By: Jiawen Geng Reviewed-By: Colin Ihrig Reviewed-By: Michael Dawson --- deps/v8/include/v8-version.h | 2 +- deps/v8/src/execution/isolate.cc | 7 ++++- .../regress/wasm/regress-crbug-1007608.js | 26 +++++++++++++++++++ deps/v8/tools/testrunner/base_runner.py | 8 ++++++ deps/v8/tools/testrunner/testproc/progress.py | 25 +++++++++++++++--- 5 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-crbug-1007608.js diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 000be3a739a616..ef90963d2540d1 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 7 #define V8_MINOR_VERSION 8 #define V8_BUILD_NUMBER 279 -#define V8_PATCH_LEVEL 15 +#define V8_PATCH_LEVEL 17 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/execution/isolate.cc b/deps/v8/src/execution/isolate.cc index d090ed5260806d..3ba39562b15289 100644 --- a/deps/v8/src/execution/isolate.cc +++ b/deps/v8/src/execution/isolate.cc @@ -1680,8 +1680,13 @@ Object Isolate::UnwindAndFindHandler() { int return_offset = static_cast(frame->pc() - instruction_start); int handler_offset = table.LookupReturn(return_offset); DCHECK_NE(-1, handler_offset); + // Compute the stack pointer from the frame pointer. This ensures that + // argument slots on the stack are dropped as returning would. + Address return_sp = frame->fp() + + StandardFrameConstants::kFixedFrameSizeAboveFp - + code.stack_slots() * kSystemPointerSize; return FoundHandler(Context(), instruction_start, handler_offset, - code.constant_pool(), frame->sp(), frame->fp()); + code.constant_pool(), return_sp, frame->fp()); } case StackFrame::WASM_COMPILED: { diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-crbug-1007608.js b/deps/v8/test/mjsunit/regress/wasm/regress-crbug-1007608.js new file mode 100644 index 00000000000000..37d5b2e4a2f700 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/wasm/regress-crbug-1007608.js @@ -0,0 +1,26 @@ +// Copyright 2019 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Bug is in the C-to-Wasm entry, used e.g. by the Wasm interpreter. +// Flags: --wasm-interpret-all + +load("test/mjsunit/wasm/wasm-module-builder.js"); + +let argc = 7; +let builder = new WasmModuleBuilder(); +let types = new Array(argc).fill(kWasmI32); +let sig = makeSig(types, []); +let body = []; +for (let i = 0; i < argc; ++i) { + body.push(kExprGetLocal, i); +} +body.push(kExprCallFunction, 0); +builder.addImport('', 'f', sig); +builder.addFunction("main", sig).addBody(body).exportAs('main'); +let instance = builder.instantiate({ + '': { + 'f': function() { throw "don't crash"; } + } +}); +assertThrows(instance.exports.main); diff --git a/deps/v8/tools/testrunner/base_runner.py b/deps/v8/tools/testrunner/base_runner.py index 15c53358786a0c..cb23366aa4c5b5 100644 --- a/deps/v8/tools/testrunner/base_runner.py +++ b/deps/v8/tools/testrunner/base_runner.py @@ -162,6 +162,7 @@ def __init__(self, flags, timeout_scalefactor, status_mode, execution_mode): PROGRESS_INDICATORS = { 'verbose': progress.VerboseProgressIndicator, + 'ci': progress.CIProgressIndicator, 'dots': progress.DotsProgressIndicator, 'color': progress.ColorProgressIndicator, 'mono': progress.MonochromeProgressIndicator, @@ -355,6 +356,10 @@ def _add_parser_default_options(self, parser): parser.add_option("--exit-after-n-failures", type="int", default=100, help="Exit after the first N failures instead of " "running all tests. Pass 0 to disable this feature.") + parser.add_option("--ci-test-completion", + help="Path to a file for logging test completion in the " + "context of CI progress indicator. Ignored if " + "progress indicator is other than 'ci'.") # Rerun parser.add_option("--rerun-failures-count", default=0, type=int, @@ -804,6 +809,9 @@ def _create_progress_indicators(self, test_count, options): self.build_config.arch, self.mode_options.execution_mode)) + for proc in procs: + proc.configure(options) + for proc in procs: try: proc.set_test_count(test_count) diff --git a/deps/v8/tools/testrunner/testproc/progress.py b/deps/v8/tools/testrunner/testproc/progress.py index edc88668b7f5d3..6957cdc423f322 100644 --- a/deps/v8/tools/testrunner/testproc/progress.py +++ b/deps/v8/tools/testrunner/testproc/progress.py @@ -57,9 +57,16 @@ def _on_result_for(self, test, result): class ProgressIndicator(base.TestProcObserver): + def __init__(self): + super(base.TestProcObserver, self).__init__() + self.options = None + def finished(self): pass + def configure(self, options): + self.options = options + class SimpleProgressIndicator(ProgressIndicator): def __init__(self): @@ -114,8 +121,7 @@ def _print(self, text): sys.stdout.flush() self._last_printed_time = time.time() - def _on_result_for(self, test, result): - super(VerboseProgressIndicator, self)._on_result_for(test, result) + def _message(self, test, result): # TODO(majeski): Support for dummy/grouped results if result.has_unexpected_output: if result.output.HasCrashed(): @@ -124,9 +130,12 @@ def _on_result_for(self, test, result): outcome = 'FAIL' else: outcome = 'pass' + return 'Done running %s %s: %s' % ( + test, test.variant or 'default', outcome) - self._print('Done running %s %s: %s' % ( - test, test.variant or 'default', outcome)) + def _on_result_for(self, test, result): + super(VerboseProgressIndicator, self)._on_result_for(test, result) + self._print(self._message(test, result)) # TODO(machenbach): Remove this platform specific hack and implement a proper # feedback channel from the workers, providing which tests are currently run. @@ -155,6 +164,14 @@ def _on_event(self, event): self._print_processes_linux() +class CIProgressIndicator(VerboseProgressIndicator): + def _on_result_for(self, test, result): + super(VerboseProgressIndicator, self)._on_result_for(test, result) + if self.options.ci_test_completion: + with open(self.options.ci_test_completion, "a") as f: + f.write(self._message(test, result) + "\n") + + class DotsProgressIndicator(SimpleProgressIndicator): def __init__(self): super(DotsProgressIndicator, self).__init__()