libssp: Change __stack_chk_guard to uintptr_t.
Modifies libssp to declare __stack_chk_guard as uintptr_t to match its internal declaration in GCC.
This commit modifies the libssp (stack smashing protection) library to declare __stack_chk_guard as uintptr_t, matching its internal declaration within the GCC compiler. This change ensures consistency between the internal and external definitions of the stack protection guard, preventing potential issues when assigning integer values to it. The original declaration in GCC was made in commit c05b5e5d8cb660ed43159d66fd669c20746d6bea.
In Details
The stack smashing protector uses __stack_chk_guard, and this patch syncs the type of that global symbol between the compiler-rt side in libssp and the compiler-internal definition. This resolves PR c/121911.
For Context
Stack smashing protection (SSP) is a security mechanism that helps prevent buffer overflow attacks from corrupting the stack. The __stack_chk_guard variable is a randomly generated value placed on the stack before a function is called and checked after the function returns. If the value has changed, it indicates a potential buffer overflow. This commit ensures that the type of __stack_chk_guard is consistent between the compiler and the SSP library, preventing potential type mismatch issues.