async_simple: SEGFAULT: run_async_simple_uthread_test

Search before asking

  • I searched the issues and found no similar issues.

What happened + What you expected to happen

Test project /Users/admin/repos/pr/async_simple/build
    Start 1: run_async_simple_test
1/5 Test #1: run_async_simple_test ............   Passed    2.48 sec
    Start 2: run_async_simple_util_test
2/5 Test #2: run_async_simple_util_test .......   Passed    0.33 sec
    Start 3: run_async_simple_coro_test
3/5 Test #3: run_async_simple_coro_test .......   Passed   18.11 sec
    Start 4: run_async_simple_executor_test
4/5 Test #4: run_async_simple_executor_test ...   Passed    0.34 sec
    Start 5: run_async_simple_uthread_test
5/5 Test #5: run_async_simple_uthread_test ....***Exception: SegFault  0.52 sec

80% tests passed, 1 tests failed out of 5

Total Test time (real) =  21.79 sec

The following tests FAILED:
	  5 - run_async_simple_uthread_test (SEGFAULT)
Errors while running CTest

Platform: Apple M2 (macOS 13.0 (22A380))

Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.1.0
Thread model: posix

Reproduction way

Anything else

It seems caused by #195 and work well if revert #195 (@4kangjc ).

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 30

Most upvoted comments

uthread结束执行回调时会push了一个task到executor里去析构uthread。正确做法是应该把running–放join lambda里