Opened 7 years ago

Closed 4 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 Difficulty: Easy (less than 1 hour)
Test Case: Blocked By:
Blocking: Related Tickets:

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 4 years ago.
tests.patch (69.4 KB) - added by lelf 4 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:2 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:3 Changed 5 years ago by simonmar

  • Difficulty changed from Easy (1 hr) to Easy (less than 1 hour)

Changed 4 years ago by lelf

Changed 4 years ago by lelf

comment:4 Changed 4 years ago by lelf

  • Status changed from new to patch
  • Type of failure set to None/Unknown

comment:5 Changed 4 years ago by simonmar

  • Milestone changed from _|_ to 6.14.1
  • Priority changed from low to high

Looks good, thanks for the patch!

comment:6 Changed 4 years ago by igloo

  • Owner set to igloo

comment:7 Changed 4 years ago by igloo

  • Resolution set to fixed
  • Status changed from patch to closed

Patches applied, thanks!

Note: See TracTickets for help on using tickets.