Control: tags -1 + patch
Control: user -1 debian-m...@lists.debian.org
Control: usertags -1 + mips-patch



Unfortunately there is no feedback from upstream.


The problem is the condition roundedBits > 0xffffffff.
On 32-bit system 0xffffffff treated as Int is -1,
due to maxBound :: Int is 214748364 (0x7fffffff).

If the value of roundedBits is greater than 0x7fffffff,
it will satisfy already exisiting condition (roundedBits <= 0),
due to roundedBits is Int type.


I think that removing this additional condition (reverting commit)
would be acceptable solution.


Patch that remove this condition is attached.


With this patch I was able to build haskell-bloomfilter
on mips, mipsel, i386 and amd64.

Could you please consider including these changes?


Regards,
Dejan
diff -uNr bloomfilter-2.0.0.0/Data/BloomFilter/Easy.hs haskell-bloomfilter-2.0.0.0.build/Data/BloomFilter/Easy.hs
--- bloomfilter-2.0.0.0/Data/BloomFilter/Easy.hs	2014-07-05 05:57:24.000000000 +0000
+++ haskell-bloomfilter-2.0.0.0.build/Data/BloomFilter/Easy.hs	2014-11-12 14:45:52.000000000 +0000
@@ -72,7 +72,7 @@
             minimum [((-k) * cap / log (1 - (errRate ** (1 / k))), k)
                      | k <- [1..100]]
         roundedBits = nextPowerOfTwo (ceiling bits)
-    in if roundedBits <= 0 || roundedBits > 0xffffffff
+    in if roundedBits <= 0
        then Left  "capacity too large to represent"
        else Right (roundedBits, truncate hashes)
 

Reply via email to