mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[Kernel] Changed uninitialized stack value
This commit is contained in:
parent
edba7f3693
commit
a6d2ed0e94
|
|
@ -268,8 +268,8 @@ bool XThread::AllocateStack(uint32_t size) {
|
||||||
stack_limit_ = address + (padding / 2);
|
stack_limit_ = address + (padding / 2);
|
||||||
stack_base_ = stack_limit_ + size;
|
stack_base_ = stack_limit_ + size;
|
||||||
|
|
||||||
// Initialize the stack with junk
|
// Initialize the stack with junk. 0x42 because you know
|
||||||
memory()->Fill(stack_alloc_base_, actual_size, 0xBE);
|
memory()->Fill(stack_alloc_base_, actual_size, 0x42);
|
||||||
|
|
||||||
// Setup the guard pages
|
// Setup the guard pages
|
||||||
heap->Protect(stack_alloc_base_, padding / 2, kMemoryProtectNoAccess);
|
heap->Protect(stack_alloc_base_, padding / 2, kMemoryProtectNoAccess);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue