flamebearer icon indicating copy to clipboard operation
flamebearer copied to clipboard

Off by one error in v8logToStacks

Open jlfwong opened this issue 6 years ago • 1 comments

I think this:

https://github.com/mapbox/flamebearer/blob/a8d4d5c0061ed439660783c613c43ab28b751219/index.js#L72-L73

should be i = tick.s.length - 1, otherwise this is going to consistently access something out of bounds in the tick.s array. Possibly you want it to be tick.s.length - 2 in order to retain alignment with the alternation between C++ and JavaScript stacks?

Thanks for writing this, by the way!

I'm using this as reference for importing v8 logs into speedscope (https://github.com/jlfwong/speedscope)

jlfwong avatar Jul 20 '18 17:07 jlfwong

@jlfwong thanks a lot for Speedscope BTW, it's fantastic! I should probably deprecate this project in favor of yours — I wasn't aware of it when I started working on Flamebearer :)

mourner avatar Aug 29 '18 12:08 mourner