1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 14:55:08 +00:00

LibC: Use 64-bit stack smash value for 64-bit mode

Otherwise it'll use the first 32 bits that happen to come after,
leading to very weird bugs. Fixes #8601
This commit is contained in:
Peter Bindels 2021-07-16 23:30:01 +02:00 committed by Gunnar Beutner
parent 205c8a12ed
commit a5a62f99c5
3 changed files with 7 additions and 7 deletions

View file

@ -64,8 +64,8 @@ extern ctor_func_t end_heap_ctors;
extern ctor_func_t start_ctors;
extern ctor_func_t end_ctors;
extern u32 __stack_chk_guard;
u32 __stack_chk_guard;
extern size_t __stack_chk_guard;
size_t __stack_chk_guard;
extern "C" u8* start_of_safemem_text;
extern "C" u8* end_of_safemem_text;
@ -147,7 +147,7 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init()
// Initialize TimeManagement before using randomness!
TimeManagement::initialize(0);
__stack_chk_guard = get_fast_random<u32>();
__stack_chk_guard = get_fast_random<size_t>();
ProcFSComponentRegistry::initialize();
Thread::initialize();