相关疑难解决方法(0)

如何在没有获得WER对话框的情况下在Windows-7上崩溃进程?

是否可以在Windows-7上崩溃常规用户模式进程而无需获取Windows错误报告(WER)对话框?(当WER正常启用且未应用特定标志时.)

注意:我对禁用WER 感兴趣,我对WER未启动的崩溃场景感兴趣,尽管它应该和Windows"默默地"终止应用程序.

在Windows XP上,编写一个C或C++应用程序(在用户模式下)是非常简单的,它会以这样的方式混淆自己的地址空间,当最终引发访问冲突(或其他未处理的Win32异常)时,Windows XP将会只是默默地终止进程而不通知用户:

...
void stackbreaker() {
    printf("%s\n", __FUNCTION__);
    // global/static buffer
    static char buf[128] = "In a hole in the ground there lived a hobbit. And it burrowed through your stack. It even built a round door into you function.";
    // Get address on the stack
    char local;
    char* stack = &local;
    // nuke the stack:
    memcpy(stack - 64, buf, sizeof(buf));
    // Kaboom. No user defined unhandled exception filter will …
Run Code Online (Sandbox Code Playgroud)

winapi unhandled-exception visual-c++ windows-7 windows-error-reporting

9
推荐指数
1
解决办法
2023
查看次数