Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How do Release version errors come about?

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article will explain in detail how the errors in the Release version are caused. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

ReleaseCandidate (RC) candidate version, used to refer to the release of software or operating system, generally corresponds to the Debug version, which can be debugged, including the source code information corresponding to each execution code. Generally, after the beta period, there are basically no problems, several slightly different versions will be released, called rc1 and rc2, and then one of them will be selected as the official version. The Release version has been removed.

The essential difference between Debug and Release compilation

Debug, often referred to as the debug version, contains debugging information and does not make any optimization, making it easy for programmers to debug programs.

Release is called the release version, and it is often optimized to make the program optimal in code size and running speed, so that users can use it well.

The real secret of Debug and Release lies in a set of compilation options.

The options for each of them are listed below

(of course there are others, such as / Fd/Fo, but the difference is not important, and they usually do not cause errors in the Release version, which will not be discussed here.)

Release version error condition

/ MD/ML or / MT uses the release version of the run-time library

/ O1 or / O2 optimize the switch to make the program the smallest or fastest

/ D "NDEBUG" turns off the conditional compilation debug code switch (that is, does not compile the assert function)

/ GF merges duplicate strings and puts string constants in read-only memory to prevent modification

In fact, there is no essential boundary between Debug and Release, they are just a collection of compilation options, and the compiler just acts according to the predetermined options. In fact, we can even modify these options to get an optimized debug version or a release with trace statements.

With the above introduction, let's compare these options one by one to see how errors in the Release version are caused.

RuntimeLibrary

Which runtime library to link usually only affects the performance of the program.

The debug version of RuntimeLibrary contains debugging information and uses some protection mechanisms to help find errors, so performance is not as good as the release version. The RuntimeLibrary provided by the compiler is usually stable and does not cause errors in the Release version; however, because Debug's RuntimeLibrary strengthens error detection, such as heap memory allocation, sometimes Debug is wrong but Release is normal. It should be pointed out that if there is something wrong with Debug, even if the Release is normal, the program must have Bug, but it may be a run of the Release version that does not show it.

This is the end of the article on "how errors in the Release version are made". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report