Skip to content

Moose: stop parsing when the base parser stops parsing #4218

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

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

masatake
Copy link
Member

@masatake masatake commented Mar 27, 2025

Fixed #4217

When Perl parser finds __END__ in the input, it stops parsing. As a result, inputEnd method of Moose parser is called.

However. the original code doesn't stop parsing after called the method. The inputEnd method of Moose parser did only release its resources (supersOrRoles member).
Moose parser continued parsing the text after __END__ and accessed the supersOrRoles member. ctags crashed here.

Fixed universal-ctags#4217

When Perl parser finds __END__ in the input, it stops parsing.
As a result, inputEnd method of Moose parser is called.

However. the original code doesn't stop parsing after called
the method. The inputEnd method of Moose parser did only
release its resources (supersOrRoles member).
Moose parser continued parsing the text after __END__ and
accessed the supersOrRoles member. ctags crashed here.

Signed-off-by: Masatake YAMATO <[email protected]>
Copy link

codecov bot commented Mar 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.80%. Comparing base (ee714a4) to head (856eb4b).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4218   +/-   ##
=======================================
  Coverage   85.80%   85.80%           
=======================================
  Files         241      241           
  Lines       62536    62537    +1     
=======================================
+ Hits        53660    53661    +1     
  Misses       8876     8876           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@masatake masatake merged commit b3a1de5 into universal-ctags:master Mar 28, 2025
101 of 104 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Perl: Segfault on Throwable::Error
1 participant