Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix if offsetVarAndGepTypePair.second is nullptr #1247

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

bjjwwang
Copy link
Contributor

@bjjwwang bjjwwang commented Nov 17, 2023

since it is from External API like memcpy

"GepStmt: [Var96744 <-- Var4683]\t\n   call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %13, i8* align 1 %15, i64 8, i1 false), !dbg !26775 { \"ln\": 162, \"cl\": 2, \"fl\": \"/devcloud/ws/sQEab/workspace/j_gIcjhi8u/code/tests/allocator.cpp\" }"

this GepStmt comes from memcpy, which offsetVarAndGepTypePair[i].second is always nullptr

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Merging #1247 (47b4181) into master (e4faa11) will decrease coverage by 0.01%.
Report is 2 commits behind head on master.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1247      +/-   ##
==========================================
- Coverage   64.44%   64.44%   -0.01%     
==========================================
  Files         223      223              
  Lines       23721    23722       +1     
==========================================
  Hits        15287    15287              
- Misses       8434     8435       +1     
Files Coverage Δ
svf/lib/MemoryModel/AccessPath.cpp 3.57% <0.00%> (-0.05%) ⬇️

... and 2 files with indirect coverage changes

@@ -112,6 +112,9 @@ APOffset AccessPath::computeConstantByteOffset() const
/// i = 0, type: [10 x i8]*, PtrType, op = 0
/// i = 1, type: [10 x i8], ArrType, op = 8
const SVFType* type = offsetVarAndGepTypePairs[i].second;
/// if offsetVarAndGepTypePairs[i].second is nullptr, it means
/// this GepStmt comes from external API, assert
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add more comments about this from SVFIRBuilder.cpp:getBaseTypeAndFlatternedFields

@yuleisui yuleisui merged commit 6c82edf into SVF-tools:master Nov 17, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants