[GHC] #14510: GHC.ExecutionStack.showStackTrace broken

GHC ghc-devs at haskell.org
Thu May 17 17:44:08 UTC 2018


#14510: GHC.ExecutionStack.showStackTrace broken
---------------------------------+--------------------------------------
        Reporter:  duog          |                Owner:  (none)
            Type:  bug           |               Status:  new
        Priority:  normal        |            Milestone:
       Component:  Compiler      |              Version:  8.2.1
      Resolution:                |             Keywords:
Operating System:  Linux         |         Architecture:  x86_64 (amd64)
 Type of failure:  None/Unknown  |            Test Case:
      Blocked By:                |             Blocking:
 Related Tickets:                |  Differential Rev(s):
       Wiki Page:                |
---------------------------------+--------------------------------------

Comment (by niteria):

 I've just tried with GHC HEAD and I get:

 {{{
 $ ./testdwarf
 Stack trace:
     set_initial_registers (rts/Libdw.c:288.0) in
 /data/users/bnitka/ghc-14510/testdwarf
     dwfl_thread_getframes in
     get_one_thread_cb in /usr/lib64/libdw-0.168.so
     dwfl_getthreads in /usr/lib64/libdw-0.168.so
     dwfl_getthread_frames in /usr/lib64/libdw-0.168.so
     libdwGetBacktrace (rts/Libdw.c:259.0) in
 /data/users/bnitka/ghc-14510/testdwarf
     base_GHCziExecutionStackziInternal_collectStackTrace1_info
 (libraries/base/GHC/ExecutionStack/Internal.hsc:74.10) in
 /data/users/bnitka/ghc-14510/testdwarf
     base_GHCziExecutionStackziInternal_collectStackTrace1_info
 (libraries/base/GHC/ExecutionStack/Internal.hsc:74.10) in
 /data/users/bnitka/ghc-14510/testdwarf
     base_GHCziExecutionStack_showStackTrace1_info
 (libraries/base/GHC/ExecutionStack.hs:50.1) in
 /data/users/bnitka/ghc-14510/testdwarf
     base_GHCziBase_zdfMonadIO1_info (libraries/base/GHC/Base.hs:1389.1) in
 /data/users/bnitka/ghc-14510/testdwarf
     base_GHCziBase_zdfApplicativeIO2_info
 (libraries/base/GHC/Base.hs:1392.1) in
 /data/users/bnitka/ghc-14510/testdwarf
     stg_catch_frame_info (rts/Exception.cmm:372.1) in
 /data/users/bnitka/ghc-14510/testdwarf
     stg_stop_thread_info (rts/StgStartup.cmm:42.1) in
 /data/users/bnitka/ghc-14510/testdwarf
     StgRunIsImplementedInAssembler (rts/StgCRun.c:370.0) in
 /data/users/bnitka/ghc-14510/testdwarf
     scheduleWaitThread (rts/Schedule.c:453.0) in
 /data/users/bnitka/ghc-14510/testdwarf
     hs_main (rts/RtsMain.c:73.0) in /data/users/bnitka/ghc-14510/testdwarf
      in /data/users/bnitka/ghc-14510/testdwarf
     __libc_start_main in
     _start in /data/users/bnitka/ghc-14510/testdwarf
 }}}

 I had to modify it slightly for it to print anything:

 {{{
 import GHC.ExecutionStack

 import Data.Maybe

 main :: IO ()
 main = do
   putStrLn . fromMaybe "" =<< showStackTrace
   return ()
 }}}

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


More information about the ghc-tickets mailing list