mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-24 15:50:29 +01:00
fs.mitm/loader: Fix crashes when launching too many processes.
This commit is contained in:
parent
cf510ad9bf
commit
ce1a6a68bf
@ -522,6 +522,10 @@ void package2_patch_kernel(void *_kernel, size_t size, bool is_sd_kernel) {
|
||||
fatal_error("kernel_patcher: unable to identify kernel!\n");
|
||||
}
|
||||
|
||||
if (kernel_info == NULL && is_sd_kernel) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Apply hooks. */
|
||||
uint8_t *kernel = (uint8_t *)_kernel;
|
||||
size_t free_space_offset = kernel_info->free_code_space_offset;
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 3e873180905d411472722783162e6e4ee8158cfb
|
||||
Subproject commit bcd80ab445258c20d968aad1c083fd8cb0937bee
|
@ -30,6 +30,11 @@ Result ProcessManagerService::CreateProcess(Out<MovedHandle> proc_h, u64 index,
|
||||
|
||||
fprintf(stderr, "CreateProcess(%016lx, %08x, %08x);\n", index, flags, reslimit_h.handle);
|
||||
|
||||
ON_SCOPE_EXIT {
|
||||
/* Loader doesn't persist the copied resource limit handle. */
|
||||
svcCloseHandle(reslimit_h.handle);
|
||||
};
|
||||
|
||||
rc = Registration::GetRegisteredTidSid(index, &tid_sid);
|
||||
if (R_FAILED(rc)) {
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user