I have two programs that I wrote for work. One takes a huge text file database of airports, navaids, fixes for aviation and parses it, sorts it in alphanumeric order, indexes it and puts it all in a custom db file for the other program. The other one takes user input and searches for these fixes based on ID.
Problem is, with the latest publication, one of my coworkers noticed that the program would crash whenever someone started inputting a search string with a value less than '2F'. After much tinkering around I found that when I ran the program that makes the database on a work computer, I had a database that crashed the search program but when I made the database from the same source files using the same program at home, I had a working database.
Here's the real strange part. I wrote a third program to read the contents of each database file and compare them to one another and that program is saying that (based solely on content) they are *identical* in every way.
Both programs were written using Open Watcom. The DB builder is a 32 bit command-line program and the search program is a 32 bit windows program. The DB builder program uses no windows API's at all and uses fwrite() to write the data. The computers making the bad database are running Windows XP SP3, the computers making the good database are running Windows 7 Home Premium x64. The search program reacts the same to both databases whether it's run on XP or 7.
Each time I remake a database with my program, it has a different md5sum. I'm guessing md5sums might take the time/date of the file into consideration? Is there a hash routine that ignores the time/date of creation I could use to verify that they are identical byte to byte? Is there some part of the file other than content that might be different between XP and 7? Is there some subtext to fread() and fwrite() that might cause issues between these two OS's?