How do you verify that 2 copies of a VB 6 executable came from the same code base?
Posted
by Tim Visher
on Stack Overflow
See other posts from Stack Overflow
or by Tim Visher
Published on 2010-05-14T14:01:23Z
Indexed on
2010/05/14
14:04 UTC
Read the original article
Hit count: 259
I have a program under version control that has gone through multiple releases. A situation came up today where someone had somehow managed to point to an old copy of the program and thus was encountering bugs that have since been fixed. I'd like to go back and just delete all the old copies of the program (keeping them around is a company policy that dates from before version control was common and should no longer be necessary) but I need a way of verifying that I can generate the exact same executable that is better than saying "The old one came out of this commit so this one should be the same."
My initial thought was to simply MD5 hash the executable, store the hash file in source control, and be done with it but I've come up against a problem which I can't even parse.
It seems that every time the executable is generated (method: Open Project. File > Make X.exe) it hashes differently. I've noticed that Visual Basic messes with files every time the project is opened in seemingly random ways but I didn't think that would make it into the executable, nor do I have any evidence that that is indeed what's happening. To try to guard against that I tried generating the executable multiple times within the same IDE session and checking the hashes but they continued to be different every time.
So that's:
- Generate Executable
- Generate MD5 Checksum:
md5sum X.exe > X.md5
- Verify MD5 for current executable:
md5sum -c X.md5
- Generate New Executable
- Verify MD5 for new executable:
md5sum -c X.md5
- Fail verification because computed checksum doesn't match.
I'm not understanding something about either MD5 or the way VB 6 is generating the executable but I'm also not married to the idea of using MD5. If there is a better way to verify that two executables are indeed the same then I'm all ears.
Thanks in advance for your help!
© Stack Overflow or respective owner