Home > Uncategorized > Crashing

Crashing

February 5th, 2009

One of the surprising challenges of shipping software to customers is that you really, really want to know when it crashes.

The problem with crashes, of course, is that they take out the application. In order to test these cases, you get to write a giant source file that is full of creative, suicidal functions:

IMVU_DEFINE_CRASH(ExecuteNullWithNoEsp) {
    __asm {
        xor esp, esp
        jmp esp
    }
}

IMVU_DEFINE_CRASH(ExecuteNullWithStackInHeap) {
    int* p = new int;
    __asm {
        mov esp, p
        xor eax, eax
        jmp eax
    }
}

andy Uncategorized

Comments are closed.