Skip to content
Commit 8063a4a4 authored by Stephen Wilson's avatar Stephen Wilson
Browse files

Do not parse DIE's outside a compilation units range.

In DWARFCompileUnit::ExtractDIEsIfNeeded we are relying on a compilation units
DIEs to be terminated by a null entry.  I think the standard is fairly clear
that all sibling chains are to be terminated by null, but at least gcc 4.5.2
disagrees -- the top level chain drops the final entry.  This results in us
interpreting the next compilation unit header as a DIE.

Regardless of whether gcc is right or wrong, we should not overstep a
compilation units extent.  This patch ensures that we do not attempt to extract
a DIE beyond the length specified for a given DWARFCompileUnit by ensuring our
current offset is strictly less than the start of the next CU.

llvm-svn: 131721
parent f663741d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment