News for hackers. Stuff that matters.
Re:Clang-11.0.0 Miscompiled SQLite by MaXtreeM on Thursday June 04, 2020 @04:55AM (#23414274)
I always thought that big compilers (clang/gcc/msvc) have some degree of non-determinism due to myriad of optimization passes in combination with heuristics deciding when and where to use certain kind of optimization. Is that true or not?

And certainly if you define deterministic compilation as always producing the same binary, this is already broken by compiler macros like "__DATE__" and randomly generated names during link-time optimization. [1]

[1] https://blog.conan.io/2019/09/02/Deterministic-builds-with-C...

Re:Clang-11.0.0 Miscompiled SQLite by loeg on Thursday June 04, 2020 @10:23AM (#23416877)
It's not true. They are usually deterministic for the purpose of reproducibility. The same compiler version, flags, and sources should produce the same binary.

Yes, __DATE__ in sources can break reproducibility. That does not mean compilers get carte blanche to be nondeterministic.

Re:Clang-11.0.0 Miscompiled SQLite by hathawsh on Thursday June 04, 2020 @03:07PM (#23420506)
I would think that profile-guided optimization (PGO) also makes compilation nondeterministic (unless the profile is stored for reuse.)

https://en.wikipedia.org/wiki/Profile-guided_optimization

I've been enabling PGO when building Python lately and I imagine the resulting binaries are a little different every time due to random events during profiling.