The forgotten problems of 64-bit programs development

Page 2 of 5
  1. Introduction
  2. Existing Publications and Tools in the Sphere of Verification of 64-bit Applications
  3. The Untouched Problems of 64-bit Programs Development
  4. Recommendations on Verification 64-bit Programs
  5. Resources

Existing Publications and Tools in the Sphere of Verification of 64-bit Applications

Of course, it was not the first stage of digit capacity change. That’s enough to recollect the transition from 16-bit systems to 32-bit. It’s natural that the acquired experience had a good influence on the stage of migration to 64-bit systems.

But the migrate to 64-bit systems had it’s own peculiarities in the result of which there appeared a number of investigations and publications on these problems, for example [5, 6, 7].

The mistakes of the following kinds were pointed out by the authors of those times:

  1. Packing of pointers in the types of a smaller digit capacity. For example, placing the pointer into int type in the system with LP64 database will result in truncation the pointer value and impossibility to use it further on.
  2. Using magic numbers. The danger consists in using such numbers as 4, 32, 0x80000000 and some others instead of special constants or using the sizeof() operator.
  3. Some shift operations that do not take into account the increase of digit capacity of a number of types.
  4. Using incorrect unions or structures not taking into account the alignment on different systems with different digit capacity.
  5. Mistakes of the work with bit fields.
  6. Some arithmetic expressions. Example:
int x = 100000, y = 100000, z = 100000;
long long s = x * y * x;

Some other more rare mistakes were also considered, but the main ones are mentioned in the list.

On the ground of the investigation of the question of verification of 64-bit code some solutions were offered that provide the diagnostics of dangerous constructions. For example, such verification was realized in Gimpel Software PC-Lint (http://www.gimpel.com) and Parasoft C++test (http://www.parasoft.com) static analyzers.

The question arouses: if 64-bit systems exist for such a long time, as well as article devoted to this problem, and even program tools that provide the control of dangerous constructions in the code, why should we get back to this question?

Unfortunately, yes, we should. The reason is the program that has taken place during these years in the sphere of informational technologies. And the urgency of this question is connected with fast spreading of 64-bit versions of OS Windows.

The existing informational support and tools in the field of 64-bit technologies development went out of date and need fundamental reprocessing. But you will object, saying that there are many modern articles (2005-2007) in the Internet devoted to the problems of 64-bit applications development in C/C++ language. Unfortunately, they turn out to be no more than retelling older articles concerning new 64-bit Windows version without taking into consideration its specific character and the changes in the technology.

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The greatest performance improvement of all is when a system goes from not-working to working.” - John Ousterhout