IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Creating the call for the cling invalid check function required that
the function have a const void *, thus a cast was injected.
Also renamed some of the variable to be more specific and
self-explanatory.
The class NodeContext was removed since collecting individual Stmts
is not necessary, due to the change of how the visiting of one
single Stmt is done, which now recurses on the children of the Stmt.
Thus, the AST is changed directly by the VisitX methods.
VisitCompoundStmt is not necessary since the CompoundStmt derives from
Stmt and the collection of Stmt of the CompounStmt is visited
through the children visitation.
VisitCXXMemberCallExpr is now covered by the recursive visiting in the
VisitCallExpr method.
The previous version of the Null deref visitor was defaulting to
VisitStmt when the Stmt type was unknown, thus allowing for some
types of Stmt X for which a VisitX was not implemented to default
to VisitStmt and not check the content of it. In order to check
any type of Stmt for possible subexpressions which contain s Stmt
that derefrences a Null, the VisitStmt was extended to check its
children.
Only the Stmt types, X, which directly containing a null deref expression
have an explicit VisitX with the exception of CXXMemberCallExpr,
because this type would otherwise default to VisitCallExpr which has
a different check for its structure.
Initially the NullDerefProtectionTransformer was prepending a
If statement before the possible Null derefrencing. This was
chenged by a runtime function call which included the check
for Null and invalid address memory, but was replacing the
whole AST node so the parent node of the Expr type would disappear,
resulting in a wrong AST. The correct solution was to replace the
SubExpr of the Expr that contained a possible Null derefrencing.
This was done by using the specific setters for each Expr type
that is detailed in the NullDeref Visiting.
Fix cases (seen in roottest/cling/typedef/assertTypedefIter.C) where
a template parameter is an expression that is actually part of a
template parameter pack. In this case we need to peek into the pack.
The previous invalid refrence transformer injected if stmt for checking the argument derefrenced.
Now we return a runtime call that checks for validiting for derefrencing and injects the call
into the AST replacing the node where the deref happens with a call to the runtime function.