The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Paul Winalski <paul.winalski@gmail.com>
To: Edouard Klein <edouardklein@gmail.com>
Cc: TUHS List <tuhs@tuhs.org>
Subject: Re: [TUHS] UNESCO call for a study on the future institutional structure for Software Heritage (fwd)
Date: Sun, 13 Sep 2020 13:42:19 -0400	[thread overview]
Message-ID: <CABH=_VTty1bfKMYvYx2SpmX0b23SZ_ZHz3RYXBHPk48LLRdtWQ@mail.gmail.com> (raw)
In-Reply-To: <87k0x2ugb2.fsf@gmail.com>

On 9/10/20, Edouard Klein <edouardklein@gmail.com> wrote:
> Adding a bit of context, Software Heritage is used for example by GNU
> Guix, which aims at making builds reproducible down to the exact bit.
>
To get complete build reproducibility, your compiler writers have to
be careful.  It's very easy to introduce random variability that
doesn't affect the performance or semantics of the program.  Register
choice and instruction ordering, for example.  Here's a real-world
example of how such things can happen.  Compilers have lots of data
structures (temporary variables, for example) that require unique
identifiers, but the value of the identifier is irrelevant--it simply
has to be unique.  It's tempting to use the memory address of the data
structure as the unique ID--it saves both space and time.  But suppose
that your register allocator has to index those items in a hash table,
and also at some point sequentially walks the hash table.  The order
of the sequential walk is now dependent on the memory addresses of the
items in the table.  In the case I observed, this resulted in
different register choices if the program was recompiled.

-Paul W.

  reply	other threads:[~2020-09-13 17:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10  4:16 Robert Brockway
2020-09-10  9:33 ` Edouard Klein
2020-09-13 17:42   ` Paul Winalski [this message]
2020-09-14  0:33     ` John Gilmore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABH=_VTty1bfKMYvYx2SpmX0b23SZ_ZHz3RYXBHPk48LLRdtWQ@mail.gmail.com' \
    --to=paul.winalski@gmail.com \
    --cc=edouardklein@gmail.com \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).