Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic when a child node has the same name as its parent #4

Open
tomaka opened this issue Jul 8, 2015 · 0 comments
Open

Panic when a child node has the same name as its parent #4

tomaka opened this issue Jul 8, 2015 · 0 comments

Comments

@tomaka
Copy link

tomaka commented Jul 8, 2015

The following code:

    let _g = hprof::enter("Reading");
    {
        let _g = hprof::enter("Mapping");
        let mapping = buffer.map();
        drop(_g);

        let _g = hprof::enter("Reading");
        for val in mapping.values.iter() {
            process(val);
        }
    }

Panics with:

thread '<main>' panicked at 'arithmetic operation overflowed', C:\Users\pierre\.cargo\registry\src\github.com-1285ae84e5963aae\hprof-0.1.2\src\lib.rs:262

Renaming the inner Reading to Reading2 fixed the issue.

homu added a commit that referenced this issue Oct 18, 2015
Fix always removing current ProfileNode

We weren't checking if `ProfileNode::ret` returned `true`. In other
words, we'd move back up the tree early for recursive calls.

This resolves issue #4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant