You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sync Assignment-3 + CI with upstream LLVM 21.1.0 + Semi-Sparse refactor
Upstream commits 899d00a (Port SVF to LLVM 21) and 0aa951d (Semi-Sparse
infrastructure) together broke Assignment-3:
1. AbstractState::getByteOffset(GepStmt*) was deleted (moved to
AbstractStateManager::getGepByteOffset).
2. AbsExtAPI's constructor changed from
AbsExtAPI(Map<const ICFGNode*, AbstractState>&)
to
AbsExtAPI(AbstractStateManager*).
3. The same set of methods was deleted on the Python pysvf binding.
CI / packaging:
- Dockerfile + build.yml: bump llvm_version 18.1.0 -> 21.1.0 to match the
npm svf-lib package after SVF-npm sync-llvm-21 republishes.
Assignment-3 C++:
- Assignment_3_Helper.h: add AbstractExecutionHelper::getByteOffset
(header-only). Body is a faithful port of the upstream
AbstractStateManager::getGepByteOffset, reading non-constant indices
from `as[idxVar.getId()]` instead of going through a stateMgr -- works
because Assignment-3 keeps a dense per-node trace.
- Assignment_3.h / _Helper.cpp: own a lazily-constructed
AbstractStateManager* svfStateMgr so AbsExtAPI(svfStateMgr) compiles.
Around the single utils->handleExtAPI(callNode) site, sync postAbsTrace
into the mgr and copy any updates back, since AbsExtAPI now reads
abstract values exclusively through the mgr.
- Migrate the 3 stale call sites:
as.getByteOffset(gep) -> bufOverflowHelper.getByteOffset(as, gep)
Assignment-3 Python (mirrors C++ shape):
- Assignment_3_Helper.py: add 4 helpers on AbstractExecutionHelper that
port the upstream behavior: getByteOffset, getGepObjAddrs,
getPointeeElement, getAllocaInstByteSize. Three of them need svfir
(already a member of the helper); getByteOffset uses
pysvf.Options.max_field_limit() and gep.getStructFieldOffset(...) which
SVF-Python sync-llvm-21 newly exposes.
- Migrate 9 stale call sites:
abstract_state.<method>(...) -> self.buf_overflow_helper.<method>(abstract_state, ...)
(or self.<method>(...) when the caller is already inside the helper).
Symmetric with the C++ bufOverflowHelper.<method>(as, ...) pattern.
Locally: SVF builds clean against brew llvm@21 (21.1.4) on darwin/arm64;
SSA builds 100% (bin/ass3 produced); pysvf imports + Assignment-3 helpers
import + Options.max_field_limit() and AbstractStateManager are visible.
test-ae.{cpp,py} need a real .bc fixture to run end-to-end and have not
been exercised yet.
Depends on (publish in this order):
1. SVF-npm sync-llvm-21 (republish svf-lib)
2. SVF-Python sync-llvm-21 (republish pysvf to TestPyPI)
3. this branch
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments