-
Notifications
You must be signed in to change notification settings - Fork 31
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
Signed integer overflow on libstdc++ #30
Comments
Thanks for reporting.
It's parsed as Time type. I think this is not a valid Time value, so this should be rejected in the parser, maybe 😢 |
If MM is out of month, integer overflow could happen. BUG=#30
I've added a workaround, but this is not a complete fix, I believe. |
Unfortunately, it is not :( It neither rejects nonsensical date like "2000-2-30", nor accepts valid date like "1800-1-1". |
I know that does not reject nonsense date. |
Here's the input that will trigger the issue:
int_overflow.txt
Feed it into master(c2444ed) parse_stdin built with UndefinedBehaviorSanitizer and linked with libstdc++(shipped with gcc 7.1.1) will crash the parser:
Interestingly, the issue would disappear if I choose to use libc++ instead.
The text was updated successfully, but these errors were encountered: