mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 17:55:07 +00:00
Unbreak crashy user process test.
This commit is contained in:
parent
3253a23b91
commit
b40c851fce
1 changed files with 17 additions and 1 deletions
|
@ -30,7 +30,7 @@
|
|||
#define TEST_VFS
|
||||
//#define STRESS_TEST_SPAWNING
|
||||
//#define TEST_ELF_LOADER
|
||||
//#define TEST_CRASHY_USER_PROCESSES
|
||||
#define TEST_CRASHY_USER_PROCESSES
|
||||
|
||||
system_t system;
|
||||
|
||||
|
@ -49,6 +49,22 @@ void banner()
|
|||
kprintf("\n");
|
||||
}
|
||||
|
||||
#ifdef TEST_CRASHY_USER_PROCESSES
|
||||
static void user_main() NORETURN;
|
||||
static void user_main()
|
||||
{
|
||||
DO_SYSCALL_A3(0x3000, 2, 3, 4);
|
||||
// Crash ourselves!
|
||||
char* x = reinterpret_cast<char*>(0xbeefbabe);
|
||||
*x = 1;
|
||||
HANG;
|
||||
for (;;) {
|
||||
// nothing?
|
||||
Userspace::sleep(1 * TICKS_PER_SECOND);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void undertaker_main() NORETURN;
|
||||
static void undertaker_main()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue