Skip to content

Crash in debug mode #717

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

Closed
mAarnos opened this issue Dec 22, 2015 · 0 comments
Closed

Crash in debug mode #717

mAarnos opened this issue Dec 22, 2015 · 0 comments
Labels
bug Panic, non-idempotency, invalid code, etc.

Comments

@mAarnos
Copy link

mAarnos commented Dec 22, 2015

If I try to run the debug version of rustfmt on the attached file (added .txt to the end to get around GitHub restrictions) then rustfmt crashes due to an arithmetic operation overflow like so

thread '<main>' panicked at 'arithmetic operation overflowed', src\lib.rs:351

This only happens if we use the windows format (i.e. CR+LF) for EOL stuff. I used the latest development version of rustfmt and compiled it with 1.5 stable on Windows 7.

main.rs.txt

@nrc nrc added the bug Panic, non-idempotency, invalid code, etc. label Dec 22, 2015
cassiersg added a commit to cassiersg/rustfmt that referenced this issue Jan 10, 2016
The '\r' character wasn't counted in the line length.
nrc added a commit that referenced this issue Jan 10, 2016
Fix issue with windows line endings (#717).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Panic, non-idempotency, invalid code, etc.
Projects
None yet
Development

No branches or pull requests

3 participants