Hello community, here is the log from the commit of package ghc-primitive for openSUSE:Factory checked in at 2015-09-30 05:52:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-primitive (Old) and /work/SRC/openSUSE:Factory/.ghc-primitive.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ghc-primitive" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-primitive/ghc-primitive.changes 2015-05-13 07:13:08.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-primitive.new/ghc-primitive.changes 2015-09-30 05:52:28.000000000 +0200 @@ -1,0 +2,9 @@ +Sun Sep 27 10:14:25 UTC 2015 - mimi.vx@gmail.com + +- update to 0.6.1.0 +* Use more appropriate types in internal memset functions, which prevents + overflows/segfaults on 64-bit systems. +* Fixed a warning on GHC 7.10 +* Worked around a -dcore-lint bug in GHC 7.6/7.7 + +------------------------------------------------------------------- Old: ---- primitive-0.6.tar.gz New: ---- primitive-0.6.1.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-primitive.spec ++++++ --- /var/tmp/diff_new_pack.TnLw2y/_old 2015-09-30 05:52:28.000000000 +0200 +++ /var/tmp/diff_new_pack.TnLw2y/_new 2015-09-30 05:52:28.000000000 +0200 @@ -19,7 +19,7 @@ %global pkg_name primitive Name: ghc-primitive -Version: 0.6 +Version: 0.6.1.0 Release: 0 Summary: Primitive memory-related operations License: BSD-3-Clause ++++++ primitive-0.6.tar.gz -> primitive-0.6.1.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/primitive-0.6/Control/Monad/Primitive.hs new/primitive-0.6.1.0/Control/Monad/Primitive.hs --- old/primitive-0.6/Control/Monad/Primitive.hs 2015-03-28 02:10:00.000000000 +0100 +++ new/primitive-0.6.1.0/Control/Monad/Primitive.hs 2015-09-20 05:34:48.000000000 +0200 @@ -31,7 +31,9 @@ import GHC.ST ( ST(..) ) import Control.Monad.Trans.Class (lift) +#if !MIN_VERSION_base(4,8,0) import Data.Monoid (Monoid) +#endif import Control.Monad.Trans.Identity ( IdentityT) import Control.Monad.Trans.List ( ListT ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/primitive-0.6/Data/Primitive/Internal/Operations.hs new/primitive-0.6.1.0/Data/Primitive/Internal/Operations.hs --- old/primitive-0.6/Data/Primitive/Internal/Operations.hs 2015-03-28 02:10:00.000000000 +0100 +++ new/primitive-0.6.1.0/Data/Primitive/Internal/Operations.hs 2015-09-20 05:34:48.000000000 +0200 @@ -27,63 +27,64 @@ ) where import Data.Primitive.MachDeps (Word64_#, Int64_#) +import Foreign.C.Types import GHC.Prim foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word8" - setWord8Array# :: MutableByteArray# s -> Int# -> Int# -> Word# -> IO () + setWord8Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Word# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word16" - setWord16Array# :: MutableByteArray# s -> Int# -> Int# -> Word# -> IO () + setWord16Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Word# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word32" - setWord32Array# :: MutableByteArray# s -> Int# -> Int# -> Word# -> IO () + setWord32Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Word# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word64" - setWord64Array# :: MutableByteArray# s -> Int# -> Int# -> Word64_# -> IO () + setWord64Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Word64_# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word" - setWordArray# :: MutableByteArray# s -> Int# -> Int# -> Word# -> IO () + setWordArray# :: MutableByteArray# s -> CPtrdiff -> CSize -> Word# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word8" - setInt8Array# :: MutableByteArray# s -> Int# -> Int# -> Int# -> IO () + setInt8Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Int# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word16" - setInt16Array# :: MutableByteArray# s -> Int# -> Int# -> Int# -> IO () + setInt16Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Int# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word32" - setInt32Array# :: MutableByteArray# s -> Int# -> Int# -> Int# -> IO () + setInt32Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Int# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word64" - setInt64Array# :: MutableByteArray# s -> Int# -> Int# -> Int64_# -> IO () + setInt64Array# :: MutableByteArray# s -> CPtrdiff -> CSize -> Int64_# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word" - setIntArray# :: MutableByteArray# s -> Int# -> Int# -> Int# -> IO () + setIntArray# :: MutableByteArray# s -> CPtrdiff -> CSize -> Int# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Ptr" - setAddrArray# :: MutableByteArray# s -> Int# -> Int# -> Addr# -> IO () + setAddrArray# :: MutableByteArray# s -> CPtrdiff -> CSize -> Addr# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Float" - setFloatArray# :: MutableByteArray# s -> Int# -> Int# -> Float# -> IO () + setFloatArray# :: MutableByteArray# s -> CPtrdiff -> CSize -> Float# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Double" - setDoubleArray# :: MutableByteArray# s -> Int# -> Int# -> Double# -> IO () + setDoubleArray# :: MutableByteArray# s -> CPtrdiff -> CSize -> Double# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Char" - setWideCharArray# :: MutableByteArray# s -> Int# -> Int# -> Char# -> IO () + setWideCharArray# :: MutableByteArray# s -> CPtrdiff -> CSize -> Char# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word8" - setWord8OffAddr# :: Addr# -> Int# -> Int# -> Word# -> IO () + setWord8OffAddr# :: Addr# -> CPtrdiff -> CSize -> Word# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word16" - setWord16OffAddr# :: Addr# -> Int# -> Int# -> Word# -> IO () + setWord16OffAddr# :: Addr# -> CPtrdiff -> CSize -> Word# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word32" - setWord32OffAddr# :: Addr# -> Int# -> Int# -> Word# -> IO () + setWord32OffAddr# :: Addr# -> CPtrdiff -> CSize -> Word# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word64" - setWord64OffAddr# :: Addr# -> Int# -> Int# -> Word64_# -> IO () + setWord64OffAddr# :: Addr# -> CPtrdiff -> CSize -> Word64_# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word" - setWordOffAddr# :: Addr# -> Int# -> Int# -> Word# -> IO () + setWordOffAddr# :: Addr# -> CPtrdiff -> CSize -> Word# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word8" - setInt8OffAddr# :: Addr# -> Int# -> Int# -> Int# -> IO () + setInt8OffAddr# :: Addr# -> CPtrdiff -> CSize -> Int# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word16" - setInt16OffAddr# :: Addr# -> Int# -> Int# -> Int# -> IO () + setInt16OffAddr# :: Addr# -> CPtrdiff -> CSize -> Int# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word32" - setInt32OffAddr# :: Addr# -> Int# -> Int# -> Int# -> IO () + setInt32OffAddr# :: Addr# -> CPtrdiff -> CSize -> Int# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word64" - setInt64OffAddr# :: Addr# -> Int# -> Int# -> Int64_# -> IO () + setInt64OffAddr# :: Addr# -> CPtrdiff -> CSize -> Int64_# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Word" - setIntOffAddr# :: Addr# -> Int# -> Int# -> Int# -> IO () + setIntOffAddr# :: Addr# -> CPtrdiff -> CSize -> Int# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Ptr" - setAddrOffAddr# :: Addr# -> Int# -> Int# -> Addr# -> IO () + setAddrOffAddr# :: Addr# -> CPtrdiff -> CSize -> Addr# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Float" - setFloatOffAddr# :: Addr# -> Int# -> Int# -> Float# -> IO () + setFloatOffAddr# :: Addr# -> CPtrdiff -> CSize -> Float# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Double" - setDoubleOffAddr# :: Addr# -> Int# -> Int# -> Double# -> IO () + setDoubleOffAddr# :: Addr# -> CPtrdiff -> CSize -> Double# -> IO () foreign import ccall unsafe "primitive-memops.h hsprimitive_memset_Char" - setWideCharOffAddr# :: Addr# -> Int# -> Int# -> Char# -> IO () + setWideCharOffAddr# :: Addr# -> CPtrdiff -> CSize -> Char# -> IO () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/primitive-0.6/Data/Primitive/Types.hs new/primitive-0.6.1.0/Data/Primitive/Types.hs --- old/primitive-0.6/Data/Primitive/Types.hs 2015-03-28 02:10:00.000000000 +0100 +++ new/primitive-0.6.1.0/Data/Primitive/Types.hs 2015-09-20 05:34:48.000000000 +0200 @@ -113,7 +113,10 @@ { (# s1#, x# #) -> (# s1#, ctr x# #) } \ ; writeByteArray# arr# i# (ctr x#) s# = wr_arr arr# i# x# s# \ ; setByteArray# arr# i# n# (ctr x#) s# \ - = case unsafeCoerce# (internal (set_arr arr# i# n# x#)) s# of \ + = let { i = fromIntegral (I# i#) \ + ; n = fromIntegral (I# n#) \ + } in \ + case unsafeCoerce# (internal (set_arr arr# i n x#)) s# of \ { (# s1#, _ #) -> s1# } \ \ ; indexOffAddr# addr# i# = ctr (idx_addr addr# i#) \ @@ -121,7 +124,10 @@ { (# s1#, x# #) -> (# s1#, ctr x# #) } \ ; writeOffAddr# addr# i# (ctr x#) s# = wr_addr addr# i# x# s# \ ; setOffAddr# addr# i# n# (ctr x#) s# \ - = case unsafeCoerce# (internal (set_addr addr# i# n# x#)) s# of \ + = let { i = fromIntegral (I# i#) \ + ; n = fromIntegral (I# n#) \ + } in \ + case unsafeCoerce# (internal (set_addr addr# i n x#)) s# of \ { (# s1#, _ #) -> s1# } \ ; {-# INLINE sizeOf# #-} \ ; {-# INLINE alignment# #-} \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/primitive-0.6/cbits/primitive-memops.c new/primitive-0.6.1.0/cbits/primitive-memops.c --- old/primitive-0.6/cbits/primitive-memops.c 2015-03-28 02:10:00.000000000 +0100 +++ new/primitive-0.6.1.0/cbits/primitive-memops.c 2015-09-20 05:34:48.000000000 +0200 @@ -1,18 +1,18 @@ #include <string.h> #include "primitive-memops.h" -void hsprimitive_memcpy( void *dst, int doff, void *src, int soff, size_t len ) +void hsprimitive_memcpy( void *dst, ptrdiff_t doff, void *src, ptrdiff_t soff, size_t len ) { memcpy( (char *)dst + doff, (char *)src + soff, len ); } -void hsprimitive_memmove( void *dst, int doff, void *src, int soff, size_t len ) +void hsprimitive_memmove( void *dst, ptrdiff_t doff, void *src, ptrdiff_t soff, size_t len ) { memmove( (char *)dst + doff, (char *)src + soff, len ); } #define MEMSET(TYPE, ATYPE) \ -void hsprimitive_memset_ ## TYPE (Hs ## TYPE *p, int off, int n, ATYPE x) \ +void hsprimitive_memset_ ## TYPE (Hs ## TYPE *p, ptrdiff_t off, size_t n, ATYPE x) \ { \ p += off; \ if (x == 0) \ @@ -35,7 +35,7 @@ } \ } -void hsprimitive_memset_Word8 (HsWord8 *p, int off, int n, HsWord x) +void hsprimitive_memset_Word8 (HsWord8 *p, ptrdiff_t off, size_t n, HsWord x) { memset( (char *)(p+off), x, n ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/primitive-0.6/cbits/primitive-memops.h new/primitive-0.6.1.0/cbits/primitive-memops.h --- old/primitive-0.6/cbits/primitive-memops.h 2015-03-28 02:10:00.000000000 +0100 +++ new/primitive-0.6.1.0/cbits/primitive-memops.h 2015-09-20 05:34:48.000000000 +0200 @@ -2,20 +2,21 @@ #define haskell_primitive_memops_h #include <stdlib.h> +#include <stddef.h> #include <HsFFI.h> -void hsprimitive_memcpy( void *dst, int doff, void *src, int soff, size_t len ); -void hsprimitive_memmove( void *dst, int doff, void *src, int soff, size_t len ); +void hsprimitive_memcpy( void *dst, ptrdiff_t doff, void *src, ptrdiff_t soff, size_t len ); +void hsprimitive_memmove( void *dst, ptrdiff_t doff, void *src, ptrdiff_t soff, size_t len ); -void hsprimitive_memset_Word8 (HsWord8 *, int, int, HsWord); -void hsprimitive_memset_Word16 (HsWord16 *, int, int, HsWord); -void hsprimitive_memset_Word32 (HsWord32 *, int, int, HsWord); -void hsprimitive_memset_Word64 (HsWord64 *, int, int, HsWord64); -void hsprimitive_memset_Word (HsWord *, int, int, HsWord); -void hsprimitive_memset_Ptr (HsPtr *, int, int, HsPtr); -void hsprimitive_memset_Float (HsFloat *, int, int, HsFloat); -void hsprimitive_memset_Double (HsDouble *, int, int, HsDouble); -void hsprimitive_memset_Char (HsChar *, int, int, HsChar); +void hsprimitive_memset_Word8 (HsWord8 *, ptrdiff_t, size_t, HsWord); +void hsprimitive_memset_Word16 (HsWord16 *, ptrdiff_t, size_t, HsWord); +void hsprimitive_memset_Word32 (HsWord32 *, ptrdiff_t, size_t, HsWord); +void hsprimitive_memset_Word64 (HsWord64 *, ptrdiff_t, size_t, HsWord64); +void hsprimitive_memset_Word (HsWord *, ptrdiff_t, size_t, HsWord); +void hsprimitive_memset_Ptr (HsPtr *, ptrdiff_t, size_t, HsPtr); +void hsprimitive_memset_Float (HsFloat *, ptrdiff_t, size_t, HsFloat); +void hsprimitive_memset_Double (HsDouble *, ptrdiff_t, size_t, HsDouble); +void hsprimitive_memset_Char (HsChar *, ptrdiff_t, size_t, HsChar); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/primitive-0.6/changelog.md new/primitive-0.6.1.0/changelog.md --- old/primitive-0.6/changelog.md 2015-03-28 02:10:00.000000000 +0100 +++ new/primitive-0.6.1.0/changelog.md 2015-09-20 05:34:48.000000000 +0200 @@ -1,3 +1,12 @@ +## Changes in version 0.6.1.0 + + * Use more appropriate types in internal memset functions, which prevents + overflows/segfaults on 64-bit systems. + + * Fixed a warning on GHC 7.10 + + * Worked around a -dcore-lint bug in GHC 7.6/7.7 + ## Changes in version 0.6 * Split PrimMonad into two classes to allow automatic lifting of primitive diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/primitive-0.6/primitive.cabal new/primitive-0.6.1.0/primitive.cabal --- old/primitive-0.6/primitive.cabal 2015-03-28 02:10:00.000000000 +0100 +++ new/primitive-0.6.1.0/primitive.cabal 2015-09-20 05:34:48.000000000 +0200 @@ -1,5 +1,5 @@ Name: primitive -Version: 0.6 +Version: 0.6.1.0 License: BSD3 License-File: LICENSE