r239613 - in /trunk: gcc/fortran/ChangeLog gcc/...
jb@gcc.gnu.org
jb@gcc.gnu.org
Fri Aug 19 14:19:00 GMT 2016
Author: jb
Date: Fri Aug 19 14:19:51 2016
New Revision: 239613
URL: https://gcc.gnu.org/viewcvs?rev=239613&root=gcc&view=rev
Log:
Use a XOR cipher instead of byte shuffling to protect against bad seeds.
libgfortran:
2016-08-19 Janne Blomqvist <jb@gcc.gnu.org>
* intrinsics/random.c (xor_keys): New array with "secret" keys.
(scramble_seed): XOR given seed with xor_keys array rather than
shuffling bytes.
(unscramble_seed): Remove function.
(random_seed_i4): Use new scramble_seed.
(random_seed_i8): Likewise.
frontend:
2016-08-19 Janne Blomqvist <jb@gcc.gnu.org>
* intrinsics.texi (RANDOM_NUMBER): Remove reference to
init_random_seed in example.
(RANDOM_SEED): Remove warning to not set all seed values to 0.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/intrinsic.texi
trunk/libgfortran/ChangeLog
trunk/libgfortran/intrinsics/random.c
More information about the Gcc-cvs
mailing list