On Mon, Jun 06, 2016 at 10:48:16PM +0200, Kooda wrote: > That’s not the only problem here. Any call to (random) in the compiler > might cause non-determinism in the output, as well as calls to > (current-seconds) for example. > > If the method used in this patch not suitable, I’ll happily do it some > other way. > > My first approach was to remove calls to (random) and > (current-seconds) and use (gensym) or something similar instead, > depending on the case. But I thought that maybe these (random) calls > were there for a good reason so I didn’t want to change the behaviour > of the code too much.
If the random calls are there for a good reason, overriding C_randomize like you did isn't the correct approach either, but just a hack. I like the idea of reproducible builds, but I think the correct approach would be to remove the random calls, instead. And for symbol table randomization, that could be disabled in runtime.c by the compiler driver, perhaps. > I also tried changing how symbol hashing operates, as you suggest, but > I suppose the random seed of the hash table is there as a security > measure, we have to keep it, it’s just not that useful in the compiler > itself. That's why it would make sense to have an option to disable it or use a deterministic initial random seed. It could even be exposed as a run-time switch to make debugging easier. Cheers, Peter
signature.asc
Description: Digital signature
_______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
