Re: Access Vialotation

2009-03-03 Thread Qian Xu
BCS wrote: Hello downs, BCS: you can have a posix signal handler throw an exception (I have done it and had it work) but I have no idea if it is supported. In my experience, that works exactly once. That would match with what I needed: poor man's stack tracing int EveryFunction() { scop

Re: Access Vialotation

2009-02-28 Thread BCS
Hello downs, BCS: you can have a posix signal handler throw an exception (I have done it and had it work) but I have no idea if it is supported. In my experience, that works exactly once. That would match with what I needed: poor man's stack tracing int EveryFunction() { scope(failure) w

Re: Access Vialotation

2009-02-28 Thread Christopher Wright
downs wrote: BCS wrote: Reply to Jarrett, On Fri, Feb 27, 2009 at 9:01 AM, Qian Xu wrote: Hi All, Is there any way to keep program alive, when an AV takes place? It's possible on Windows in D, but that's because Windows reports segfaults with the same mechanism that D uses for exceptions

Re: Access Vialotation

2009-02-28 Thread downs
BCS wrote: > Reply to Jarrett, > >> On Fri, Feb 27, 2009 at 9:01 AM, Qian Xu >> wrote: >> >>> Hi All, >>> >>> Is there any way to keep program alive, when an AV takes place? >>> >> It's possible on Windows in D, but that's because Windows reports >> segfaults with the same mechanism that D uses f

Re: Access Vialotation

2009-02-27 Thread Jarrett Billingsley
On Fri, Feb 27, 2009 at 2:31 PM, BCS wrote: > > you can have a posix signal handler throw an exception (I have done it and > had it work) but I have no idea if it is supported. > Yeah, that seems dubious to me. I don't know what kinds of guarantees, if any, the signal handler has as to what thre

Re: Access Vialotation

2009-02-27 Thread BCS
Reply to Jarrett, On Fri, Feb 27, 2009 at 9:01 AM, Qian Xu wrote: Hi All, Is there any way to keep program alive, when an AV takes place? It's possible on Windows in D, but that's because Windows reports segfaults with the same mechanism that D uses for exceptions. Since Linux (and many o

Re: Access Vialotation

2009-02-27 Thread Jarrett Billingsley
On Fri, Feb 27, 2009 at 9:01 AM, Qian Xu wrote: > Hi All, > > Is there any way to keep program alive, when an AV takes place? > > -- demo --- > module NullPointerExceptionTest; > > class Foo { >  void bar() {} > } > > void main() { >  Foo foo; // foo is still NULL >  tr

Re: Access Vialotation

2009-02-27 Thread Qian Xu
UPDATE: I am using gdc compiler in Linux

Access Vialotation

2009-02-27 Thread Qian Xu
Hi All, Is there any way to keep program alive, when an AV takes place? -- demo --- module NullPointerExceptionTest; class Foo { void bar() {} } void main() { Foo foo; // foo is still NULL try { foo.bar(); // A NullPointerException will be thrown } catc