Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix segfaults with debug mode code on 64-bit Arm
While getting pony working on 64-bit Arm, we found a bug where the `test-stdlib-debug` tests would segfault. Everything worked fine with `release` builds, but `debug` builds would crash. After investigation, we've found that in `codegen_machine` in `host.cc` if the `opt_level` is get to either `CodeGenOpt::Default` or `CodeGenOpt::Aggressive` instead of `CodeGenOpt::None` the problem goes away. It seems likely that this is an LLVM bug, but that hasn't been established. We've committed a fix in `host.cc` that when the target is `arm` (which is 64-bit arm) that we use `CodeGenOpt::Default`. This is far from ideal, but gets us working compilations until we can investigate further. The end result of this should either be a patch that we upstream to LLVM or possibly, the discovery that we are doing something wrong with our Arm code generation that optimization manages to fix.
- Loading branch information