Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The MALLOC_PERTURB_ parameter was used to initialize allocated arrays to unphysical values. Previously, we had set this to 256 which would initialize bytes to 0xff, and indirectly set all floats to NaN. However, MALLOC_PERTURB_ was undocumnted for values greater than 255, and we were relying on undefined behavior. In newer versions of glibc, a value of 256 does nothing and is equivalent to a value of 0. This patch changes the MALLOC_PERTURB_ value to 1, which sets bytes to 0xfe and tends to initialize them to an unphysically large value. Unfortunately we have temporarily lost the ability to initialize to NaN, but for now this is probably the best we can do. (Note that other compilers like Intel can explicitly initialize allocatables to NaN, so this update is more specific to the GCC configuration of our GitHub Actions setup than the test suite.)
- Loading branch information