#2797: ghci stack overflows when ghc does not
-----------------------------------------+----------------------------------
    Reporter:  TristanAllwood            |        Owner:                  
        Type:  run-time performance bug  |       Status:  new             
    Priority:  normal                    |    Milestone:  6.10.2          
   Component:  GHCi                      |      Version:  6.11            
    Severity:  normal                    |   Resolution:                  
    Keywords:                            |   Difficulty:  Unknown         
    Testcase:                            |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple          |  
-----------------------------------------+----------------------------------
Comment (by igloo):

 In my profiling HEAD, I'm seeing
 {{{
 (gdb) r [...] -e main z.hs +RTS -DS
 [Thread debugging using libthread_db enabled]
 [New process 4968]
 <interactive>: internal error: ASSERTION FAILED: file (null), line 698

     (GHC version 6.11.20090308 for x86_64_unknown_linux)
     Please report this as a GHC bug:
 http://www.haskell.org/ghc/reportabug
 [New Thread 139638659299040 (LWP 4968)]

 Program received signal SIGABRT, Aborted.
 [Switching to Thread 139638659299040 (LWP 4968)]
 0x00007f0027811ef5 in raise () from /lib/libc.so.6
 (gdb) bt
 #0  0x00007f0027811ef5 in raise () from /lib/libc.so.6
 #1  0x00007f0027813413 in abort () from /lib/libc.so.6
 #2  0x00000000049a1278 in rtsFatalInternalErrorFn (
     s=0x51b3520 "ASSERTION FAILED: file %s, line %u\n", ap=0x7fff30c30cd0)
     at RtsMessages.c:164
 #3  0x00000000049a0e3c in barf (
     s=0x51b3520 "ASSERTION FAILED: file %s, line %u\n") at
 RtsMessages.c:40
 #4  0x00000000049a0e96 in _assertFail (filename=0x0, linenum=698)
     at RtsMessages.c:55
 #5  0x00000000049c66c6 in stg_ap_pp_info ()
 #6  0x0000000000000000 in ?? ()
 }}}
 Looks like this is the assertion in `AutoApply_debug_p.cmm` here:
 {{{
         case FUN,
              FUN_1_0,
              FUN_0_1,
              FUN_2_0,
              FUN_1_1,
              FUN_0_2,
              FUN_STATIC: {
             arity = TO_W_(StgFunInfoExtra_arity(%FUN_INFO(info)));
             ASSERT(arity > 0);
             if (arity == 1) {
                 R2 = W_[Sp+WDS(1)];
                 W_[Sp+WDS(1)] = stg_ap_p_info;
                 Sp_adj(1);
                 R1 = R1 + 1;
                 jump %GET_ENTRY(UNTAG(R1));
             }
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2797#comment:4>
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