Skip to content

Failing test case for caching bugs - #3428

Closed
amasad wants to merge 1 commit into
masterfrom
more-cache-bugs
Closed

amasad wants to merge 1 commit into
masterfrom
more-cache-bugs

Conversation

@amasad

@amasad amasad commented Mar 16, 2016

Copy link
Copy Markdown
Member

tl;dr: Reusing nodes is leading to caching bugs. We're getting the same path/scope etc for fundamentally different paths in the tree. This can be catastrophic.

The test cases creates a member expression node that is going to be used to replace multiple call expression callee. After we do that, we clear the cache, and we traverse again to visit Identifier. Then the two foo identifiers are going to have exactly the same path, which is obviously wrong because they are different places in the AST.

amasad added a commit that referenced this pull request Mar 17, 2016
Is causing problems with path cache. See #3428
@nicolo-ribaudo

Copy link
Copy Markdown
Member

I'm closing this PR, since the solution to this problem is "don't reuse node, but clone them".

Ref: #7149

@hzoo
hzoo deleted the more-cache-bugs branch January 9, 2018 13:59
@lock lock Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 5, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Oct 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: tests outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants