Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/Delphi/Linker    [ Add a report in this area ]  
Report #:  29538   Status: Open
IDE produces different EXEs from same source.
Project:  Delphi Build #:  8.1
Version:    7.0 Submitted By:   John Herbster
Report Type:  New Feature Request Date Reported:  5/26/2006 7:29:31 PM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All versions Internal Tracking #:   257017
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (2 Total Ratings)
3.00 out of 5
Total Votes: 12
Description
Consecutive compiles (I don't know about builds) will produce different EXEs from the same sources.   This happens with both D5 and D7.  The differences appear to be the same date-time in the integer file-time format written in 20 to 30 places out near the end of the EXE.

The differences do cause a problem with our attempts at software quality control, because they indicate a change, when there otherwise is none.

Is there a reason for this?  Are these date-times read or used for any purpose? Or is it just an accident?  Has it already be fixed in later Delphi versions?  

Should this report type be changed to a feature request?  Like a request to have the date-times changed to be the date-times of the corresponding to the most recent date time of the source file changes.  The source files should the runtimes, the compiler, and components.  This would not be trivial to design, unless the formats and file times of the source files already contain such info.  

In the meantime, I suggest that it would be of significant benefit and a lot easier just to zero those date-time fields.

--JohnH, 2007-05-11

Here are typical differences:
SizeOf(FileA)=$063000  ...\T_ExeDifferences_2 060608a\T_ExeDifferences_2_a.EXE
SizeOf(FileB)=$063000  ...\T_ExeDifferences_2 060608a\T_ExeDifferences_2_b.EXE
#    Loc     DelLoc         AsLongInt  AsLongInt   FA as Date and Time   FB as Date and Time        
001 $05D804 $5D804  $34C850C1 $34C850D5   2006-06-08 10:06:02   2006-06-08 10:06:42
002 $05D854 $00050   $34C850C1 $34C850D5   2006-06-08 10:06:02   2006-06-08 10:06:42
003 $05D89C $00048   $34C850C1 $34C850D5   2006-06-08 10:06:02   2006-06-08 10:06:42
004 $05D904 $00068   $34C850C1 $34C850D5   2006-06-08 10:06:02   2006-06-08 10:06:42
005 $05D91C $00018   $34C850C1 $34C850D5   2006-06-08 10:06:02   2006-06-08 10:06:42

On 2007-05-05, Finn Tolderlund, provided me with this 2001 Google thread
  http://groups.google.dk/group/borland.public.delphi.winapi/browse_thread/thread/cd3b52072ea9edc9
and this comment: "Up to Delphi 3 each compile gave the exact same exe file, so that a binary compare would find no difference.  Starting with Delphi 4 each compile [produces] different output."

Note also these reports:  (Added 2010.09.11 by JohnH)

Report No: 25402            Status: Closed
Win32 VCL Compiler does not save TimeDateStamp to the FileHeader.
http://qc.embarcadero.com/wc/qcmain.aspx?d=25402
QCWIN:Defect_No=25402

Report No: 54489            Status: Closed
PE Optional Header Timestamp is fixed to 1992 date
http://qc.embarcadero.com/wc/qcmain.aspx?d=54489
QCWIN:Defect_No=54489
Steps to Reproduce:
Steps to Test:
(0) Download and save the attached program source files into a folder.
(1) Compile this program and rename EXE to T_ExeDifferences_2_a.EXE
(2) Compile again and rename EXE to T_ExeDifferences_2_b.EXE
(3) Compile again and run.
(4) Click on the Compare Files button to observe differences.
--JohnH, 2006-06-08
Workarounds
None
Attachment
T_ExeDifferences_2 060608a.zip
Comments

John Herbster at 7/6/2006 2:12:53 PM -
This problem has been analyzed before.  See

http://groups.google.com/groups/search?q=%22good+news%2C+though%2C+is+these+differences+are+timestamps%22

http://groups.google.com/group/borland.public.delphi.ide/browse_frm/thread/752e53c66d21074b/e83b1ef15c063f42?lnk=st&q=production+build+source+control+group%3Aborland.public.*&rnum=12&hl=en#e83b1ef15c063f42


Pierre le Riche at 9/26/2006 1:31:56 PM -
Hi John,

I'm not sure that I agree that it constitutes a bug. If Delphi stores timestamps of when the sources were compiled then it should produce different EXEs for each compile. If you don't want Delphi to store those timestamps then this report should be a feature request and not a C-2, in my opinion.

Regards,
Pierre

John Herbster at 9/26/2006 5:06:12 PM -
Can anyone tell us how the Delphi IDE or other utilities use the multiple copies of the date of compilation that it inserts into its output EXEs? --JohnH

John Herbster at 11/28/2009 2:25:08 PM -
Is this reported suggestion rising or getting lower on the priority ranking list?

Server Response from: ETNACODE01