Opened 9 years ago

Closed 9 years ago

#1137 closed merge (fixed)

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: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

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 (1)

HashBug.hs (740 bytes) - added by j.russell@… 9 years ago.
Test case

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by j.russell@…

Test case

comment:1 Changed 9 years ago by simonmar

  • Milestone set to 6.6.1

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

comment:2 Changed 9 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 <[email protected]>
  * fix for hashString, from Jan-Willem Maessen (see #1137)

comment:3 Changed 9 years ago by igloo

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

Merged.

Note: See TracTickets for help on using tickets.