出于二进制/源代码验证的目的,我希望能够在相同的计算机上相隔两周进行两次编译并使二进制文件相同,从而通过一些校验和测试.
到目前为止,我发现很可能时间戳将由编译器写入二进制文件.我可以通过对每个msdn文章的dumpbin/rawdata结果进行比较来解决这个问题.
http://support.microsoft.com/kb/164151
然而,垃圾箱结果在十几个地方仍然不同,差异似乎仍然是某种时间戳(例如从A1 73变为C4 76).
我假设这是delphi编译器放入代码/数据部分的时间戳,但我无法找到这种情况发生的位置或如何将其关闭.摆弄各种编译器/链接器选项并没有改变这种行为.
任何帮助将不胜感激.
delphi compiler-construction linker checksum binary-reproducibility
Indy 10:
两个线程,线程1在TIdHTTP上调用Get并阻止读取数据.线程2将在同一TIdHTTP上调用disconnect以中断Get.
我在TIdHTTP上使用摘要式身份验证,我偶尔会得到一个AV.
线程1的callstack:
40491D [system.pas][System][@ClassDestroy][8989]
69EF2B [..\..\common\IdAuthenticationDigest.pas][IdAuthenticationDigest][TIdDigestAuthentication.Destroy][109]
404567 [system.pas][System][TObject.Free][8313]
6A2B69 [..\..\Common\IdHTTP.pas][IdHTTP][TIdCustomHTTP.DoOnDisconnected][1587]
534574 [IdTCPConnection.pas][IdTCPConnection][TIdTCPConnection.Disconnect][532]
534B3B [IdTCPConnection.pas][IdTCPConnection][TIdTCPConnection.Disconnect][767]
6A3FB3 [..\..\Common\IdHTTP.pas][IdHTTP][TIdCustomHTTP.DoRequest][2101]
Run Code Online (Sandbox Code Playgroud)
线程2的callstack:
402BA3 [system.pas][System][@FreeMem][2477]
404521 [system.pas][System][TObject.FreeInstance][8294]
40491D [system.pas][System][@ClassDestroy][8989]
69EF2B [..\..\common\IdAuthenticationDigest.pas][IdAuthenticationDigest] [TIdDigestAuthentication.Destroy][109]
404567 [system.pas][System][TObject.Free][8313]
6A2B69 [..\..\Common\IdHTTP.pas][IdHTTP][TIdCustomHTTP.DoOnDisconnected][1587]
534574 [IdTCPConnection.pas][IdTCPConnection][TIdTCPConnection.Disconnect][532]
534B3B [IdTCPConnection.pas][IdTCPConnection][TIdTCPConnection.Disconnect][767]
Run Code Online (Sandbox Code Playgroud)
基本上在DoRequest结束时它会断开连接.似乎在尝试释放Request.Authentication的断开连接上存在竞争条件.
下载了Indy 10的最新代码并查看代码,我相信行为应该是相同的.
我相信从另一个线程断开调用是推荐的使用模式,我错了吗?这是Indy的一个错误吗?似乎有必要锁定断开连接,但很难看到可能造成的死锁.还有其他人遇到过这个吗?