-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Description
While fuzzing a toy parser, I stumbled upon a few seemingly valid float literals, where f64::from_str() returned an Error. The floats that trigger this behaviour have a lot (~200) of repeating digits.
See example in Rust playground:
https://play.rust-lang.org/?gist=93f8ae91e66c6b78814b397429b189b1&version=stable&backtrace=0
Other float literals that cannot be parsed correctly:
6666666.6666666667666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666766666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666,
666666666666666666666666666.66666666676666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666,
6666666666666666676666666666666666666666666666666666666666666666666666666617666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666.66666666666666666666666666666666666666666666666666666666666666666666667666666666666666666666666666666666666666666,
etc.
The fuzzer ran with rustc 1.11.0-nightly (01411937f 2016-07-01), but the issue can also be reproduced in current stable and nigthly versions of Rust.