What is “verifiable managed assembly”

依然范特西╮ 提交于 2019-12-04 04:31:12

问题


While checking the possibility of developing for Windows Phone 7 using C++, I came across this thread, which states:

"...any language that can compile to a verifiable managed assembly (the verifiability requirement applies to all dependencies, too!) is good" (for WP7 development)

What is "verifiable managed assembly" and where can I learn more about this?


回答1:


Verifiable code is code that gets compiled to IL and can be proven to not produce any IL that can execute unsafe code, bypass code access security checks or in any way corrupt the state of the CLR. The exact rules are complex however. The ten-thousand feet view is code written in managed languages like VB.NET or C# without the unsafe keyword. Nevertheless, you can write unverifiable code in C# without using the unsafe keyword. Check this answer for example.

There's a dedicated tool to check an assembly, PEVerify.exe. It executes the same checks the JIT compiler and the CLR perform. The bottom of the linked page has links to MSDN articles about verification.



来源:https://stackoverflow.com/questions/4533471/what-is-verifiable-managed-assembly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!