mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-31 14:35:19 +00:00
clang, don't optimize me 🚨
avoid ClearStack function being optimized in release builds
This commit is contained in:
parent
3f9f7adae4
commit
108f96096b
@ -44,9 +44,9 @@ Tcb* GetTcbBase();
|
|||||||
void EnsureThreadInitialized();
|
void EnsureThreadInitialized();
|
||||||
|
|
||||||
template <size_t size>
|
template <size_t size>
|
||||||
void ClearStack() {
|
__attribute__((optnone)) void ClearStack() {
|
||||||
void* buf = alloca(size);
|
volatile void* buf = alloca(size);
|
||||||
memset(buf, 0, size);
|
memset(const_cast<void*>(buf), 0, size);
|
||||||
buf = nullptr;
|
buf = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user