UserspaceEmulator: Default-initialize the siginfo struct used in waitid
Otherwise it'll have some random value from the stack, and the kernel will not bother setting it to zero. Also add a debug print and tweak the FIXME message.
This commit is contained in:
parent
c4cf4ef111
commit
cbd62c472e
Notes:
sideshowbarker
2024-07-18 20:55:49 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/cbd62c472e8 Pull-request: https://github.com/SerenityOS/serenity/pull/6021
1 changed files with 3 additions and 2 deletions
|
@ -1358,7 +1358,7 @@ int Emulator::virt$waitid(FlatPtr params_addr)
|
|||
mmu().copy_from_vm(¶ms, params_addr, sizeof(params));
|
||||
|
||||
Syscall::SC_waitid_params host_params = params;
|
||||
siginfo info;
|
||||
siginfo info {};
|
||||
host_params.infop = &info;
|
||||
|
||||
int rc = syscall(SC_waitid, &host_params);
|
||||
|
@ -1366,7 +1366,8 @@ int Emulator::virt$waitid(FlatPtr params_addr)
|
|||
return rc;
|
||||
|
||||
if (info.si_addr) {
|
||||
// FIXME: Translate this somehow.
|
||||
// FIXME: Translate this somehow once we actually start setting it in the kernel.
|
||||
dbgln("si_addr is set to {:p}, I did not expect this!", info.si_addr);
|
||||
TODO();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue