forked from github/verilator
Fix crash on 32-bit Ubuntu, bug670.
This commit is contained in:
parent
9aba617bad
commit
d6e8b0263c
2
Changes
2
Changes
@ -9,6 +9,8 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fix --output-split-cfunc to count internal functions. [Chris Randall]
|
**** Fix --output-split-cfunc to count internal functions. [Chris Randall]
|
||||||
|
|
||||||
|
**** Fix crash on 32-bit Ubuntu, bug670. [Mark Jackson Pulver]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* Verilator 3.851 2013-08-15
|
* Verilator 3.851 2013-08-15
|
||||||
|
@ -965,6 +965,14 @@ void AstNode::dumpTreeFileGdb(const char* filenamep) { // For GDB only
|
|||||||
v3Global.rootp()->dumpTreeFile(filename);
|
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 {
|
void AstNode::dumpPtrs(ostream& os) const {
|
||||||
os<<"This="<<typeName()<<" "<<(void*)this;
|
os<<"This="<<typeName()<<" "<<(void*)this;
|
||||||
os<<" back="<<(void*)backp();
|
os<<" back="<<(void*)backp();
|
||||||
|
@ -1153,6 +1153,8 @@ public:
|
|||||||
bool sameTree(AstNode* node2p); // Does tree of this == node2p?
|
bool sameTree(AstNode* node2p); // Does tree of this == node2p?
|
||||||
void deleteTree(); // Always deletes the next link
|
void deleteTree(); // Always deletes the next link
|
||||||
void checkTree(); // User Interface version
|
void checkTree(); // User Interface version
|
||||||
|
void checkIter() const;
|
||||||
|
void clearIter() { m_iterpp=NULL; }
|
||||||
void dumpPtrs(ostream& str=cout) const;
|
void dumpPtrs(ostream& str=cout) const;
|
||||||
void dumpTree(ostream& str=cout, const string& indent=" ", int maxDepth=0);
|
void dumpTree(ostream& str=cout, const string& indent=" ", int maxDepth=0);
|
||||||
void dumpTree(const string& indent, int maxDepth=0) { dumpTree(cout,indent,maxDepth); }
|
void dumpTree(const string& indent, int maxDepth=0) { dumpTree(cout,indent,maxDepth); }
|
||||||
|
@ -71,6 +71,7 @@ void V3LinkLevel::modSortByLevel() {
|
|||||||
UINFO(9,"modSortByLevel() sorted\n"); // Comment required for gcc4.6.3 / bug666
|
UINFO(9,"modSortByLevel() sorted\n"); // Comment required for gcc4.6.3 / bug666
|
||||||
for (ModVec::iterator it = vec.begin(); it != vec.end(); ++it) {
|
for (ModVec::iterator it = vec.begin(); it != vec.end(); ++it) {
|
||||||
AstNodeModule* nodep = *it;
|
AstNodeModule* nodep = *it;
|
||||||
|
nodep->clearIter(); // Because we didn't iterate to find the node pointers, may have a stale m_iterp() needing cleanup
|
||||||
nodep->unlinkFrBack();
|
nodep->unlinkFrBack();
|
||||||
}
|
}
|
||||||
if (v3Global.rootp()->modulesp()) v3Global.rootp()->v3fatalSrc("Unlink didn't work");
|
if (v3Global.rootp()->modulesp()) v3Global.rootp()->v3fatalSrc("Unlink didn't work");
|
||||||
|
Loading…
Reference in New Issue
Block a user