Search:

Type: Posts; User: Bontrey

Search: Search took 0.00 seconds.

  1. Replies
    7
    Views
    2,085

    It's a purely academic question. The arguments to...

    It's a purely academic question. The arguments to swap are fixed. A hint that I received is that proc should do something to the stack. The crash has to happen on deferencing temp, not the arguments...
  2. Replies
    7
    Views
    2,085

    No no no, I'm asking about how to write a...

    No no no, I'm asking about how to write a procedure 'proc', that when run in the 2nd segment of code, guarantees the deference in swap to crash.

    Can't modify swap itself.
  3. Replies
    7
    Views
    2,085

    deferencing uninitialized pointer

    void swap (int *x, int *y) {
    int *temp;
    *temp = *x;
    *x = *y;
    *y = *temp;
    }

    This code, as you know, has a good chance of crashing depending on where the temp pointer points to....
Results 1 to 3 of 3