Skip to content

Commit

Permalink
[libc] restored original no_stack_protector syntax (llvm#94005)
Browse files Browse the repository at this point in the history
forward fix for llvm#93620

-GCC doesn't recognize [[clang:: ']] prefix, so restored the original
__attribute__ syntax
  • Loading branch information
RoseZhang03 authored May 31, 2024
1 parent e79c080 commit 435e5c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libc/src/__support/OSUtil/linux/exit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 435e5c1

Please sign in to comment.