27 lines
796 B
Diff
27 lines
796 B
Diff
From 53b9b9ea326df8fec717260eda09e5d73d7a30cd Mon Sep 17 00:00:00 2001
|
|
From: qiujiacai <qiujiacai_yewu@cmss.chinamobile.com>
|
|
Date: Wed, 20 Sep 2023 18:28:49 +0800
|
|
Subject: [PATCH 4/7] [Pin-Server] Added null pointer check to avoid potential
|
|
null pointer problems
|
|
|
|
---
|
|
user/ArrayWidenPass.cpp | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/user/ArrayWidenPass.cpp b/user/ArrayWidenPass.cpp
|
|
index 475f784..cafb177 100644
|
|
--- a/user/ArrayWidenPass.cpp
|
|
+++ b/user/ArrayWidenPass.cpp
|
|
@@ -702,6 +702,8 @@ static bool checkBodyMemRef(Value memRef)
|
|
static bool checkBodyPointerPlus(Operation *op, Value &tmpIndex)
|
|
{
|
|
auto assignOp = dyn_cast<AssignOp>(op);
|
|
+ if(!assignOp)
|
|
+ return false;
|
|
Value rhs1 = assignOp.GetRHS1();
|
|
Value rhs2 = assignOp.GetRHS2();
|
|
|
|
--
|
|
2.33.0
|
|
|