Internals: Resolve potential SEGV risk (#3350)
This commit is contained in:
parent
e744c21f56
commit
47226236f4
|
|
@ -167,16 +167,14 @@ private:
|
||||||
nodep->v3warn(E_UNSUPPORTED, "Unsupported: Only one PSL clock allowed per assertion");
|
nodep->v3warn(E_UNSUPPORTED, "Unsupported: Only one PSL clock allowed per assertion");
|
||||||
// Block is the new expression to evaluate
|
// Block is the new expression to evaluate
|
||||||
AstNode* blockp = nodep->propp()->unlinkFrBack();
|
AstNode* blockp = nodep->propp()->unlinkFrBack();
|
||||||
if (nodep->disablep()) {
|
if (AstNode* const disablep = nodep->disablep()) {
|
||||||
m_disablep = nodep->disablep()->cloneTree(false);
|
m_disablep = disablep->cloneTree(false);
|
||||||
if (VN_IS(nodep->backp(), Cover)) {
|
if (VN_IS(nodep->backp(), Cover)) {
|
||||||
blockp = new AstAnd(
|
blockp = new AstAnd(disablep->fileline(),
|
||||||
nodep->disablep()->fileline(),
|
new AstNot(disablep->fileline(), disablep->unlinkFrBack()),
|
||||||
new AstNot(nodep->disablep()->fileline(), nodep->disablep()->unlinkFrBack()),
|
blockp);
|
||||||
blockp);
|
|
||||||
} else {
|
} else {
|
||||||
blockp = new AstOr(nodep->disablep()->fileline(),
|
blockp = new AstOr(disablep->fileline(), disablep->unlinkFrBack(), blockp);
|
||||||
nodep->disablep()->unlinkFrBack(), blockp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Unlink and just keep a pointer to it, convert to sentree as needed
|
// Unlink and just keep a pointer to it, convert to sentree as needed
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue