wasphin opened a new issue #1264:
URL: https://github.com/apache/incubator-brpc/issues/1264


   **Describe the bug (描述bug)**
   
   ```c++
   class B1 {
   public:
       virtual ~B1() {}
   };
   class B2 {
   public:
       virtual ~B2() {}
   
       static void* RunThis(void *arg);
       void Run() {
           // 有系统调用
           ...
   
           foo();
       }
       virtual void foo() {}
   };
   class D1 : public B1, public B2 {
   public:
       void foo() override;
   }
   ```
   
   使用默认参数 ``bthread_start_background`` 执行了类似上面代码的任务, 结果崩溃在 ``D1::foo`` 部分, 此时显示 
``this=0x0``.
   
   改用 `pthead_create` 或添加 `BTHREAD_ATTR_PTHREAD` 属性后正常, 这个是使用方式不对还是有什么可能的问题?
   
   **To Reproduce (复现方法)**
   暂无最小复现例子.
   
   **Expected behavior (期望行为)**
   使用默认参数
   
   **Versions (各种版本)**
   OS: RHEL/CentOS 8
   Compiler: 8.3.1
   brpc: `7bda11bc312d422b3e293b19b8b82a711da26c94`
   protobuf: 3.5.0
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to