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

Patch to error and fail instead of using all available memory #987

Closed
wants to merge 1 commit into from
Closed

Patch to error and fail instead of using all available memory #987

wants to merge 1 commit into from

Conversation

wmealing
Copy link
Contributor

then crashing to detect the error condition of an unmatched
double quote before the end of a file.

I couldn't get it to show nice error messages, so this may not be
the ideal fix.

A test case for this situation has also been added.

I have made a pull request, but unsure if its the correct way of showing errors, feel free to change it.

then crashing to detect the error condition of an unmatched
double quote before the end of a file.

I couldn't get it to show nice error messages, so this may not be
the ideal fix.

A test case for this situation has also been added.
@brson
Copy link
Contributor

brson commented Sep 27, 2011

Hi. This looks great!

As I believe this is your first contribution to Rust (huzzah!), we need to make sure the paperwork is in order (sigh). Fortunately it's really simple. If you already have level 1 committer access with Mozilla then you're good to go. Otherwise please submit a committer agreement[1], which is mostly just a legal paper trail asserting that you wrote the code.

Let me know when you've done that and I will get this merged.

[1] http://www.mozilla.org/hacking/notification/. Note that there's no need to request level 1 committer access for contributing to Rust - we just need the signed agreement.

@wmealing
Copy link
Contributor Author

Email sent and "signed". I didn't think that this method of development required commit access so I just followed the page specifically as per your instructions.

rdr.bump();
while rdr.curr() != '"' {
if rdr.is_eof() {
rdr.err(#fmt["unterminated double quote string: %s", rdr.get_str_from(n)]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This may show quite a lot of data if the first quote is early in the source code.

Copy link
Contributor

Choose a reason for hiding this comment

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

Very true. Sadly we have many errors that spew pages of garbage. If you want to provide a follow-up patch that makes it more sane, that would be fine.

@brson
Copy link
Contributor

brson commented Sep 28, 2011

OK. When we get notice that you're agreement is received I'll pull this. Thanks for being patient.

@brson
Copy link
Contributor

brson commented Sep 28, 2011

Integrated.

@brson brson closed this Sep 28, 2011
bors pushed a commit to rust-lang-ci/rust that referenced this pull request Oct 26, 2020
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