@@ -1641,14 +1641,14 @@ inline bool GetPtrDerivedPop(InterpState &S, CodePtr OpPC, uint32_t Off) {
1641
1641
1642
1642
inline bool GetPtrBase (InterpState &S, CodePtr OpPC, uint32_t Off) {
1643
1643
const Pointer &Ptr = S.Stk .peek <Pointer>();
1644
+ if (!CheckNull (S, OpPC, Ptr, CSK_Base))
1645
+ return false ;
1644
1646
1645
1647
if (!Ptr.isBlockPointer ()) {
1646
1648
S.Stk .push <Pointer>(Ptr.asIntPointer ().baseCast (S.getASTContext (), Off));
1647
1649
return true ;
1648
1650
}
1649
1651
1650
- if (!CheckNull (S, OpPC, Ptr, CSK_Base))
1651
- return false ;
1652
1652
if (!CheckSubobject (S, OpPC, Ptr, CSK_Base))
1653
1653
return false ;
1654
1654
const Pointer &Result = Ptr.atField (Off);
@@ -1661,13 +1661,14 @@ inline bool GetPtrBase(InterpState &S, CodePtr OpPC, uint32_t Off) {
1661
1661
inline bool GetPtrBasePop (InterpState &S, CodePtr OpPC, uint32_t Off) {
1662
1662
const Pointer &Ptr = S.Stk .pop <Pointer>();
1663
1663
1664
+ if (!CheckNull (S, OpPC, Ptr, CSK_Base))
1665
+ return false ;
1666
+
1664
1667
if (!Ptr.isBlockPointer ()) {
1665
1668
S.Stk .push <Pointer>(Ptr.asIntPointer ().baseCast (S.getASTContext (), Off));
1666
1669
return true ;
1667
1670
}
1668
1671
1669
- if (!CheckNull (S, OpPC, Ptr, CSK_Base))
1670
- return false ;
1671
1672
if (!CheckSubobject (S, OpPC, Ptr, CSK_Base))
1672
1673
return false ;
1673
1674
const Pointer &Result = Ptr.atField (Off);
0 commit comments