This is an automated email from the ASF dual-hosted git repository.
chenBright pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git
The following commit(s) were added to refs/heads/master by this push:
new 12a76ade fix(bthread/context): Add .previous after GNU-stack note
(#3266)
12a76ade is described below
commit 12a76adecbeecd0ea50ec626e7db03a3960c2122
Author: Youmu <[email protected]>
AuthorDate: Mon Apr 20 23:15:49 2026 +0800
fix(bthread/context): Add .previous after GNU-stack note (#3266)
Add missing .previous directive after each .note.GNU-stack section in ARM
inline
assembly blocks. This ensures proper section switching and prevents
potential
assembler errors when building with asan.
See #1186
---
src/bthread/context.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/bthread/context.cpp b/src/bthread/context.cpp
index b7be731e..7f913adf 100644
--- a/src/bthread/context.cpp
+++ b/src/bthread/context.cpp
@@ -576,6 +576,7 @@ __asm (
".size bthread_jump_fcontext,.-bthread_jump_fcontext\n"
"@ Mark that we don't need executable stack.\n"
".section .note.GNU-stack,\"\",%progbits\n"
+".previous\n"
);
#endif
@@ -607,6 +608,7 @@ __asm (
".size bthread_make_fcontext,.-bthread_make_fcontext\n"
"@ Mark that we don't need executable stack.\n"
".section .note.GNU-stack,\"\",%progbits\n"
+".previous\n"
);
#endif
@@ -678,6 +680,7 @@ __asm (
".size bthread_jump_fcontext,.-bthread_jump_fcontext\n"
"# Mark that we don't need executable stack.\n"
".section .note.GNU-stack,\"\",%progbits\n"
+".previous\n"
);
#endif
@@ -710,6 +713,7 @@ __asm (
".size bthread_make_fcontext,.-bthread_make_fcontext\n"
"# Mark that we don't need executable stack.\n"
".section .note.GNU-stack,\"\",%progbits\n"
+".previous\n"
);
#endif
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]