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

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

问题描述

我尝试设置我的服务器处理核心转储的方式。为了测试它,我需要一个总是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?

推荐答案

main;

segfault 5chars。

is portable, and segfault in 5chars.

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

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