mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +00:00
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
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));
|
mmu().copy_from_vm(¶ms, params_addr, sizeof(params));
|
||||||
|
|
||||||
Syscall::SC_waitid_params host_params = params;
|
Syscall::SC_waitid_params host_params = params;
|
||||||
siginfo info;
|
siginfo info {};
|
||||||
host_params.infop = &info;
|
host_params.infop = &info;
|
||||||
|
|
||||||
int rc = syscall(SC_waitid, &host_params);
|
int rc = syscall(SC_waitid, &host_params);
|
||||||
|
@ -1366,7 +1366,8 @@ int Emulator::virt$waitid(FlatPtr params_addr)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
if (info.si_addr) {
|
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();
|
TODO();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue