1 Mar 2005 01:44
binary reproducibility and c++ default allocators
Galathaea <galathaea <at> excite.com>
2005-03-01 00:44:32 GMT
2005-03-01 00:44:32 GMT
GCC team,
At work, we use version 2.96 with Redhat Linux 7.3. We work in an embedded industry that requires complete
binary reproducibility (BR) of compiles so regulators may verify the source code reproduces the images
they are given. Consequently, we avoid anonymous namespaces and other known violators of reproducibility.
We have currently found a strange occurance BR breakage. We have a file that is completely empty save for
includes of headers (many headers through one main include). The .o produced differs each build. Tracing
the translation unit through the build process has shown that the assembly output differs on a few lines
related to allocators.
They have the format:
.stabs "_GLOBAL_.I._S_chunk_alloc__t24__default_alloc_template2b1i0UiRiSomefilepath.cppLyTUed:f(0,21)",36,0,1256,_GLOBAL_.I._S_chunk_alloc__t24__default_alloc_template2b1i0UiRiSomefilepath.cppLyTUed
.type _GLOBAL_.I._S_chunk_alloc__t24__default_alloc_template2b1i0UiRiSomefilepath.cppLyTUed, <at> function
_GLOBAL_.I._S_chunk_alloc__t24__default_alloc_template2b1i0UiRiSomefilepath.cppLyTUed:
This issue appears above some assembly that sets up a stack frame, calls
__static_initialization_and_destruction_0, then resets the stack frame and returns, but I am not sure
if that is relevant (I found some older messages which approached somewhat unrelated issues with static
template members which made me think mentioning it might be helpful).
My main question is concerning the Somefilepath.cpp (fictitious here) that points to the compile path of
the almost empty cpp and, in particular, the "LyTUed" sequence appended to the end. That is the sequence
which differs in each compile.
I am trying to find out what is being done to cause this code to be generated so we know what to avoid in the
(Continue reading)
RSS Feed