diff options
| author | Gergő Móricz <mo.geryy@gmail.com> | 2021-10-17 21:19:52 +0200 |
|---|---|---|
| committer | Gergő Móricz <mo.geryy@gmail.com> | 2021-10-17 21:19:52 +0200 |
| commit | e1a2230e9ca654cdd2b4230060a304d792843914 (patch) | |
| tree | a2ae3df6866b43bd75d4ce706caa2fe04c130d6a /src/wrapped/generated/wrapper.c | |
| parent | 82bd4431e6f0a43c28bf4d28d49eeee8b52df8c3 (diff) | |
| download | box64-e1a2230e9ca654cdd2b4230060a304d792843914.tar.gz box64-e1a2230e9ca654cdd2b4230060a304d792843914.zip | |
Add alignment wrapper to pthread_getattr_np.
This fixes stack corruption when using pthread_getattr_np on hirsute (Ubuntu 21.04) and libc >=2.33 This should also fix #130.
Diffstat (limited to 'src/wrapped/generated/wrapper.c')
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index ad0b9857..e560a8d6 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -1909,6 +1909,7 @@ typedef int64_t (*iFipiip_t)(int64_t, void*, int64_t, int64_t, void*); #endif #if !defined(NOALIGN) +typedef int64_t (*iFELp_t)(x64emu_t*, uintptr_t, void*); typedef int64_t (*iFEppu_t)(x64emu_t*, void*, void*, uint64_t); typedef int64_t (*iFEiiip_t)(x64emu_t*, int64_t, int64_t, int64_t, void*); typedef int64_t (*iFEipii_t)(x64emu_t*, int64_t, void*, int64_t, int64_t); @@ -3792,6 +3793,7 @@ void iFipiip(x64emu_t *emu, uintptr_t fcn) { iFipiip_t fn = (iFipiip_t)fcn; R_RA #endif #if !defined(NOALIGN) +void iFELp(x64emu_t *emu, uintptr_t fcn) { iFELp_t fn = (iFELp_t)fcn; R_RAX=(int64_t)fn(emu, (uintptr_t)R_RDI, (void*)R_RSI); } void iFEppu(x64emu_t *emu, uintptr_t fcn) { iFEppu_t fn = (iFEppu_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (uint64_t)R_RDX); } void iFEiiip(x64emu_t *emu, uintptr_t fcn) { iFEiiip_t fn = (iFEiiip_t)fcn; R_RAX=(int64_t)fn(emu, (int64_t)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX); } void iFEipii(x64emu_t *emu, uintptr_t fcn) { iFEipii_t fn = (iFEipii_t)fcn; R_RAX=(int64_t)fn(emu, (int64_t)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX); } |