You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "jiangdongzi (via GitHub)" <gi...@apache.org> on 2023/04/13 07:15:32 UTC

[I] 这段代码有问题吗 (brpc)

jiangdongzi opened a new issue, #2208:
URL: https://github.com/apache/brpc/issues/2208

   ![image](https://user-images.githubusercontent.com/17529657/231682306-4cba9530-6f69-407c-813b-2638da3989b4.png)
   切换到一个新bthread的时候,  `saved_errno` 和 `saved_unique_user_ptr` 不是毫无意义的值么?  第一次运行时在下面重新赋值了毫无意义的值? 


-- 
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.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: [I] 这段代码有问题吗 (brpc)

Posted by "jiangdongzi (via GitHub)" <gi...@apache.org>.
jiangdongzi closed issue #2208: 这段代码有问题吗
URL: https://github.com/apache/brpc/issues/2208


-- 
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: [I] 这段代码有问题吗 (brpc)

Posted by "jiangdongzi (via GitHub)" <gi...@apache.org>.
jiangdongzi commented on issue #2208:
URL: https://github.com/apache/brpc/issues/2208#issuecomment-1506662433

   > `jump_stack` 会切换到其他 bthread 执行任务,上下文切换了,当执行到下面的逻辑,`saved_errno` 和 `saved_unique_user_ptr`已经发生了更改,需要重新赋值。
   
   我知道需要重新赋值, 我的意思是bthread首次运行, 那么在该bthread的栈里边还没有`saved_errno` 和 `saved_unique_user_ptr` 这两个局部变量啊, 那么这两个值对该 新bthread来说不是完全随机的么


-- 
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: [I] 这段代码有问题吗 (brpc)

Posted by "ehds (via GitHub)" <gi...@apache.org>.
ehds commented on issue #2208:
URL: https://github.com/apache/brpc/issues/2208#issuecomment-1506579232

   jump_stack 会切换到其他 bthread 执行任务,上下文切换了,当执行到下面的逻辑,`saved_errno` 和 `saved_unique_user_ptr`已经发生了更改,需要重新赋值。


-- 
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