Index: src/profiler/tick-sample.cc |
diff --git a/src/profiler/tick-sample.cc b/src/profiler/tick-sample.cc |
index 538223715b5082f49f0a3a69b3d4bbe7e370c4bb..e1c84c46bf45b5cc7dc261f86e786f1f228239af 100644 |
--- a/src/profiler/tick-sample.cc |
+++ b/src/profiler/tick-sample.cc |
@@ -225,7 +225,12 @@ |
i::SafeStackFrameIterator it(isolate, reinterpret_cast<i::Address>(regs->fp), |
reinterpret_cast<i::Address>(regs->sp), |
js_entry_sp); |
- if (it.done()) return true; |
+ |
+ // If at this point iterator does not see any frames, |
+ // is usually means something is wrong with the FP, |
+ // e.g. it is used as a general purpose register in the function. |
+ // Bailout. |
+ if (it.done()) return false; |
size_t i = 0; |
if (record_c_entry_frame == kIncludeCEntryFrame && |