Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Stack traces walk off the top of the stack into unknown frames #31

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

Native mode on linux x86_64 stack traces fail to terminate at the $main or 
$init frame as documented; they continue and produce "no symbolic frame 
information (initialization frame?)" for non-nativecodegen C++ stack frames.

The underlying problem is the incorrect assumption that the stack always grows 
downward with the same layout. This assumption is made in frame.cc:

bool FrameIterator::is_valid() const {
  if (native_)
    return sp() <= proc()->native_bottom_sp();
  [...]
}

In practice, the top szl frame has sp() == proc()->native_bottom_sp(), but 
often the next few C++ frames have values in the "sp" slot which are 
numerically less than the nativecodegen's bottom_sp. FrameIterator::is_valid 
misidentifies them as valid szl native frames.

Walking through memory, deferencing pointers at random, seems dangerous in 
itself. That's why this is a separate bug and not just part of issue 19.

Original issue reported on code.google.com by aecolley on 13 Oct 2013 at 9:32

Attachments:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant