Open
Description
Mac OS 10.14.7版本。
gcc info:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
在这个版本上编译,并运行代码生成的main 以后程序报告:
Assertion failed: (0), function coroutine_resume, file coroutine.c, line 155.
然后通过跟踪发现,main.c 里面
struct args arg1 = { 0 };
struct args arg2 = { 100 };
int co1 = coroutine_new(S, foo, &arg1);
int co2 = coroutine_new(S, foo, &arg2);
发现一个问题, struct coroutine 这个结构体的成员 ud 在程序resume coroutine的 co2的时候被修改了。
any idea for this?
Metadata
Metadata
Assignees
Labels
No labels