There is no frame validity check in the slow unwinder like there is in the fast unwinder due to which lsan reports a leak even for heap allocated coroutine in the test swapcontext.cc. Since mips/linux uses slow unwindwer instead of fast unwinder, the test fails for mips/linux. Therefore adding the checks before unwinding fixes the test for mips/linux.
Continued from http://reviews.llvm.org/D18690.
We try to stay away from platform ifdefs where possible. Especially here, where new define follows the other one almost to the letter.
I suggest you find a way to achieve this without platform ifdefs. (e.g. function differently defined in platform-specific files).