Fix crash on 32-bit Ubuntu, bug670.

This commit is contained in:
Wilson Snyder
2013-09-03 21:40:43 -04:00
parent 9aba617bad
commit d6e8b0263c
4 changed files with 13 additions and 0 deletions
+8
View File
@@ -965,6 +965,14 @@ void AstNode::dumpTreeFileGdb(const char* filenamep) { // For GDB only
v3Global.rootp()->dumpTreeFile(filename);
}
void AstNode::checkIter() const {
if (m_iterpp) {
dumpPtrs(cout);
// Perhaps something forgot to clear m_iterpp?
this->v3fatalSrc("Iteration link should be NULL");
}
}
void AstNode::dumpPtrs(ostream& os) const {
os<<"This="<<typeName()<<" "<<(void*)this;
os<<" back="<<(void*)backp();