Skip to content

Incorrect parsing of large binary/octal/hex literals #3347

@overlookmotel

Description

@overlookmotel

@DonIsaac I'm afraid I found an edge case with #3296.

Because of the switch from using floating point to integers, we need to handle arithmetic overflow now.

For numbers which evaluate to more than u64::MAX, parsing is incorrect.

e.g.: 0x10000000000000000 should be evaluated as 2.0f64.powf(64.0), but instead produces 0.

Playground

Metadata

Metadata

Assignees

Labels

A-parserArea - ParserC-bugCategory - Bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions