Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1516 - protect ExpressionEvaluator from self-referential macros #1517

Merged

Conversation

ivangalkin
Copy link
Contributor

@ivangalkin ivangalkin commented Jul 11, 2018

  • ExpressionEvaluator: introduce evaluation stack in order to
    terminate an endless recursion
  • CxxPreprocessor: don't cache ExpressionEvaluator in order to
    reset the evaluation stack properly
  • fix ExpressionEvaluatorTest
  • introduce new tests

close #1516


This change is Reviewable

…eferential macros

* `ExpressionEvaluator`: introduce evaluation stack in order to
  terminate an endless recursion
* `CxxPreprocessor`: don't cache `ExpressionEvaluator` in order to
  reset the evaluation stack properly
* fix `ExpressionEvaluatorTest`
* introduce new tests
@ivangalkin ivangalkin requested review from guwirth and Bertk July 11, 2018 15:40
Copy link
Contributor

@Bertk Bertk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@guwirth guwirth added this to the 1.2 milestone Jul 18, 2018
@guwirth guwirth added the bug label Jul 18, 2018
@guwirth guwirth merged commit e082c4a into SonarOpenCommunity:master Jul 18, 2018
@ivangalkin ivangalkin mentioned this pull request Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

java.lang.StackOverflowError during parse of source file
3 participants