Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc] restored original no_stack_protector syntax #94005

Merged
merged 1 commit into from
May 31, 2024

Conversation

RoseZhang03
Copy link
Contributor

forward fix for #93620

-GCC doesn't recognize [[clang:: ']] prefix, so restored the original
attribute syntax

forward fix for llvm#93620

-GCC doesn't recognize [[clang:: ']] prefix, so restored the original
__attribute__ syntax
@llvmbot llvmbot added the libc label May 31, 2024
@llvmbot
Copy link

llvmbot commented May 31, 2024

@llvm/pr-subscribers-libc

Author: None (RoseZhang03)

Changes

forward fix for #93620

-GCC doesn't recognize [[clang:: ']] prefix, so restored the original
attribute syntax


Full diff: https://github.com/llvm/llvm-project/pull/94005.diff

1 Files Affected:

  • (modified) libc/src/__support/OSUtil/linux/exit.cpp (+2-2)
diff --git a/libc/src/__support/OSUtil/linux/exit.cpp b/libc/src/__support/OSUtil/linux/exit.cpp
index ee904155c537d..4a1d56a172a1a 100644
--- a/libc/src/__support/OSUtil/linux/exit.cpp
+++ b/libc/src/__support/OSUtil/linux/exit.cpp
@@ -15,9 +15,9 @@ namespace LIBC_NAMESPACE::internal {
 // mark as no_stack_protector for x86 since TLS can be torn down before calling
 // exit so that the stack protector canary cannot be loaded.
 #ifdef LIBC_TARGET_ARCH_IS_X86
-[[clang::no_stack_protector]]
+__attribute__((no_stack_protector))
 #endif
-[[noreturn]] void
+__attribute__((noreturn)) void
 exit(int status) {
   for (;;) {
     LIBC_NAMESPACE::syscall_impl<long>(SYS_exit_group, status);

@michaelrj-google michaelrj-google merged commit 435e5c1 into llvm:main May 31, 2024
6 of 7 checks passed
@RoseZhang03 RoseZhang03 deleted the rosezhang3 branch June 5, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants