Re: [GHC] #1820: Windows segfault-catching only works for the main thread

2010-05-02 Thread GHC
#1820: Windows segfault-catching only works for the main thread
-+--
Reporter:  simonmar  |Owner:
  
Type:  bug   |   Status:  new   
  
Priority:  normal|Milestone:  6.12.3
  
   Component:  Runtime System|  Version:  6.8.1 
  
Keywords:|   Difficulty:  Unknown   
  
  Os:  Windows   | Testcase:  derefnull(ghci), 
divbyzero(ghci)
Architecture:  Unknown/Multiple  |  Failure:  None/Unknown  
  
-+--
Changes (by igloo):

  * owner:  igloo =


Comment:

 This program, with the `seh_excn.*` files in the GHC tree:
 {{{
 #include seh_excn.h

 void g(int *p) {
 printf(1 Points to %d\n, *p);
 printf(2 Not %d\n, 5 / 0);
 printf(3 Points to %d\n, *p);
 }

 void h() {
 printf(1 Points to %d\n, 6);
 printf(2 Not %d\n, 5 / 0);
 printf(3 Points to %d\n, 7);
 }

 void f(int *p) {
 BEGIN_CATCH
 g(p);
 // h();
 END_CATCH
 }

 int main(void) {
 int p;
 p = 28;
 printf(Start\n);
 f(p);
 printf(End\n);
 }
 }}}
 doesn't work properly:
 {{{
 $ ./seh
 Start
 1 Points to 28
 }}}
 (note that we don't get a divide by zero message)
 whereas if you change it to call `h` rather than `g` then it does:
 {{{
 $ ./seh
 Start
 1 Points to 6
 divide by zero
 }}}
 This is a problem because I think we want to do the exception handling in
 `workerStart`, where we need to pass the `task` argument on.

 I've looked at using the simpler-looking `AddVectoredExceptionHandler`
 instead (which would mean we have to drop Win 2k support, I think), but
 I'm getting
 {{{
 C:\cygwin\tmp/ccYnOVfO.o:seh2.c:(.text+0xe3): undefined reference to
 `AddVectoredExceptionHandler'
 C:\cygwin\tmp/ccYnOVfO.o:seh2.c:(.text+0xf6): undefined reference to
 `RemoveVectoredExceptionHandler'
 collect2: ld returned 1 exit status
 }}}

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1820#comment:9
GHC http://www.haskell.org/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] #1820: Windows segfault-catching only works for the main thread

2009-11-21 Thread GHC
#1820: Windows segfault-catching only works for the main thread
---+
  Reporter:  simonmar  |  Owner:  igloo 
  
  Type:  bug   | Status:  new   
  
  Priority:  normal|  Milestone:  6.12 branch   
  
 Component:  Runtime System|Version:  6.8.1 
  
Resolution:|   Keywords:
  
Difficulty:  Unknown   | Os:  Windows   
  
  Testcase:  derefnull(ghci), divbyzero(ghci)  |   Architecture:  
Unknown/Multiple
   Failure:  None/Unknown  |  
---+
Changes (by igloo):

  * failure:  = None/Unknown
  * milestone:  6.12.1 = 6.12 branch

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1820#comment:7
GHC http://www.haskell.org/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] #1820: Windows segfault-catching only works for the main thread

2009-06-24 Thread GHC
#1820: Windows segfault-catching only works for the main thread
-+--
Reporter:  simonmar  |Owner:  igloo  
Type:  bug   |   Status:  new
Priority:  normal|Milestone:  6.12.1 
   Component:  Runtime System|  Version:  6.8.1  
Severity:  normal|   Resolution: 
Keywords:|   Difficulty:  Unknown
Testcase:  derefnull(ghci), divbyzero(ghci)  |   Os:  Windows
Architecture:  Unknown/Multiple  |  
-+--
Comment (by igloo):

 See also the mingw GCC 4.4.0 announcement info on exceptions:
 http://sourceforge.net/project/shownotes.php?release_id=691876

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1820#comment:6
GHC http://www.haskell.org/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] #1820: Windows segfault-catching only works for the main thread

2009-04-11 Thread GHC
#1820: Windows segfault-catching only works for the main thread
-+--
Reporter:  simonmar  |Owner:  igloo  
Type:  bug   |   Status:  new
Priority:  normal|Milestone:  6.12.1 
   Component:  Runtime System|  Version:  6.8.1  
Severity:  normal|   Resolution: 
Keywords:|   Difficulty:  Unknown
Testcase:  derefnull(ghci), divbyzero(ghci)  |   Os:  Windows
Architecture:  Unknown/Multiple  |  
-+--
Changes (by igloo):

  * milestone:  6.10.2 = 6.12.1

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1820#comment:5
GHC http://www.haskell.org/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] #1820: Windows segfault-catching only works for the main thread

2008-10-04 Thread GHC
#1820: Windows segfault-catching only works for the main thread
--+-
 Reporter:  simonmar  |  Owner:  igloo  
 
 Type:  bug   | Status:  new
 
 Priority:  normal|  Milestone:  6.10.2 
 
Component:  Runtime System|Version:  6.8.1  
 
 Severity:  normal| Resolution: 
 
 Keywords:| Difficulty:  Unknown
 
 Testcase:  derefnull(ghci), divbyzero(ghci)  |   Architecture:  
Unknown/Multiple
   Os:  Windows   |  
--+-
Changes (by igloo):

  * milestone:  6.10.1 = 6.10.2

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1820#comment:4
GHC http://www.haskell.org/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] #1820: Windows segfault-catching only works for the main thread

2008-06-20 Thread GHC
#1820: Windows segfault-catching only works for the main thread
--+-
 Reporter:  simonmar  |  Owner:  igloo  
 Type:  bug   | Status:  new
 Priority:  normal|  Milestone:  6.10.1 
Component:  Runtime System|Version:  6.8.1  
 Severity:  normal| Resolution: 
 Keywords:| Difficulty:  Unknown
 Testcase:  derefnull(ghci), divbyzero(ghci)  |   Architecture:  Unknown
   Os:  Windows   |  
--+-
Changes (by igloo):

  * milestone:  6.8.3 = 6.10.1

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1820#comment:2
GHC http://www.haskell.org/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] #1820: Windows segfault-catching only works for the main thread

2007-11-13 Thread GHC
#1820: Windows segfault-catching only works for the main thread
--+-
 Reporter:  simonmar  |  Owner:  igloo  
 Type:  bug   | Status:  new
 Priority:  normal|  Milestone:  6.8.3  
Component:  Runtime System|Version:  6.8.1  
 Severity:  normal| Resolution: 
 Keywords:| Difficulty:  Unknown
 Testcase:  derefnull(ghci), divbyzero(ghci)  |   Architecture:  Unknown
   Os:  Windows   |  
--+-
Changes (by igloo):

  * owner:  = igloo
  * milestone:  6.8 branch = 6.8.3

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1820#comment:1
GHC http://www.haskell.org/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] #1820: Windows segfault-catching only works for the main thread

2007-11-01 Thread GHC
#1820: Windows segfault-catching only works for the main thread
---+
Reporter:  simonmar|   Owner:  
Type:  bug |  Status:  new 
Priority:  normal  |   Milestone:  6.8 branch  
   Component:  Runtime System  | Version:  6.8.1   
Severity:  normal  |Keywords:  
  Difficulty:  Unknown |Testcase:  derefnull(ghci), divbyzero(ghci)
Architecture:  Unknown |  Os:  Windows 
---+
 On Windows, the RTS tries to catch segmentation faults and divide-by-zero
 exceptions using structured exception handling in `rts/Main.c`.
 Unfortunately this only works for the main thread, so if the exception
 occurs in another thread it won't be caught.  GHCi runs all its
 computations in a separate thread, hence `derefnull(ghci)` and
 `divbyzero(ghci)` are failing.

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