Re: [GHC] #4089: Empty Show instance + phantom type + GHCi = out of memory

2010-05-23 Thread GHC
#4089: Empty Show instance + phantom type + GHCi = out of memory
---+
Reporter:  japple  |   Owner:
Type:  bug |  Status:  new   
Priority:  normal  |   Component:  GHCi  
 Version:  6.12.2  |Keywords:
  Os:  Linux   |Testcase:
Architecture:  x86 | Failure:  GHCi crash
---+

Comment(by pumpkin):

 This is just like doing

 {{{
 instance Eq M
 }}}

 and having a call to (==) loop between (/=) and (==) infinitely. show
 calls shows which calls showsPrec which calls show. I don't think this is
 a bug.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4089#comment:2
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #698: GHC's internal memory allocator never releases memory back to the OS

2010-05-23 Thread GHC
#698: GHC's internal memory allocator never releases memory back to the OS
-+--
Reporter:  guest |Owner:  igloo 
Type:  bug   |   Status:  new   
Priority:  low   |Milestone:  6.12.3
   Component:  Runtime System|  Version:  6.12.1
Keywords:|   Difficulty:  Moderate (less than a day)
  Os:  Unknown/Multiple  | Testcase:  N/A   
Architecture:  Unknown/Multiple  |  Failure:  None/Unknown  
-+--
Changes (by tinlix):

  * version:  6.4.1 = 6.12.1


Comment:

 I have the following use case where it is important for the GC to free
 memory.
 I have a huge matrix file which needs to be multiplied with a vector. The
 matrix is 100Gb in size, so it's not possible to use matlab to do it.

 I used lazy string and thought I could use the readFile in
 Data.ByteString.Lazy to read in the matrix one row at a time and do the
 multiplication with the vector. The whole program just does a simple run
 over the huge file. It turns out the program run out of memory as it goes
 through the big file.

 Finally I have to go back to C++/STL which enables me to write a program
 that takes constant memory and solves the problem fine.

 IMHO, this bug is serious. What a GC should provide, i.e. constant memory
 consumption now becomes O(n). In a sense, this makes functions such as
 readFile useless for serious use.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/698#comment:27
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #4053: Incorrect install-name for dynamic Darwin rts.

2010-05-23 Thread GHC
#4053: Incorrect install-name for dynamic Darwin rts.
--+-
  Reporter:  PHO  |  Owner:  igloo   
  Type:  bug  | Status:  closed  
  Priority:  high |  Milestone:  6.14.1  
 Component:  Build System |Version:  6.13
Resolution:  fixed|   Keywords:  
Difficulty:   | Os:  MacOS X 
  Testcase:   |   Architecture:  Unknown/Multiple
   Failure:  Building GHC failed  |  
--+-
Changes (by igloo):

  * status:  patch = closed
  * resolution:  = fixed


Comment:

 Applied, thanks!

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4053#comment:3
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #4085: minor External Core prettyprinter bug

2010-05-23 Thread GHC
#4085: minor External Core prettyprinter bug
+---
  Reporter:  tim|  Owner:  igloo   
  Type:  bug| Status:  closed  
  Priority:  normal |  Milestone:  
 Component:  External Core  |Version:  6.12.2  
Resolution:  fixed  |   Keywords:  
Difficulty: | Os:  Unknown/Multiple
  Testcase: |   Architecture:  Unknown/Multiple
   Failure:  Other  |  
+---
Changes (by igloo):

  * status:  patch = closed
  * resolution:  = fixed


Comment:

 Thanks, I've applied the patch - but it looks like you recorded it against
 the 6.10 branch, so I've re-recorded it against the HEAD.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4085#comment:4
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #698: GHC's internal memory allocator never releases memory back to the OS

2010-05-23 Thread GHC
#698: GHC's internal memory allocator never releases memory back to the OS
-+--
Reporter:  guest |Owner:  igloo 
Type:  bug   |   Status:  new   
Priority:  low   |Milestone:  6.12.3
   Component:  Runtime System|  Version:  6.12.1
Keywords:|   Difficulty:  Moderate (less than a day)
  Os:  Unknown/Multiple  | Testcase:  N/A   
Architecture:  Unknown/Multiple  |  Failure:  None/Unknown  
-+--

Comment(by igloo):

 Replying to [comment:27 tinlix]:
  I have the following use case where it is important for the GC to free
 memory.
  I have a huge matrix file which needs to be multiplied with a vector.
 The matrix is 100Gb in size, so it's not possible to use matlab to do it.
 
  I used lazy string and thought I could use the readFile in
 Data.ByteString.Lazy to read in the matrix one row at a time and do the
 multiplication with the vector. The whole program just does a simple run
 over the huge file. It turns out the program run out of memory as it goes
 through the big file.
 
  Finally I have to go back to C++/STL which enables me to write a program
 that takes constant memory and solves the problem fine.
 
  IMHO, this bug is serious. What a GC should provide, i.e. constant
 memory consumption now becomes O(n). In a sense, this makes functions such
 as readFile useless for serious use.

 From your description, it sounds like your program has a space leak. This
 ticket is not the problem: it is about the memory usage not dropping after
 a peak, but you expect the memory usage to be constant, so won't have any
 peaks.

 I suggest you explain the problem, including the code, to the
 [http://www.haskell.org/mailman/listinfo/haskell-cafe haskell-cafe mailing
 list].

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/698#comment:28
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #4089: Empty Show instance + phantom type + GHCi = out of memory

2010-05-23 Thread GHC
#4089: Empty Show instance + phantom type + GHCi = out of memory
-+--
  Reporter:  japple  |  Owner:
  Type:  bug | Status:  closed
  Priority:  normal  |  Milestone:
 Component:  GHCi|Version:  6.12.2
Resolution:  invalid |   Keywords:
Difficulty:  | Os:  Linux 
  Testcase:  |   Architecture:  x86   
   Failure:  GHCi crash  |  
-+--
Changes (by igloo):

  * status:  new = closed
  * resolution:  = invalid


Comment:

 pumpkin is right: The default `Show` instance includes
 {{{
 show x  = shows x 
 showsPrec _ x s = show x ++ s
 }}}
 and
 {{{
 shows   =  showsPrec zeroInt
 }}}
 So we have
 {{{
 show M = shows M  = showsPrec zeroInt M  = show M ++ 
 }}}

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4089#comment:3
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #4090: Impossible compilation with primitive operations (possibly unsafeCoerce#)

2010-05-23 Thread GHC
#4090: Impossible compilation with primitive operations (possibly unsafeCoerce#)
+---
Reporter:  malosh   |   Owner:
Type:  bug  |  Status:  new   
Priority:  normal   |   Component:  Compiler  
 Version:  6.12.1   |Keywords:
  Os:  MacOS X  |Testcase:
Architecture:  x86  | Failure:  Compile-time crash
+---
 On the following code :

 ulp#::Double#-Double#
 ulp# d=
   let w=unsafeCoerce# d :: Word64#
   e=(unsafeCoerce# (uncheckedShiftRL64# w 52#)) `and#` 0x7ff##
   in
if e `gtWord#` 0x034## then
  unsafeCoerce# (unsafeCoerce# (e `minusWord#` (0x034##))
 `uncheckedShiftL64#` 52#)
else
  unsafeCoerce# (1## `uncheckedShiftL#` ((unsafeCoerce# e) -# 1#))

 GHC 6.12.1 returns :

 ghc: panic! (the 'impossible' happened)
   (GHC version 6.12.1 for i386-apple-darwin):
 getRegister(x86) I64[BaseReg + 72]

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4090
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #4090: Impossible compilation with primitive operations (possibly unsafeCoerce#)

2010-05-23 Thread GHC
#4090: Impossible compilation with primitive operations (possibly unsafeCoerce#)
+---
Reporter:  malosh   |   Owner:
Type:  bug  |  Status:  new   
Priority:  normal   |   Component:  Compiler  
 Version:  6.12.1   |Keywords:
  Os:  MacOS X  |Testcase:
Architecture:  x86  | Failure:  Compile-time crash
+---

Comment(by malosh):

 The code is :
 {{{
 ulp#::Double#-Double#
 ulp# d=
let w=unsafeCoerce# d :: Word64#
e=(unsafeCoerce# (uncheckedShiftRL64# w 52#)) `and#` 0x7ff##
in
 if e `gtWord#` 0x034## then
   unsafeCoerce# (unsafeCoerce# (e `minusWord#` (0x034##))
 `uncheckedShiftL64#` 52#)
 else
   unsafeCoerce# (1## `uncheckedShiftL#` ((unsafeCoerce# e) -# 1#))
 }}}

 And the compiler answers :

 {{{
 GHC 6.12.1 returns :

 ghc: panic! (the 'impossible' happened)
   (GHC version 6.12.1 for i386-apple-darwin):
 getRegister(x86) I64[BaseReg + 72]
 }}}

 (Sorry for the wrong trac formatting).

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4090#comment:1
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #4022: GHC Bindist is Broken on FreeBSD/amd64

2010-05-23 Thread GHC
#4022: GHC Bindist is Broken on FreeBSD/amd64
+---
Reporter:  pgj  |Owner:  pgj
Type:  bug  |   Status:  patch  
Priority:  normal   |Milestone:  6.12.3 
   Component:  libraries (other)|  Version:  6.13   
Keywords:  GMP,integer-gmp, sharedlibs  |   Difficulty: 
  Os:  FreeBSD  | Testcase: 
Architecture:  x86_64 (amd64)   |  Failure:  Building GHC failed
+---
Changes (by pgj):

  * status:  new = patch


Comment:

 I have a patch that solves the problem.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4022#comment:5
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #4022: GHC Bindist is Broken on FreeBSD/amd64

2010-05-23 Thread GHC
#4022: GHC Bindist is Broken on FreeBSD/amd64
+---
Reporter:  pgj  |Owner:  igloo  
Type:  bug  |   Status:  patch  
Priority:  normal   |Milestone:  6.12.3 
   Component:  libraries (other)|  Version:  6.13   
Keywords:  GMP,integer-gmp, sharedlibs  |   Difficulty: 
  Os:  FreeBSD  | Testcase: 
Architecture:  x86_64 (amd64)   |  Failure:  Building GHC failed
+---
Changes (by pgj):

  * owner:  pgj = igloo


Comment:

 Ian, would you validate and push it? :)

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4022#comment:6
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs