MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c File Reference


Functions

VOID __stack_chk_fail (VOID)

Variables

VOID * __stack_chk_guard = (VOID*)0x0AFF
 "canary" value that is inserted by the compiler into the stack frame.

Detailed Description

Base Stack Check library for GCC/clang.

Use -fstack-protector-all compiler flag to make the compiler insert the __stack_chk_guard "canary" value into the stack and check the value prior to exiting the function. If the "canary" is overwritten __stack_chk_fail() is called. This is GCC specific code.

Copyright (c) 2012, Apple Inc. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.


Function Documentation

VOID __stack_chk_fail ( VOID   ) 

Error path for compiler generated stack "canary" value check code. If the stack canary has been overwritten this function gets called on exit of the function.

References __builtin_return_address(), CpuBreakpoint(), CpuDeadLoop(), DEBUG, DEBUG_ERROR, DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED, DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED, and PcdGet8.


Variable Documentation

VOID* __stack_chk_guard = (VOID*)0x0AFF

"canary" value that is inserted by the compiler into the stack frame.


Generated on Thu Sep 24 23:14:24 2015 for MdePkg[ALL] by  doxygen 1.5.7.1