Skip to content

Off by one error in v8logToStacksΒ #8

@jlfwong

Description

@jlfwong

I think this:

flamebearer/index.js

Lines 72 to 73 in a8d4d5c

for (let i = tick.s.length; i >= 0; i -= 2) {
const code = log.code[tick.s[i]];

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions