You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "leaf-potato (via GitHub)" <gi...@apache.org> on 2023/07/23 14:53:33 UTC

[PR] Fix unit test running error under arch64 (brpc)

leaf-potato opened a new pull request, #2324:
URL: https://github.com/apache/brpc/pull/2324

   ### What problem does this PR solve?
   
   Issue Number: https://github.com/apache/brpc/issues/2318
   
   Problem Summary: 在arch64下使用gcc编译,运行单测会报错。
   
   ### What is changed and the side effects?
   
   Changed: 在arch64 + gcc的环境中禁止thread_local访问优化。
   
   Side effects:
   - Performance effects(性能影响):
   
   - Breaking backward compatibility(向后兼容性):  是
   
   ---
   ### Check List:
   - Please make sure your changes are compilable(请确保你的更改可以通过编译).
   - When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
   - Please follow [Contributor Covenant Code of Conduct](../../master/CODE_OF_CONDUCT.md).(请遵循贡献者准则).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [PR] Fix unit test running error under arch64 (brpc)

Posted by "Huixxi (via GitHub)" <gi...@apache.org>.
Huixxi merged PR #2324:
URL: https://github.com/apache/brpc/pull/2324


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [PR] Fix unit test running error under arch64 (brpc)

Posted by "Huixxi (via GitHub)" <gi...@apache.org>.
Huixxi commented on code in PR #2324:
URL: https://github.com/apache/brpc/pull/2324#discussion_r1273042189


##########
src/butil/thread_local.h:
##########
@@ -46,10 +46,10 @@
     var_name = v;                                                              \
   }
 
-#if defined(__clang__)
-// Clang compiler is incorrectly caching the address of thread_local variables
-// across a suspend-point. The following macros used to disable the volatile
-// thread local access optimization.
+#if (defined (__aarch64__) && defined (__GNUC__)) || defined(__clang__)
+// GNU compiler under aarch and Clang compiler is incorrectly caching the 

Review Comment:
   注释可能需要改成GNU compiler under aarch and clang  is ....



##########
src/butil/thread_local.h:
##########
@@ -46,10 +46,10 @@
     var_name = v;                                                              \
   }
 
-#if defined(__clang__)
-// Clang compiler is incorrectly caching the address of thread_local variables
-// across a suspend-point. The following macros used to disable the volatile
-// thread local access optimization.
+#if (defined (__aarch64__) && defined (__GNUC__)) || defined(__clang__)
+// GNU compiler under aarch and Clang compiler is incorrectly caching the 

Review Comment:
   注释可能需要改成GNU compiler under aarch and clang  is ....



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [PR] Fix unit test running error under arch64 (brpc)

Posted by "Huixxi (via GitHub)" <gi...@apache.org>.
Huixxi commented on code in PR #2324:
URL: https://github.com/apache/brpc/pull/2324#discussion_r1273042189


##########
src/butil/thread_local.h:
##########
@@ -46,10 +46,10 @@
     var_name = v;                                                              \
   }
 
-#if defined(__clang__)
-// Clang compiler is incorrectly caching the address of thread_local variables
-// across a suspend-point. The following macros used to disable the volatile
-// thread local access optimization.
+#if (defined (__aarch64__) && defined (__GNUC__)) || defined(__clang__)
+// GNU compiler under aarch and Clang compiler is incorrectly caching the 

Review Comment:
   注释可能需要改成GNU compiler under aarch and clang  is ....



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org