diff options
author | Reinhard Tartler <siretart@tauware.de> | 2021-02-21 08:32:46 -0500 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2021-02-21 08:32:46 -0500 |
commit | 8dceee1c2e0a4880295f273adb5903ceb69eb5bd (patch) | |
tree | a23bc8bf62d55032692f8ede57120ca45a15dec2 | |
parent | 6f4808f0bfcf12ebfaf096b76ae63597dc2455b3 (diff) |
Fixed segfault on 32 bit machinesarchive/debian/1%2.3-2
Origin: upstream
$ svn log -c r1649
------------------------------------------------------------------------
r1649 | olaf | 2021-02-19 15:10:26 -0500 (Fri, 19 Feb 2021) | 1 line
Fixed segfault on 32 bit machines, which was caused by a bug in the pointcut expression evaluation for attributes. The parent node of the root scope is not NULL.
Gbp-Pq: Name r1649.patch
-rw-r--r-- | AspectC++/PointCutExpr.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/AspectC++/PointCutExpr.cc b/AspectC++/PointCutExpr.cc index d643d6e..3b33c64 100644 --- a/AspectC++/PointCutExpr.cc +++ b/AspectC++/PointCutExpr.cc @@ -1194,6 +1194,10 @@ bool PCE_CXX11Attr::evaluate(ACM_Any &jpl, PointCutContext &context, Binding &bi } } + // if we have just checked the root scope, break here, because it has no parent + if (jpl_name == context.jpm().get_root()) + break; + // otherwise check the parent scope of the current name join point, // but omit the parent classes of nested classes ACM_Name *parent = (ACM_Name*)jpl_name->get_parent(); @@ -1201,9 +1205,6 @@ bool PCE_CXX11Attr::evaluate(ACM_Any &jpl, PointCutContext &context, Binding &bi while (parent && (parent->type_val () == JPT_Class || parent->type_val () == JPT_Aspect)) parent = (ACM_Name*)parent->get_parent(); } - // root scope detected -> stop here - if (!parent || parent == context.jpm().get_root()) - break; // continue by matching the parent scope jpl_name = parent; |