It seems to be related to php. A user on reddit which has a Epyc 7551 CPU has no segfaults without the php portion of the test: https://www.reddit.com/r/Amd/comments/6rmq6q/epyc_7551_minin...
As of now, nobody seems to be able to reproduce the high parallel load segfaults on epic or threadripper.
AMD says they can reproduce the problem on RyZen, and that it is not present in epic/threadripper.
Though hard freezes not during compilation should be a completely different issue, and it will be an effort to pinpoint the processor as responsible.