Can builds from the same source code yield functionally different executables?
<p>Recently, a colleague of mine said something along these lines: "consecutive APKs (executables) produced by build server from the same source code might not be the same". The context for this discussion was whether QA performed on build X also applies to build Y, which was performed by the same build server (configured the same way) from the same source code.</p>

<p>I think that generated executables might not be identical due to various factors (e.g. different timestamp), but the question is whether they can be <em>functionally</em> different.</p>

<p>The only scenario, that I can think of, in which the same source code could produce different functionality is that of multi-threading issue: in case of incorrect synchronization of multi-threaded code, different re-ordering/optimization actions performed at compile time could affect this poorly synchronized code and change its functional behavior.</p>

<p>My questions are:</p>

<ol>
<li>Is it true that consecutive builds performed by the same build server from the same source code can be functionally different?</li>
<li>If #1 is true, are these differences limited to incorrectly synchronized multi-threaded code?</li>
<li>If #2 is false, what are the other parts that can change?</li>
</ol>

<p>Links to any related material will be appreciated.</p>