• Simon Zünd's avatar
    Reset DeclarationScope::function_ variable after pre-parsing · 70dd77c7
    Simon Zünd authored
    "--print-scopes" uses the {function_} variable to print the function
    name and locals of a function scope. In case of a pre-parsed function,
    the function variable of the scope lives in a zone which is nuked after
    pre-parsing, while the scope lives on. This leaves the {function_}
    variable pointer in the scope in a state where it points to
    invalid memory, causing "--print-scopes" to crash.
    This CL fixes the crash by properly resetting the {function_}
    pointer.
    
    TBR=verwaest@chromium.org
    
    Change-Id: Id24dbb605bec883317f676265a920fe0ca662301
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1776094Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
    Commit-Queue: Simon Zünd <szuend@chromium.org>
    Auto-Submit: Simon Zünd <szuend@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#63513}
    70dd77c7
Name
Last commit
Last update
..
OWNERS Loading commit data...
ast-function-literal-id-reindexer.cc Loading commit data...
ast-function-literal-id-reindexer.h Loading commit data...
ast-source-ranges.h Loading commit data...
ast-traversal-visitor.h Loading commit data...
ast-value-factory.cc Loading commit data...
ast-value-factory.h Loading commit data...
ast.cc Loading commit data...
ast.h Loading commit data...
modules.cc Loading commit data...
modules.h Loading commit data...
prettyprinter.cc Loading commit data...
prettyprinter.h Loading commit data...
scopes.cc Loading commit data...
scopes.h Loading commit data...
source-range-ast-visitor.cc Loading commit data...
source-range-ast-visitor.h Loading commit data...
variables.cc Loading commit data...
variables.h Loading commit data...