Is there some test app that reliable crashes?

Dan Kegel dank at kegel.com
Tue Feb 25 15:45:30 CST 2003


Gerhard W. Gruber wrote:
> I need some app that will produce a crash in order to test winedbg and get
> used to it. Does anybody have such an application or can tell me a quick way
> how to create one? 

As a naive usr, I would think each of the lines
in main of the following should do it:

#include <stdio.h>
#include <assert.h>
#include <signal.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
         int *p = 0; *p = 7;
	abort();
         raise(SIGILL);
         assert(0);
}

but in practice, only the bad pointer access does.  For some reason,
raise(), assert(0), and abort() fail to trigger the debugger.

You can compile this easily with mingw or msvc running under wine.
(I did it with msvc.)
- Dan

-- 
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045




More information about the wine-devel mailing list