即出现segfaults最小的C / C ++程序? [英] Minimal C/C++ program that segfaults?

查看:142
本文介绍了即出现segfaults最小的C / C ++程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置了服务器处理核心转储的方式。为了测试它,我需要一个程序,总是出现segfaults。

I'm trying to set up the way my server handles core dumps. In order to test it, I'd need a program that always segfaults.

有没有一直出现segfaults一个简单的例子程序?

Is there a simple example program that always segfaults?

推荐答案

为主;

是便携式的,并在段错误5chars。

is portable, and segfault in 5chars.

这篇关于即出现segfaults最小的C / C ++程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆