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 getByteOffsets in GepStmt and SVFIR2ItvExeState #1240

Merged
merged 4 commits into from
Nov 8, 2023

Conversation

bjjwwang
Copy link
Contributor

@bjjwwang bjjwwang commented Nov 7, 2023

  • add getLLVMByteSize in SVFType
  • fix getByteOffset in SVFIR2ExeState and GepStmt

@@ -4,6 +4,11 @@
namespace SVF
{

__attribute__((weak))
u32_t SVFType::getLLVMByteSize() const {
return 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Put an assertion to mention implementation and add an abort() method. See SVFValue::toString()

/// e.g. GepStmt* gep = [i32*4]*, 2
/// APOffset byteOffset = gep->accumulateConstantByteOffset();
/// byteOffset should be 8 since i32 is 4 bytes and index is 2.
APOffset computeConstantByteOffset() const;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Need to explain a bit more about this method since the argument has been removed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess the argument is no longer needed.

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

Merging #1240 (d2ad77d) into master (1f99ca0) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

❗ Current head d2ad77d differs from pull request most recent head 864de91. Consider uploading reports for the commit 864de91 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1240      +/-   ##
==========================================
- Coverage   64.49%   64.48%   -0.02%     
==========================================
  Files         223      223              
  Lines       23669    23674       +5     
==========================================
  Hits        15266    15266              
- Misses       8403     8408       +5     
Files Coverage Δ
svf/include/MemoryModel/AccessPath.h 83.33% <ø> (ø)
svf/include/SVFIR/SVFStatements.h 85.56% <ø> (ø)
svf/include/SVFIR/SVFType.h 97.67% <ø> (ø)
svf/lib/SVFIR/SVFType.cpp 0.00% <0.00%> (ø)
svf-llvm/lib/LLVMUtil.cpp 75.04% <0.00%> (-0.60%) ⬇️
svf/lib/MemoryModel/AccessPath.cpp 3.70% <0.00%> (+0.04%) ⬆️

@yuleisui yuleisui merged commit c45c0f2 into SVF-tools:master Nov 8, 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