Ticket #1137 (closed merge: fixed)

Opened 6 years ago

Last modified 6 years ago

HashTable.hashString broken

Reported by: j.russell@… Owned by: igloo
Priority: normal Milestone: 6.6.1
Component: libraries/base Version: 6.6
Keywords: Cc:
Operating System: Linux Architecture: x86
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

The output of HashTable?.hashString is seriously broken in GHC 6.6.

Here is a sample of the output with some strings zipped with their hash values:

[(97,"a"),(59,"ba"),(74,"cba"),(69,"dcab"),(73,"edbac"),(72,"fecabd"),(73,"gfdbace"),(74,"hgecabdf"),(75,"ihfdbaceg"),(75,"jigecabdfh"),(76,"kjhfdbacegi"),(77,"lkigecabdfhj"),(77,"mljhfdbacegik"),(78,"nmkigecabdfhjl"),(79,"onljhfdbacegikm"),(80,"pomkigecabdfhjln"),(80,"qpnljhfdbacegikmo"),(81,"rqomkigecabdfhjlnp"),(82,"srpnljhfdbacegikmoq"),(83,"tsqomkigecabdfhjlnpr"),(83,"utrpnljhfdbacegikmoqs"),(84,"vusqomkigecabdfhjlnprt"),(85,"wvtrpnljhfdbacegikmoqsu"),(85,"xwusqomkigecabdfhjlnprtv"),(86,"yxvtrpnljhfdbacegikmoqsuw"),(87,"zywusqomkigecabdfhjlnprtvx")]

The output from GHC 6.4.2, for comparison:

[(97,"a"),(12641,"ba"),(134650,"cba"),(1348750,"dcab"),(686898,"edbac"),(531877,"fecabd"),(659882,"gfdbace"),(781094,"hgecabdf"),(924023,"ihfdbaceg"),(85405,"jigecabdfh"),(306085,"kjhfdbacegi"),(1152971,"lkigecabdfhj"),(1259361,"mljhfdbacegik"),(1179474,"nmkigecabdfhjl"),(489548,"onljhfdbacegikm"),(231688,"pomkigecabdfhjln"),(805762,"qpnljhfdbacegikmo"),(26414,"rqomkigecabdfhjlnp"),(1005367,"srpnljhfdbacegikmoq"),(394080,"tsqomkigecabdfhjlnpr"),(1010834,"utrpnljhfdbacegikmoqs"),(1178465,"vusqomkigecabdfhjlnprt"),(421802,"wvtrpnljhfdbacegikmoqsu"),(263363,"xwusqomkigecabdfhjlnprtv"),(1417299,"yxvtrpnljhfdbacegikmoqsuw"),(675868,"zywusqomkigecabdfhjlnprtvx")]

Attachments

HashBug.hs Download (0.7 KB) - added by j.russell@… 6 years ago.
Test case

Change History

Changed 6 years ago by j.russell@…

Test case

Changed 6 years ago by simonmar

  • milestone set to 6.6.1

I've asked Jan-Willem Maessen (who supplied the hashString code in 6.6).

Changed 6 years ago by simonmar

  • owner set to igloo
  • type changed from bug to merge

Fixed, to merge (libraries/base):

Thu Feb 15 09:43:04 GMT 2007  Simon Marlow <simonmar@microsoft.com>
  * fix for hashString, from Jan-Willem Maessen (see #1137)

Changed 6 years ago by igloo

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

Merged.

Note: See TracTickets for help on using tickets.