Re: [GHC] #1922: getChar + Ctrl-C on Windows in GHCi breaks

2007-12-07 Thread GHC
#1922: getChar + Ctrl-C on Windows in GHCi breaks
-+--
 Reporter:  guest|  Owner:  igloo  
 Type:  merge| Status:  closed 
 Priority:  normal   |  Milestone:  6.8.3  
Component:  GHCi |Version:  6.8.1  
 Severity:  normal   | Resolution:  fixed  
 Keywords:   | Difficulty:  Unknown
 Testcase:   |   Architecture:  Unknown
   Os:  Windows  |  
-+--
Changes (by igloo):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 Merged

-- 
Ticket URL: 
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] #1922: getChar + Ctrl-C on Windows in GHCi breaks

2007-12-04 Thread GHC
#1922: getChar + Ctrl-C on Windows in GHCi breaks
-+--
 Reporter:  guest|  Owner:  igloo  
 Type:  merge| Status:  new
 Priority:  normal   |  Milestone:  6.8.3  
Component:  GHCi |Version:  6.8.1  
 Severity:  normal   | Resolution: 
 Keywords:   | Difficulty:  Unknown
 Testcase:   |   Architecture:  Unknown
   Os:  Windows  |  
-+--
Changes (by simonmar):

  * owner:  simonmar => igloo
  * type:  bug => merge

Comment:

 Ok, several issues here.

 1) happens because when you hit `^C` in a console, Windows apprently
 causes a blocked `read()` on `stdin` to return 0, which the runtime
 interprets as EOF.  I haven't done anything about this yet, it seems
 fairly harmless.

 2) is the same as (1), just that the real `^C` exception gets delivered
 during the reporting of the EOF.

 3) happens due to a race condition in GHCi, which I've fixed.
 Interestingly, the fix required also fixing #1048 (make `forkIO` inherit
 `block` from the parent).

 4) happens due to another race condition, this time on the console
 handler, which is a global pointer to a `StablePtr`.  Under the right
 (wrong?) conditions, someone could free the `StablePtr` before it was
 dereferenced, leading to a crash.  I've fixed this.

 To merge, in GHC:

 {{{
 Tue Dec  4 03:09:47 PST 2007  Simon Marlow <[EMAIL PROTECTED]>
   * forkIO starts the new thread blocked if the parent is blocked (#1048)

 Tue Dec  4 03:44:44 PST 2007  Simon Marlow <[EMAIL PROTECTED]>
   * fix race conditions in sandboxIO (#1583, #1922, #1946)

 Tue Dec  4 07:39:18 PST 2007  Simon Marlow <[EMAIL PROTECTED]>
   * protect console handler against concurrent access (#1922)
 }}}

 (note the first change needs documenting in the release notes, and I need

 in `libraries/base`:

 {{{
 Tue Dec  4 03:08:17 PST 2007  Simon Marlow <[EMAIL PROTECTED]>
   * protect against concurrent access to the signal handlers (#1922)

 Tue Dec  4 07:39:40 PST 2007  Simon Marlow <[EMAIL PROTECTED]>
   * protect console handler against concurrent access (#1922)
 }}}

 in `libraries/unix`:

 {{{
 Tue Dec  4 03:08:39 PST 2007  Simon Marlow <[EMAIL PROTECTED]>
   * protect against concurrent access to the signal handlers (#1922)
 }}}

-- 
Ticket URL: 
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] #1922: getChar + Ctrl-C on Windows in GHCi breaks

2007-11-26 Thread GHC
#1922: getChar + Ctrl-C on Windows in GHCi breaks
-+--
 Reporter:  guest|  Owner:  simonmar
 Type:  bug  | Status:  new 
 Priority:  normal   |  Milestone:  6.8.3   
Component:  GHCi |Version:  6.8.1   
 Severity:  normal   | Resolution:  
 Keywords:   | Difficulty:  Unknown 
 Testcase:   |   Architecture:  Unknown 
   Os:  Windows  |  
-+--
Changes (by simonmar):

  * owner:  => simonmar
  * difficulty:  => Unknown
  * milestone:  => 6.8.3

Comment:

 I'll look into this one.

-- 
Ticket URL: 
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] #1922: getChar + Ctrl-C on Windows in GHCi breaks

2007-11-23 Thread GHC
#1922: getChar + Ctrl-C on Windows in GHCi breaks
+---
Reporter:  guest|Owner: 
Type:  bug  |   Status:  new
Priority:  normal   |Milestone: 
   Component:  GHCi |  Version:  6.8.1  
Severity:  normal   |   Resolution: 
Keywords:   | Testcase: 
Architecture:  Unknown  |   Os:  Windows
+---
Comment (by guest):

 The behaviour now seems to be flipping between:

 1) *** Exception: : hGetChar: end of file [and prompt]

 2) *** Interrupted [and returns to prompt]

 3) exception :: GhcException [and freezing]

 4) internal error [and crashes]

 -- Neil

-- 
Ticket URL: 
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] #1922: getChar + Ctrl-C on Windows in GHCi breaks

2007-11-23 Thread GHC
#1922: getChar + Ctrl-C on Windows in GHCi breaks
-+--
 Reporter:  guest|  Owner: 
 Type:  bug  | Status:  new
 Priority:  normal   |  Milestone: 
Component:  GHCi |Version:  6.8.1  
 Severity:  normal   |   Keywords: 
 Testcase:   |   Architecture:  Unknown
   Os:  Windows  |  
-+--
 {{{
 C:\Documents and Settings\Admin>ghci
 GHCi, version 6.8.1: http://www.haskell.org/ghc/  :? for help
 Loading package base ... linking ... done.
 Prelude> getChar
 : exception :: GhcException
 }}}

 After getChar, I pressed Ctrl+C, which prints the message about exception.
 After this the program becomes entirely unresponsive to any keys,
 including Ctrl+C.

 I ran into this bug attempting to create a minimal test case for a bug
 where pressing Ctrl+C while at a getChar results in:

 {{{
 *: internal error: stg_ap_pv_ret
 (GHC version 6.8.1 for i386_unknown_mingw32)
 Please report this as a GHC bug:
 http://www.haskell.org/ghc/reportabug
 }}}

 Unfortunately I have no minimal test case for the latter bug, it is
 unreliable to duplicate, and the dependency list is sufficiently massive
 that it takes me a couple of hours to get everything installed and ready.
 They are possibly related.

 WindowsXP, standard Windows shell, GHC 6.8.1.


 -- Neil

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs