use*_*009 0 c++ stack runtime-error
#include <stack>
#include <functional>
int main()
{
std::stack<std::function<int()>> s;
s.push(main);
return s.top()();
}
Run Code Online (Sandbox Code Playgroud)
我得到以下诊断:
result: runtime error time: 0.04s memory: 39704 kB signal: 11 (SIGSEGV)
Run Code Online (Sandbox Code Playgroud)
这里发生了什么?