想学习下 core dump 的东西,看了 Laruence 的博客:
http://www.laruence.com/2011/06/23/2057.html
脚本
function recurse($num) {
recurse(++$num);
}
recurse(0);
但我现在 PHP 如果内存限制了就出现如下报错:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes)
如果把内存改成不限制,这个脚本会一直吃内存,不会爆栈。
请问,如何设置才能 segment fault?
操作系统:Mac OS 10.11.1