根据backtrace_symbols查错误代码行号
在程序的开始加上这个struct sigaction myAction;myAction.sa_handler = mySigHandler;sigemptyset(&myAction.sa_mask);myAction.sa_flags = SA_RESTART | SA_SIGINFO;int nRet = sigaction(SIGSEGV, &myAction, NUL