wake-0 / fhvOS

This repository contains an os for the arm cortex a8 in combination with beaglebone.
GNU General Public License v2.0
7 stars 1 forks source link

[MMU] NPE should force kill process #71

Closed trylimits closed 9 years ago

trylimits commented 9 years ago

A process which accesses a NP should be forced killed in the dabt handler.

ghost commented 9 years ago

what exactly do you mean by "accesses a NP"?

trylimits commented 9 years ago

NP = null pointer :)

I already fixed the issue in the above commit.

Test case was as follows:

void nullPointerProcess(int argc, char** argv)
{
    printf("I am accessing a null pointer now \n");

    int* nullPointer = 0;

    printf("Printing the nullpointer: %i\n", *nullPointer);
}

I started this process using the ProcessManager. Debug output was:

[...]
[DEBUG @ 60] dabt interrupt from pid=2, with fault state=5
I am accessing a null pointer now
[ERROR @ 60] NPE from process 2
[DEBUG @ 60] Scheduler is killing process with pid=2
[...]