Ticket #1344 (closed bug: fixed)

Opened 6 years ago

Last modified 3 years ago

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

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

Change History

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple

Changed 4 years ago by simonmar

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

Changed 3 years ago by lelf

Changed 3 years ago by lelf

Changed 3 years ago by lelf

  • status changed from new to patch
  • failure set to None/Unknown

Changed 3 years ago by simonmar

  • priority changed from low to high
  • milestone changed from _|_ to 6.14.1

Looks good, thanks for the patch!

Changed 3 years ago by igloo

  • owner set to igloo

Changed 3 years ago by igloo

  • status changed from patch to closed
  • resolution set to fixed

Patches applied, thanks!

Note: See TracTickets for help on using tickets.