`MergeStacks` in platform.cpp assumes that the first frame (index 0) of the pseudo-stack is a C++ frame, in order to initialize `lastPseudoCppStackAddr`. If, however, the first frame is not a C++ frame (or a JS_OSR frame), `pseudoIndex` is never incremented elsewhere, and `lastPseudoCppStackAddr` is never initialized. This results in an infinite loop because the condition `pseudoIndex != pseudoCount` is never satisfied. In debug builds, this should trigger an assertion at .  https://searchfox.org/mozilla-central/rev/b24e6342d744c5a83fab5c15972e11eeb69d68e6/tools/profiler/core/platform.cpp#857
You need to log in before you can comment on or make changes to this bug.