[libc-commits] [libc] [libc] add __stack_chk_guard to generic (PR #121121)
Tristan Ross via libc-commits
libc-commits at lists.llvm.org
Mon Dec 30 23:01:03 PST 2024
https://github.com/RossComputerGuy updated https://github.com/llvm/llvm-project/pull/121121
>From 6ae99735e174b296f4a6885e821ab768dab0a988 Mon Sep 17 00:00:00 2001
From: Tristan Ross <tristan.ross at midstall.com>
Date: Wed, 25 Dec 2024 18:02:38 -0800
Subject: [PATCH] [libc] add __stack_chk_guard to generic
---
libc/src/compiler/generic/__stack_chk_fail.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libc/src/compiler/generic/__stack_chk_fail.cpp b/libc/src/compiler/generic/__stack_chk_fail.cpp
index c76ec1407ad356..cfc8ea8fbdce01 100644
--- a/libc/src/compiler/generic/__stack_chk_fail.cpp
+++ b/libc/src/compiler/generic/__stack_chk_fail.cpp
@@ -12,6 +12,8 @@
extern "C" {
+uintptr_t __stack_chk_guard = 0xa9fff01234;
+
void __stack_chk_fail(void) {
LIBC_NAMESPACE::write_to_stderr("stack smashing detected\n");
LIBC_NAMESPACE::abort();
More information about the libc-commits
mailing list