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: parsing a '%' expression with a CR but not a newline #1294

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

flavorjones
Copy link
Contributor

That is, this Ruby code: %\r without a trailing newline.

Previously this failed an assertion and aborted.

This was found via the fuzzer.

@flavorjones
Copy link
Contributor Author

Waiting to fix the memcheck issue until #1293 is merged, because there will be conflicts.

@flavorjones flavorjones marked this pull request as draft August 21, 2023 02:56
@flavorjones flavorjones force-pushed the flavorjones-cr-without-lf-in-percent branch from f3b42fa to 2296c03 Compare August 21, 2023 18:49
Copy link
Collaborator

@HParker HParker left a comment

Choose a reason for hiding this comment

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

Nice! the early \n makes sense to me.

@flavorjones flavorjones marked this pull request as ready for review August 21, 2023 18:51
@flavorjones
Copy link
Contributor Author

I think there's an opportunity to standardize and unify how yarp.c is handling \n and \r\n line endings ... going to attempt that in a subsequent PR.

@HParker HParker merged commit b6f51f2 into ruby:main Aug 21, 2023
45 checks passed
@flavorjones flavorjones deleted the flavorjones-cr-without-lf-in-percent branch August 21, 2023 19:07
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.

2 participants