Opened 10 years ago

Closed 7 years ago

#1344 closed bug (fixed)

Overflow bug in hex character literals

Reported by: simonmar Owned by: igloo
Priority: high Milestone: 7.0.1
Component: Compiler Version: 6.6.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Prelude> "Hel\x6c000000000000000 World"
<interactive>:1:7: lexical error in string/character literal at character 'c'
Prelude> "Hel\x6c0000000000000000 World"
"Hel\NUL World"

Two bugs really: the first error message gives a strange location, and the second example is probably the result of an overflow somewhere.

Attachments (2)

ghc.patch (92.7 KB) - added by lelf 7 years ago.
tests.patch (69.4 KB) - added by lelf 7 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:2 Changed 8 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:3 Changed 7 years ago by simonmar

difficulty: Easy (1 hr)Easy (less than 1 hour)

Changed 7 years ago by lelf

Attachment: ghc.patch added

Changed 7 years ago by lelf

Attachment: tests.patch added

comment:4 Changed 7 years ago by lelf

Status: newpatch
Type of failure: None/Unknown

comment:5 Changed 7 years ago by simonmar

Milestone: _|_6.14.1
Priority: lowhigh

Looks good, thanks for the patch!

comment:6 Changed 7 years ago by igloo

Owner: set to igloo

comment:7 Changed 7 years ago by igloo

Resolution: fixed
Status: patchclosed

Patches applied, thanks!

Note: See TracTickets for help on using tickets.