Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 Nov 2004 18:39:44 +0000
From:      Colin Percival <colin.percival@wadham.ox.ac.uk>
To:        Peter Wemm <peter@wemm.org>
Cc:        current@freebsd.org
Subject:   Re: RFC: Building libstdc++ with -frandom-seed=RepeatabilityConsideredGood
Message-ID:  <41910EF0.4060402@wadham.ox.ac.uk>
In-Reply-To: <200411081809.37894.peter@wemm.org>
References:  <41900FE6.1060602@wadham.ox.ac.uk> <200411081809.37894.peter@wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Wemm wrote:
> On Monday 08 November 2004 04:31 pm, Colin Percival wrote:
>>CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
> 
> So, in a nutshell.. this change means that if you compile libstdc++ 
> twice in a row from the same source, you would now get an identical 
> binary... whereas now you get a different binary each time you compile 
> the same source?

Yes.  The .so file now varies from one build to the next, and this would 
make them remain identical.  The .a files of course still have all of 
their timestamps which vary from one build to the next.

> It doesn't change the actual implementation of random number generators 
> or anything like that inside the library?

No.  This is strictly an issue of seeding gcc's random number generator 
during the compile... the binary produced with this flag has a 1 in 2^32 
chance of being produced randomly at present.  (Or maybe 1 in 2^64 on
applicable systems, I can't remember.)

Colin Percival



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41910EF0.4060402>