Undefined Behaviour when creating new processes
Posted: Mon Sep 03, 2018 2:47 am
Hello,
I am currently in the stage of an OS where a shell is being run, but when spawning new processes via syscalls undefined behaviour happens. When spawning a process loaded from the initrd it tries to access the addresses 0xFFFFFFFF and 0x83042000 and it also interrupted interrupt vector 255 but i have not set that vector. after mapping the previously named addresses to 0x0 it ran, but when i try to run it a second time qemu aborts and bochs has a 3rd exception with no resolution. After trying a lot of different things I cannot figure out why this behaviour happens, so I hope someone is able to help me resolve this.
Source: https://github.com/thomtl/Project-Rhino
The code that spawns the process is in src/kernel/user/init.c void create_process(char* prg) at line 71 the two address workaround lines can be seen at line 84 and 85.
The shell is located at utils/TSH and the process that is being spawned is at utils/UserTest
Documentation for syscalls is at doc/syscalls.txt
To build it Make assumes yasm and i686-elf-gcc are in your PATH and you need to go to utils/TSH and make that then go to utils/UserTest and make that and then you can go back to the root and make that
I'm sorry that I am not able to supply more information about the problem and that my English is not that good.
-thomtl
I am currently in the stage of an OS where a shell is being run, but when spawning new processes via syscalls undefined behaviour happens. When spawning a process loaded from the initrd it tries to access the addresses 0xFFFFFFFF and 0x83042000 and it also interrupted interrupt vector 255 but i have not set that vector. after mapping the previously named addresses to 0x0 it ran, but when i try to run it a second time qemu aborts and bochs has a 3rd exception with no resolution. After trying a lot of different things I cannot figure out why this behaviour happens, so I hope someone is able to help me resolve this.
Source: https://github.com/thomtl/Project-Rhino
The code that spawns the process is in src/kernel/user/init.c void create_process(char* prg) at line 71 the two address workaround lines can be seen at line 84 and 85.
The shell is located at utils/TSH and the process that is being spawned is at utils/UserTest
Documentation for syscalls is at doc/syscalls.txt
To build it Make assumes yasm and i686-elf-gcc are in your PATH and you need to go to utils/TSH and make that then go to utils/UserTest and make that and then you can go back to the root and make that
I'm sorry that I am not able to supply more information about the problem and that my English is not that good.
-thomtl