emberian / hprof

A real-time hierarchical profiler
Boost Software License 1.0
80 stars 11 forks source link

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

Open tomaka opened 9 years ago

tomaka commented 9 years ago

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.