[libc-commits] [libc] [libc] fortify jmp buffer for x86-64 (PR #112769)

via libc-commits libc-commits at lists.llvm.org
Mon Nov 18 14:47:11 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 4048c64306e23b622443bbe7293057a9b07a13bb b28493046e0ba9e6b93ee6ce6c79673b2ec52ea4 --extensions cpp,h -- libc/src/setjmp/checksum.h libc/src/setjmp/i386/longjmp.cpp libc/src/setjmp/i386/setjmp.cpp libc/src/setjmp/linux/checksum.cpp libc/src/setjmp/x86_64/longjmp_fortified.cpp libc/src/setjmp/x86_64/setjmp_fortified.cpp libc/include/llvm-libc-types/jmp_buf.h libc/src/setjmp/x86_64/longjmp.cpp libc/src/setjmp/x86_64/setjmp.cpp libc/startup/linux/do_start.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/src/setjmp/i386/longjmp.cpp b/libc/src/setjmp/i386/longjmp.cpp
index 6b874b2493..fc60f3a867 100644
--- a/libc/src/setjmp/i386/longjmp.cpp
+++ b/libc/src/setjmp/i386/longjmp.cpp
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/setjmp/longjmp.h"
 #include "include/llvm-libc-macros/offsetof-macro.h"
 #include "src/__support/common.h"
 #include "src/__support/macros/config.h"
-#include "src/setjmp/longjmp.h"
 
 #if !defined(LIBC_TARGET_ARCH_IS_X86_32)
 #error "Invalid file include"
diff --git a/libc/src/setjmp/x86_64/longjmp.cpp b/libc/src/setjmp/x86_64/longjmp.cpp
index b240e5359b..f30c752d2e 100644
--- a/libc/src/setjmp/x86_64/longjmp.cpp
+++ b/libc/src/setjmp/x86_64/longjmp.cpp
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "src/setjmp/longjmp.h"
 #include "include/llvm-libc-macros/offsetof-macro.h"
 #include "src/__support/common.h"
 #include "src/__support/macros/config.h"
-#include "src/setjmp/longjmp.h"
 
 #if !defined(LIBC_TARGET_ARCH_IS_X86_64) || LIBC_COPT_SETJMP_FORTIFICATION
 #error "Invalid file include"

``````````

</details>


https://github.com/llvm/llvm-project/pull/112769


More information about the libc-commits mailing list