Skip to content

Commit

Permalink
deps: cherry-pick 0353a1e from upstream V8
Browse files Browse the repository at this point in the history
Original commit message:

    Avoid disassembling Interpreted Regexp code

    I found that v8 will crash when --print-code is turned on while Regexp
    is interpreted. It crashes when trying to print Relocation info during
    Disassembly. It should probably avoid printing out disassembly when the
    Code object is a bytecode regexp.

    Bug:
    Change-Id: I35b531cb03996a303248652871452266c78fee38
    Reviewed-on: https://chromium-review.googlesource.com/642127
    Reviewed-by: Yang Guo <[email protected]>
    Commit-Queue: Jaideep Bajwa <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#47718}

PR-URL: #15599
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
targos authored and MylesBorins committed Sep 29, 2017
1 parent 9309c9d commit ec7f9ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deps/v8/src/regexp/jsregexp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ RegExpEngine::CompilationResult RegExpCompiler::Assemble(
Handle<HeapObject> code = macro_assembler_->GetCode(pattern);
isolate->IncreaseTotalRegexpCodeGenerated(code->Size());
work_list_ = NULL;
#ifdef ENABLE_DISASSEMBLER
#if defined(ENABLE_DISASSEMBLER) && !defined(V8_INTERPRETED_REGEXP)
if (FLAG_print_code) {
CodeTracer::Scope trace_scope(isolate->GetCodeTracer());
OFStream os(trace_scope.file());
Expand Down

0 comments on commit ec7f9ce

Please sign in to comment.