什么是产生在C#分段错误规范的方法吗? [英] What is a canonical way to produce a segmentation fault in C#?

查看:124
本文介绍了什么是产生在C#分段错误规范的方法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我感兴趣的是最短的,最整洁的一段围绕着C#代码将可靠地产生段错误 - 最好不直接调用任何非托管代码

I am interested in the shortest, neatest piece of C# code around that will reliably produce a segfault - ideally without directly calling any unmanaged code.

推荐答案

什么你以后是有点不清楚,但我想这是任何答案一样好,到目前为止,这大约是最小的,你可以得到的。

What you're after is somewhat unclear but I suppose this is as good as any answer so far, and it is about as minimal as you can get.

System.Runtime.InteropServices.Marshal.ReadInt32(IntPtr.Zero);

这篇关于什么是产生在C#分段错误规范的方法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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