logo       

[ ghc-Bugs-1282571 ] +RTS -xc and SIGINT handler gives seg fault: msg#00018

lang.haskell.glasgow.bugs

Subject: [ ghc-Bugs-1282571 ] +RTS -xc and SIGINT handler gives seg fault

Bugs item #1282571, was opened at 2005-09-05 15:33
Message generated for change (Comment added) made by fergus
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1282571&group_id=8032

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Profiling
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Fergus Henderson (fergus)
Assigned to: Nobody/Anonymous (nobody)
Summary: +RTS -xc and SIGINT handler gives seg fault

Initial Comment:
To reproduce this bug, save the attached file Bug.hs,
run the following commands

ghc -package posix -prof -auto-all Bug.hs
./a.out +RTS -xc

and then hit control-C. The result is a SIGSEGV inside
fprintCCS().


----------------------------------------------------------------------

>Comment By: Fergus Henderson (fergus)
Date: 2005-09-05 15:44

Message:
Logged In: YES
user_id=135331

The crash is a null pointer dereference in fprintCCS().
Here's a gdb stack trace

(gdb) where
#0 0x08072cbf in fprintCCS ()
#1 0x00000000 in ?? ()
#2 0x08077fa1 in raiseAsyncWithLock ()
#3 0x402b60f0 in ?? ()
#4 0x0809f3e8 in MainCapability ()
#5 0x402c2014 in ?? ()
#6 0x0807b2d2 in raisezh_fast ()
#7 0x401a3440 in _IO_2_1_stdout_ () from /lib/libc.so.6
#8 0x0809f174 in hp_file ()
#9 0x402c2024 in ?? ()
#10 0x00000000 in ?? ()
#11 0x00000001 in ?? ()
#12 0x402c2024 in ?? ()
#13 0x00000002 in ?? ()
#14 0x00000000 in ?? ()
#15 0x0000001c in ?? ()
#16 0x08099314 in Main_CAFs_cc ()
#17 0x01db846e in ?? ()
#18 0x08099334 in Main_CAFs_cc_ccs ()

The crash occurs at fprintCCS+44:
0x08072c93 <fprintCCS+0>: push %esi
0x08072c94 <fprintCCS+1>: push %ebx
0x08072c95 <fprintCCS+2>: sub $0x14,%esp
0x08072c98 <fprintCCS+5>: mov 0x20(%esp),%esi
0x08072c9c <fprintCCS+9>: mov 0x24(%esp),%ebx
0x08072ca0 <fprintCCS+13>: mov %esi,0x4(%esp)
0x08072ca4 <fprintCCS+17>: movl $0x3c,(%esp)
0x08072cab <fprintCCS+24>: call 0x80492c8 <_init+712>
0x08072cb0 <fprintCCS+29>: test %ebx,%ebx
0x08072cb2 <fprintCCS+31>: je 0x8072d0e <fprintCCS+123>
0x08072cb4 <fprintCCS+33>: cmp $0x809d100,%ebx
0x08072cba <fprintCCS+39>: je 0x8072d0e <fprintCCS+123>
0x08072cbc <fprintCCS+41>: mov 0x4(%ebx),%eax
0x08072cbf <fprintCCS+44>: mov 0x4(%eax),%eax

eax is zero.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1282571&group_id=8032


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise