[GHC] #7684: cgrun071 segfaults

GHC ghc-devs at haskell.org
Sun Sep 1 07:46:37 CEST 2013


#7684: cgrun071 segfaults
----------------------------------+----------------------------------
        Reporter:  tibbe          |            Owner:  leroux
            Type:  bug            |           Status:  patch
        Priority:  normal         |        Milestone:  7.8.1
       Component:  Compiler       |          Version:  7.7
      Resolution:                 |         Keywords:
Operating System:  MacOS X        |     Architecture:  x86_64 (amd64)
 Type of failure:  Runtime crash  |       Difficulty:  Unknown
       Test Case:  cgrun071       |       Blocked By:
        Blocking:                 |  Related Tickets:
----------------------------------+----------------------------------

Comment (by leroux):

 My fix is to simply apply a mask of n-bits to the word being passed to the
 fast population count function.

 After fixing the {{{popcnt8}}} test, I found that {{{popcnt16}}} also had
 the same problem, so I ended up applying the fix to 8, 16 and 32 bit word
 tests.

 {{{
 test_popCnt8 = test (popcntMask 8 popcnt8) (slowPopcnt . wordMask 8)
 test_popCnt16 = test (popcntMask 16 popcnt16) (slowPopcnt . wordMask 16)
 test_popCnt32 = test (popcntMask 32 popcnt32) (slowPopcnt . wordMask 32)
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7684#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler




More information about the ghc-tickets mailing list