#5003: test 4038 (ghci) fails on OS X 64 bit.
---------------------------------+------------------------------------------
    Reporter:  gwright           |        Owner:  gwright      
        Type:  bug               |       Status:  new          
    Priority:  high              |    Milestone:  7.2.1        
   Component:  GHCi              |      Version:  7.0.2        
    Keywords:                    |     Testcase:               
   Blockedby:                    |   Difficulty:               
          Os:  Unknown/Multiple  |     Blocking:               
Architecture:  x86_64 (amd64)    |      Failure:  Runtime crash
---------------------------------+------------------------------------------

Comment(by gwright):

 A brief review of gcc assembler syntax shows that 0x4038 bytes are really
 supposed to be pushed.  The constraint line:
 {{{
         : : "i"(RESERVED_C_STACK_BYTES+48+8 /*stack frame size*/));
 }}}
 puts the value (2048 * 8) + 48 + 8 = 0x4038 bytes into operand `%0`.  So
 that's correct.

 It doesn't seem like there is a bug here at all --- if we do recursive
 calls of C functions through the ffi, we will eventually run out of stack
 space.  I suppose I knew but didn't really believe that 16 kB were
 allocated off the stack for each C call.
 I'll ask if there is some subtlety here.  I don't understand why the test
 passed earlier on OS X 64 bit, only failing for `ghci`.  1000 iterations
 should have almost 16 MB onto the stack, twice the allocated space.  Why
 didn't that fail?

 If the fix is to reduce the number of times `f` is called in the
 `4038.hs`,
 I will submit a patch to do that.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to