Oct 29

segmentation fault(core dump) 不指定

bkkkd , 09:00 , 开发应用 , 评论(0) , 引用(0) , 阅读(1953) , Via 本站原创 | |
周一的时候发现测试环境有一个命令执行后报
引用
segmentation fault(core dump)


网上基本减于这个错误,基本上是c语言的编译问题,但我大php怎么会有这样的错误?
所以怀疑是系统内核错误.把容器重新打包一次.结果没有改善.

最后发现原为是同事在CommonLogic::__call(),再调用了一次,call_user_func_array([$this, $method_name], $agrs);


class CommonLogic{

    function __call($method_name,$agrs){
             if(anycheck()){
                     //and function
             }else{
                   // 如果不符合的,就再调用一次,这个就变成了一个死循环.
                   // 因为__call就是类里没有对应的方法才会去调用,但这里又再调用一个不存在的方法
                    return call_user_func_array([$this, $method_name], $agrs)
             }
    }
}


这个错误算是概念不清引起的错误.
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]