mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-26 01:00:45 +01:00
clone2 stack pointer passed in points to the highest address for the stack. clone3 switches this around and gives us a base pointer and a size. glibc started using clone3 for its thread cloning which finally caught this bug. Necessary to run any application under the Ubuntu 22.04 rootfs since that uses a new enough glibc to encounter this.
21 lines
729 B
C++
21 lines
729 B
C++
/*
|
|
$info$
|
|
tags: LinuxSyscalls|syscalls-shared
|
|
$end_info$
|
|
*/
|
|
|
|
#pragma once
|
|
#include <stdint.h>
|
|
#include <sys/types.h>
|
|
|
|
namespace FEXCore::Core {
|
|
struct InternalThreadState;
|
|
struct CPUState;
|
|
}
|
|
|
|
namespace FEX::HLE {
|
|
FEXCore::Core::InternalThreadState *CreateNewThread(FEXCore::Context::Context *CTX, FEXCore::Core::CpuStateFrame *Frame, FEX::HLE::clone3_args *args);
|
|
uint64_t HandleNewClone(FEXCore::Core::InternalThreadState *Thread, FEXCore::Context::Context *CTX, FEXCore::Core::CpuStateFrame *Frame, FEX::HLE::kernel_clone3_args *GuestArgs);
|
|
uint64_t ForkGuest(FEXCore::Core::InternalThreadState *Thread, FEXCore::Core::CpuStateFrame *Frame, uint32_t flags, void *stack, pid_t *parent_tid, pid_t *child_tid, void *tls);
|
|
}
|