How to check (pointers) code ported to 64-bit?

I have ported the software source code (c), which is not 64-bit to 64-bit. As a rule, I dealt with problems related to pointers; modifying integers containing pointers to longs used in comparing comparisons, etc. However, I do not know how to check them. Since the size of the pointers doubles, I realized that this only matters if the locations of the pointed places are greater than 0x0 ... 0100000000 (8 zeros after 1), but how can I guarantee this? Do I have to run many things in my virtual machine (OpenBSD) to fill the memory base, or is there another reliable way to do this?

In short: how can I check the code to verify that there are no pointer-based errors on amd64?

+4
source share
2 answers

Run all the automated tests that the system has.

If the system does not have automatic tests or if automatic tests have poor coverage, you need to create more tests, perhaps in combination with manual testing.

It is imperative that you have a 32-bit version installed for comparison. Thus, you can distinguish between old errors and errors that were introduced during porting. This is especially important if the system is not new for you, so you do not know how it should work.

, , ( , ..).

+1

. . , , . .

. , , ASLR , , 4G. ( !)

+1

All Articles