PostgreSQL streaming replication broken: invalid magic number, out-of-sequence timeline ID
This doesn't sound like the same thing.  The GCC version is different and your PostgreSQL version is different.  IIRC it was an issue with GCC 4.6 optimizations and was fixed.  I don't believe it should have impacted your setup.

More likely something changed which caused this.  Perhaps the slave was promoted to a master briefly and then demoted again?  That will create problems like this all the time.

The timeline issue suggests to me that this is in fact what happened. It doesn't matter whether you write to a db or not, just completing recovery and promoting is enough to break the timeline.