Memory corruption with Due 1.5 on a Mac

I recently ran into an odd problem with memory corruption when using the Mac version of the IDE. I was trying to run the crypto library, RELIC, on a Due and was getting odd results. Running the exact same sketch one the Windows IDE worked perfectly. For anybody else that might have simular problems, I was able to fix the problem by replacing g++_arm_none_eabi files with ones that I downloaded from GNU Arm Embedded Toolchain project files : GNU Arm Embedded Toolchain
After I replaced them everything ran perfectly. I'm posting this here in case anybody else runs into a similar problem.