MacOS 10.15 no longer supports 32-bit applications. What can you do?





Picture 2






On October 7, 2019, Apple released a new version of its Mac operating system, macOS Catalina. Version 10.15 contains many changes and improvements. One of the significant ones is a complete rejection of 32-bit applications. As a developer of such macOS apps, what can you do? That's right, port the application to a 64-bit platform. Will the application work correctly the first time? Maybe. Depends on the complexity and size of the code. But, most likely, the developers will encounter many unobvious errors that can be detected in advance using PVS-Studio.



Introduction



Despite the fact that technically launching 32-bit applications in a 64-bit environment is possible, Apple decided not to follow this path and complete the process of transition to a 64-bit platform that it started 10 years ago. For the user, this means that if the developer of their favorite application did not bother to switch to the 64-bit platform on time, the application will simply stop working in the updated macOS Catalina.



This is not to say that Apple's decision was unexpected: already in 2018 at the Worldwide Developers Conference, the company said that macOS Mojave would be the latest version of macOS with support for 32-bit programs. Probably, most developers of popular applications have successfully migrated to 64-bit to the release of macOS Catalina, or are completing the transition.



It should be noted that with apparent simplicity, the translation of the application on a 64-bit platform contains a lot of "pitfalls". And if part of the application is written using the C ++ language, then the developer may need a deep understanding of the mechanisms for working with memory and pointers, as well as taking into account many unobvious nuances. In this case, it is useful to use a tool that allows you to verify the correctness of the code precisely taking into account the transition from 32 to 64-bit platform. For example, PVS-Studio static code analyzer.



64-bit diagnostics



The PVS-Studio analyzer contains a special group of diagnostics for this case. In general, PVS-Studio as a tool was originally created for the purpose of analyzing C / C ++ code when searching for 64-bit migration errors, and only subsequently developed into a more general-purpose analyzer: C # and Java languages ​​were added, it became possible to search for potential vulnerabilities, and standards support secure coding (MISRA, for example) and more.



Over the past time, we have gained great experience on the issues of transition to a 64-bit platform, and articles have been written. One of the good articles on this topic: " A collection of examples of 64-bit errors in real programs ." The article is quite old, but the problems described in it do not lose their relevance today. I recommend reading it, especially if you are planning or are already working on converting your applications to 64 bits (be it C ++ applications for macOS or any other operating system).



You can enable 64-bit warnings as follows:



Windows / Visual Studio



In the alert viewing window there is a button to enable the entire group of 64-bit diagnostics:







Picture 3






Linux / macOS



When starting the analyzer from the console, you need to enable 64-bit diagnostics both in the analyzer and in the report generator:



pvs-studio-analyzer analyze ... -a 5 ... plog-converter ... -a "64:1,2,3"
      
      





Conclusion



Well, of course, nothing prevents you from downloading and trying the PVS-Studio analyzer on your code. Good luck in the fight against 64-bit and other errors!











If you want to share this article with an English-speaking audience, then please use the link to the translation: Sergey Khrenov. MacOS 10.15 no longer supports 32-bit apps. What can you do? .



All Articles