diff options
author | Jake Garver <jake@nvidia.com> | 2023-10-05 09:18:31 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-12-06 17:10:45 +0000 |
commit | b59ab98049f20f826ff5302a498a435cbb3b3753 (patch) | |
tree | fdd8922526068e87d3d7da7cef7c6464b26fea38 /MdePkg/Library | |
parent | 7e18c9a788e543ab71cdc0485989cf5d00cdccc2 (diff) | |
download | edk2-b59ab98049f20f826ff5302a498a435cbb3b3753.tar.gz edk2-b59ab98049f20f826ff5302a498a435cbb3b3753.tar.bz2 edk2-b59ab98049f20f826ff5302a498a435cbb3b3753.zip |
BaseStackCheckLib: Fix STACK FAULT message
__builtin_return_address returns a pointer, not a string. Fix
the STACK FAULT message in BaseStackCheckLib appropriately.
Signed-off-by: Jake Garver <jake@nvidia.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'MdePkg/Library')
-rw-r--r-- | MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c index 0d2918668e..ea168841b6 100644 --- a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c @@ -6,6 +6,7 @@ to exiting the function. If the "canary" is overwritten __stack_chk_fail()
is called. This is GCC specific code.
+ Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Copyright (c) 2012, Apple Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -34,7 +35,7 @@ __stack_chk_fail ( {
UINT8 DebugPropertyMask;
- DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow in function %a.\n", __builtin_return_address (0)));
+ DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow at 0x%p.\n", RETURN_ADDRESS (0)));
//
// Generate a Breakpoint, DeadLoop, or NOP based on PCD settings even if
|