JuliaLang/julia — pull request #4159 by loladiro (2013-08-26 20:47:57+00:00)
Title: Fix profiling on OS X

Fixes #3971 .

Apple's version of libunwind does not handle the case when we're in a prologue or epilogue. This introduces a modified version that adds support for that where possible. Note that you will still experience segfaults if you are using Clang < 3.3 as there was a bug in the way LLVM generates the Compact Unwind Info in prior versions.

Apart from that, this also replaces the SIGALRM based version of the profiler with a Mach-based one to reduce interference with libraries that may make use of SIGALRM as well as preventing the profiler from being blocked by blocking that signal.